Skip to content
Commit 352dccbd authored by Willem de Bruijn's avatar Willem de Bruijn Committed by Paul Gortmaker
Browse files

packet: unconditionally free po->rollover



commit afa0925c upstream.

Rollover used to use a complex RCU mechanism for assignment, which had
a race condition. The below patch fixed the bug and greatly simplified
the logic.

The feature depends on fanout, but the state is private to the socket.
Fanout_release returns f only when the last member leaves and the
fanout struct is to be freed.

Destroy rollover unconditionally, regardless of fanout state.

Fixes: 57f015f5 ("packet: fix crash in fanout_demux_rollover()")
Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
Diagnosed-by: default avatarDmitry Vyukov <dvyukov@google.com>
Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 0ba1cdec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment