Commit 9e76833
net: fix socket refcounting in skb_complete_wifi_ack()
[ Upstream commit dd4f10722aeb10f4f582948839f066bebe44e5fb ]
TX skbs do not necessarily hold a reference on skb->sk->sk_refcnt
By the time TX completion happens, sk_refcnt might be already 0.
sock_hold()/sock_put() would then corrupt critical state, like
sk_wmem_alloc.
Fixes: bf7fa55 ("mac80211: Resolve sk_refcnt/sk_wmem_alloc issue in wifi ack path")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Soheil Hassas Yeganeh <soheil@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 2681a78 commit 9e76833
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3735 | 3735 | | |
3736 | 3736 | | |
3737 | 3737 | | |
3738 | | - | |
| 3738 | + | |
3739 | 3739 | | |
3740 | 3740 | | |
3741 | 3741 | | |
| |||
3745 | 3745 | | |
3746 | 3746 | | |
3747 | 3747 | | |
3748 | | - | |
3749 | | - | |
3750 | | - | |
3751 | | - | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
3752 | 3755 | | |
3753 | 3756 | | |
3754 | | - | |
3755 | | - | |
3756 | 3757 | | |
3757 | 3758 | | |
3758 | 3759 | | |
| |||
0 commit comments