]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/siw: Fix IPv6 addr_list locking
authorBernard Metzler <bmt@zurich.ibm.com>
Wed, 28 Aug 2019 13:03:55 +0000 (15:03 +0200)
committerDoug Ledford <dledford@redhat.com>
Wed, 28 Aug 2019 14:29:19 +0000 (10:29 -0400)
commit576c46cc7191ebe3a026308190985edb84684e66
tree3092801e59838ad729c914673ad968f6e2a8fdf3
parent90e7b960866dd16abe9993c504261e342de17d36
RDMA/siw: Fix IPv6 addr_list locking

Walking the address list of an inet6_dev requires
appropriate locking. Since the called function
siw_listen_address() may sleep, we have to use
rtnl_lock() instead of read_lock_bh().

Also introduces sanity checks if we got a device
from in_dev_get() or in6_dev_get().

Reported-by: Bart Van Assche <bvanassche@acm.org>
Fixes: 723753626e18 ("rdma/siw: connection management")
Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
Link: https://lore.kernel.org/r/20190828130355.22830-1-bmt@zurich.ibm.com
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/siw/siw_cm.c