Re: [PATCH net] net: add pfmemalloc check in sk_add_backlog()
From: Eric Dumazet <hidden>
Date: 2015-10-02 09:38:23
On Tue, 2015-09-29 at 21:56 -0700, David Miller wrote:
From: Eric Dumazet <redacted> Date: Tue, 29 Sep 2015 18:52:25 -0700quoted
From: Eric Dumazet <edumazet@google.com> 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 <redacted>Applied, thanks Eric.
Hi David I could not find this patch in any of your trees, would you take a look ? Thanks !