]> err.no Git - linux-2.6/commitdiff
mac80211: fix kmalloc vs. net_ratelimit
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 25 Feb 2008 23:39:28 +0000 (00:39 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 28 Feb 2008 14:13:10 +0000 (09:13 -0500)
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>
net/mac80211/ieee80211_sta.c

index 2019b4f0528d8f063e94e3bdcc6450b854765e60..9aeed5320228bfd0e1df34d600c0c725498be7f9 100644 (file)
@@ -1116,9 +1116,10 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,
        /* prepare reordering buffer */
        tid_agg_rx->reorder_buf =
                kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC);
-       if ((!tid_agg_rx->reorder_buf) && net_ratelimit()) {
-               printk(KERN_ERR "can not allocate reordering buffer "
-                                               "to tid %d\n", tid);
+       if (!tid_agg_rx->reorder_buf) {
+               if (net_ratelimit())
+                       printk(KERN_ERR "can not allocate reordering buffer "
+                              "to tid %d\n", tid);
                goto end;
        }
        memset(tid_agg_rx->reorder_buf, 0,