From: Jiri Slaby Date: Wed, 13 May 2009 07:55:26 +0000 (+0200) Subject: mac80211: pid, fix memory corruption X-Git-Tag: v2.6.27.25~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00d025abdfdcc686052ed1d9c25f10ead680e620;p=pandora-kernel.git 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 Cc: John W. Linville Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed