fix broken error handling in ieee80211_sta_process_addba_request()
Subsystems (3)
PATCH 1/1 fix broken error handling in ieee80211_sta_process_addba_request()
The Coverity checker spotted this buggy error handling added by commit 07db218396650933abff3c5c1ad1e2a6e0cfedeb.
---6003e3d899a8fd6425ff509363b776f8807df25d diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 2019b4f..094565e 100644
net/mac80211/ieee80211_sta.c +4 -3
@@ -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,
On 19-02-2008 23:58, Adrian Bunk wrote:
...
Quoted 3 lines
net/mac80211/ieee80211_sta.c +0
-0@@ -1116,9 +1116,10 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,
...
net/mac80211/ieee80211_sta.c static void ieee80211_sta_process_addba_request(struct net_device *dev, · line 1121
Quoted 1 line
net/mac80211/ieee80211_sta.c +1
-0+ printk(KERN_ERR "can not allocate reordering buffer "
+ printk(KERN_ERR "cannot allocate reordering buffer "
Probably this can be fixed during the commit.
Jarek P.
Quoted 6 lines · Jarek Poplawski
On 19-02-2008 23:58, Adrian Bunk wrote:
...Quoted 3 lines
net/mac80211/ieee80211_sta.c +0
-0@@ -1116,9 +1116,10 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev,...
Quoted 7 lines
Quoted 1 line
+ printk(KERN_ERR "can not allocate reordering buffer "
+ printk(KERN_ERR "cannot allocate reordering buffer "
Probably this can be fixed during the commit.
Jarek P
.
ACK: both patches.
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html