Re: [PATCH v3] can: Fix kernel panic at security_sock_rcv_skb
From: David Miller <davem@davemloft.net>
Date: 2017-01-29 23:34:06
Also in:
linux-can
From: David Miller <davem@davemloft.net>
Date: 2017-01-29 23:34:06
Also in:
linux-can
From: Eric Dumazet <redacted> Date: Fri, 27 Jan 2017 08:11:44 -0800
From: Eric Dumazet <edumazet@google.com> Zhang Yanmin reported crashes [1] and provided a patch adding a synchronize_rcu() call in can_rx_unregister() The main problem seems that the sockets themselves are not RCU protected. If CAN uses RCU for delivery, then sockets should be freed only after one RCU grace period. Recent kernels could use sock_set_flag(sk, SOCK_RCU_FREE), but let's ease stable backports with the following fix instead.
...
Reported-by: Zhang Yanmin <redacted> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied and queued up for -stable, thanks Eric.