Hello,
On Mon, Mar 21, 2022 at 04:53:12PM +0100, Alexander Bluhm wrote:
> Hi,
>
> syzkaller and witness found a bug in my pcb table mutex commit.
>
> https://syzkaller.appspot.com/bug?id=90a4811c99d6a2df7b252971b754612ca632894d
>
> For multicast and broadcast packets udp_input() traverses the loop
> of all UDP PCBs. There it calls udp_sbappend() while holding the
> UDB table mutex. This results in sorwakeup() and finally kernel
> lock while holding a mutex.
>
> I use the same solution as for PCB notify. Collect the affected
> PCBs in a temporary list. This list is protected by exclusive net
> lock. When we unlock the protocol layer this has to be reconsidered.
>
> The loop for raw sockets is on my todo list.
>
> ok?
>
I agree this is the right approach to deal with pf-rwlock.
diff looks good to me.
OK sashan