Repository navigation
Commit bf7fa55
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 <alexander.h.duyck@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent cab41c4 commit bf7fa55
2 files changed
Lines changed: 9 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3628 | 3628 | | |
3629 | 3629 | | |
3630 | 3630 | | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
3631 | 3634 | | |
3632 | 3635 | | |
3633 | 3636 | | |
| 3637 | + | |
| 3638 | + | |
3634 | 3639 | | |
3635 | 3640 | | |
3636 | 3641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2072 | 2072 | | |
2073 | 2073 | | |
2074 | 2074 | | |
2075 | | - | |
| 2075 | + | |
2076 | 2076 | | |
2077 | | - | |
2078 | | - | |
| 2077 | + | |
2079 | 2078 | | |
2080 | 2079 | | |
2081 | 2080 | | |
2082 | 2081 | | |
2083 | | - | |
| 2082 | + | |
2084 | 2083 | | |
2085 | 2084 | | |
2086 | 2085 | | |
2087 | 2086 | | |
2088 | 2087 | | |
2089 | 2088 | | |
2090 | | - | |
2091 | | - | |
2092 | 2089 | | |
2093 | | - | |
2094 | | - | |
| 2090 | + | |
2095 | 2091 | | |
2096 | | - | |
2097 | | - | |
2098 | | - | |
2099 | 2092 | | |
2100 | 2093 | | |
2101 | 2094 | | |
| |||
0 commit comments