From: Alexander Duyck Date: Wed, 10 Sep 2014 22:05:42 +0000 (-0400) Subject: mac80211: Resolve sk_refcnt/sk_wmem_alloc issue in wifi ack path X-Git-Tag: fixes-against-v3.18-rc2~81^2~95^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf7fa551e0ce507b82935055f4b4aa229be73eeb;p=pandora-kernel.git mac80211: Resolve sk_refcnt/sk_wmem_alloc issue in wifi ack path There is a possible issue with the use, or lack thereof of sk_refcnt and sk_wmem_alloc in the wifi ack status functionality. Specifically if a socket were to request acknowledgements, and the socket were to have sk_refcnt drop to 0 resulting in it waiting on sk_wmem_alloc to reach 0 it would be possible to have sock_queue_err_skb orphan the last buffer, resulting in __sk_free being called on the socket. After this the buffer is enqueued on sk_error_queue, however the queue has already been flushed resulting in at least a memory leak, if not a data corruption. Signed-off-by: Alexander Duyck Acked-by: Johannes Berg Signed-off-by: David S. Miller --- Reading git-diff-tree failed