]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: pid, fix memory corruption
authorJiri Slaby <jirislaby@gmail.com>
Mon, 4 May 2009 16:10:28 +0000 (18:10 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 May 2009 20:22:16 +0000 (16:22 -0400)
commit11d97ea3105e83f50ffa88245eb90825e98d43f9
treed4410166db411f73939560f9cd9e1b7bdeae09c1
parent046fcb08a003c3c345c0dcbf6639a27e5f8bd549
mac80211: pid, fix memory corruption

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.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/rc80211_pid_algo.c