netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Address reference counting issues with sock_queue_err_skb
@ 2014-09-10 22:04 Alexander Duyck
       [not found] ` <20140910215837.23225.39149.stgit-+uVpp3jiz/QKn9AQLGuxw7vm/XP+8Wra@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Alexander Duyck @ 2014-09-10 22:04 UTC (permalink / raw)
  To: netdev, linux-wireless; +Cc: johannes, davem, eric.dumazet, linville

After looking over the code for skb_clone_sk after some comments made by
Eric Dumazet I have come to the conclusion that skb_clone_sk is taking the
correct approach in how to handle the sk_refcnt when creating a buffer that
is eventually meant to be returned to the socket via the sock_queue_err_skb
function.

However upon review of other callers I found what I believe to be a
possible reference count issue in the path for handling "wifi ack" packets.
To address this I have applied the same logic that is currently in place so
that the sk_refcnt will be forced to stay at least 1, or we will not
provide an skb to return in the sk_error_queue.

---

Alexander Duyck (2):
      skb: Add documentation for skb_clone_sk
      mac80211: Resolve sk_refcnt/sk_wmem_alloc issue in wifi ack path


 net/core/skbuff.c |   18 ++++++++++++++++++
 net/mac80211/tx.c |   15 ++++-----------
 2 files changed, 22 insertions(+), 11 deletions(-)

-- 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-09-12 21:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10 22:04 [PATCH net-next 0/2] Address reference counting issues with sock_queue_err_skb Alexander Duyck
     [not found] ` <20140910215837.23225.39149.stgit-+uVpp3jiz/QKn9AQLGuxw7vm/XP+8Wra@public.gmane.org>
2014-09-10 22:05   ` [PATCH net-next v2 1/2] skb: Add documentation for skb_clone_sk Alexander Duyck
2014-09-10 22:05 ` [PATCH net-next 2/2] mac80211: Resolve sk_refcnt/sk_wmem_alloc issue in wifi ack path Alexander Duyck
2014-09-11  7:06   ` Johannes Berg
2014-09-11  9:38     ` Arend van Spriel
     [not found]       ` <54116D8E.20308-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2014-09-11 14:40         ` Alexander Duyck
2014-09-11 15:21     ` Alexander Duyck
2014-09-11 15:53       ` Johannes Berg
2014-09-12 21:51 ` [PATCH net-next 0/2] Address reference counting issues with sock_queue_err_skb David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).