diff options
| author | Eric Dumazet <edumazet@google.com> | 2015-09-29 18:52:25 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 20:45:11 +0200 |
| commit | fc12accac1432656c3c0dbda3d78b342401608b8 (patch) | |
| tree | f09b286e6ec8ebca5bc49427dca8d5804d0b4401 /drivers/net/ppp | |
| parent | d1696f0a0fda89b1af799d0be02c2553be5a8ed3 (diff) | |
net: add pfmemalloc check in sk_add_backlog()
[ Upstream commit c7c49b8fde26b74277188bdc6c9dca38db6fa35b ]
Greg reported crashes hitting the following check in __sk_backlog_rcv()
BUG_ON(!sock_flag(sk, SOCK_MEMALLOC));
The pfmemalloc bit is currently checked in sk_filter().
This works correctly for TCP, because sk_filter() is ran in
tcp_v[46]_rcv() before hitting the prequeue or backlog checks.
For UDP or other protocols, this does not work, because the sk_filter()
is ran from sock_queue_rcv_skb(), which might be called _after_ backlog
queuing if socket is owned by user by the time packet is processed by
softirq handler.
Fixes: b4b9e35585089 ("netvm: set PF_MEMALLOC as appropriate during SKB processing")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Greg Thelen <gthelen@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
Diffstat (limited to 'drivers/net/ppp')
0 files changed, 0 insertions, 0 deletions
