Jon Maloy 60c2530696 tipc: fix race between poll() and setsockopt()
Letting tipc_poll() dereference a socket's pointer to struct tipc_group
entails a race risk, as the group item may be deleted in a concurrent
tipc_sk_join() or tipc_sk_leave() thread.

We now move the 'open' flag in struct tipc_group to struct tipc_sock,
and let the former retain only a pointer to the moved field. This will
eliminate the race risk.

Reported-by: syzbot+799dafde0286795858ac@syzkaller.appspotmail.com
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-19 15:12:21 -05:00
..
2015-05-14 12:24:45 -04:00
2018-01-08 20:59:25 -05:00
2015-03-05 22:08:42 -05:00
2016-07-26 14:26:42 -07:00
2016-08-18 23:36:07 -07:00
2017-08-23 22:31:38 -07:00
2017-10-13 08:46:00 -07:00