aboutsummaryrefslogtreecommitdiffstats
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2015-09-30 01:52:25 +0000
committerDavid S. Miller <[email protected]>2015-10-17 12:01:11 +0000
commitc7c49b8fde26b74277188bdc6c9dca38db6fa35b (patch)
tree27ac5d0c1469aeacade0db5540362e8e9772b6b4 /net/switchdev/switchdev.c
parentvia-rhine: fix VLAN receive handling regression. (diff)
downloadkernel-c7c49b8fde26b74277188bdc6c9dca38db6fa35b.tar.gz
kernel-c7c49b8fde26b74277188bdc6c9dca38db6fa35b.zip
net: add pfmemalloc check in sk_add_backlog()
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 <[email protected]> Reported-by: Greg Thelen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions