1
0
Fork 0
alistair23-linux/net/netrom
Cong Wang 7314f5480f netrom: fix locking in nr_find_socket()
nr_find_socket(), nr_find_peer() and nr_find_listener() lock the
sock after finding it in the global list. However, the call path
requires BH disabled for the sock lock consistently.

Actually the locking is unnecessary at this point, we can just hold
the sock refcnt to make sure it is not gone after we unlock the global
list, and lock it later only when needed.

Reported-and-tested-by: syzbot+f621cda8b7e598908efa@syzkaller.appspotmail.com
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-12-30 20:24:16 -08:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
af_netrom.c netrom: fix locking in nr_find_socket() 2018-12-30 20:24:16 -08:00
nr_dev.c net: Kill dev_rebuild_header 2015-03-02 16:43:41 -05:00
nr_in.c net: netrom: nr_in: mark expected switch fall-through 2017-10-22 02:00:33 +01:00
nr_loopback.c treewide: Switch DEFINE_TIMER callbacks to struct timer_list * 2017-11-21 15:57:05 -08:00
nr_out.c netrom: use linux/uaccess.h 2014-10-17 23:52:54 -04:00
nr_route.c proc: introduce proc_create_seq{,_data} 2018-05-16 07:23:35 +02:00
nr_subr.c netrom: use linux/uaccess.h 2014-10-17 23:52:54 -04:00
nr_timer.c treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts 2017-11-21 16:35:54 -08:00
sysctl_net_netrom.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00