diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-05-13 09:55:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-11 20:01:36 -0700 |
commit | 00d025abdfdcc686052ed1d9c25f10ead680e620 (patch) | |
tree | f84edb060e80080b054bcdd9e53fdb91201b5f2d /fs/ext4/ialloc.c | |
parent | edafc7a273c17f4806fd785c2fb0574161e8dcf5 (diff) |
mac80211: pid, fix memory corruption
commit a8659597bf744b0f8d2560e2a734b5c941569e0e upstream
pid doesn't count with some band having more bitrates than the one
associated the first time.
Fix that by counting the maximal available bitrate count and allocate
big enough space.
Secondly, fix touching uninitialized memory which causes panics.
Index sucked from this random memory points to the hell.
The fix is to sort the rates on each band change.
Also remove a comment which is wrong now.
This version also contains half of
mac80211: avoid NULL ptr deref when finding max_rates in PID and minstrel
patch by John W. Linville, which is namely:
- if (sband->n_bitrates > max_rates)
+ if (sband && sband->n_bitrates > max_rates)
to fix oopses on one band devices.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/ext4/ialloc.c')
0 files changed, 0 insertions, 0 deletions