mac80211: fix kmalloc vs. net_ratelimit
The "goto end;" part definitely must not be rate limited. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
53b3f8e47a
commit
03147dfc8a
@ -1116,9 +1116,10 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,
|
|||||||
/* prepare reordering buffer */
|
/* prepare reordering buffer */
|
||||||
tid_agg_rx->reorder_buf =
|
tid_agg_rx->reorder_buf =
|
||||||
kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC);
|
kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC);
|
||||||
if ((!tid_agg_rx->reorder_buf) && net_ratelimit()) {
|
if (!tid_agg_rx->reorder_buf) {
|
||||||
printk(KERN_ERR "can not allocate reordering buffer "
|
if (net_ratelimit())
|
||||||
"to tid %d\n", tid);
|
printk(KERN_ERR "can not allocate reordering buffer "
|
||||||
|
"to tid %d\n", tid);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
memset(tid_agg_rx->reorder_buf, 0,
|
memset(tid_agg_rx->reorder_buf, 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user