summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgbi
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2018-09-11 02:21:42 +0200
committerDavid S. Miller <davem@davemloft.net>2018-09-12 09:08:00 +0200
commit67edf21e5adfd336f2ff08668eb09850943666d3 (patch)
treeb0bb1659585480d3669539da7fd790cee1c03b5c /drivers/scsi/cxgbi
parentnet: dsa: b53: Only call b53_port_event() for SGMII ports (diff)
downloadlinux-67edf21e5adfd336f2ff08668eb09850943666d3.tar.xz
linux-67edf21e5adfd336f2ff08668eb09850943666d3.zip
scsi: libcxgbi: fib6_ino reference in rt6_info is rcu protected
The fib6_info reference in rt6_info is rcu protected. Add a helper to extract prefsrc from and update cxgbi_check_route6 to use it. Fixes: 0153167aebd0 ("net/ipv6: Remove rt6i_prefsrc") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/scsi/cxgbi')
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 6b3ea50c594e..75f876409fb9 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -784,7 +784,8 @@ cxgbi_check_route6(struct sockaddr *dst_addr, int ifindex)
csk->mtu = mtu;
csk->dst = dst;
- if (!rt->from || ipv6_addr_any(&rt->from->fib6_prefsrc.addr)) {
+ rt6_get_prefsrc(rt, &pref_saddr);
+ if (ipv6_addr_any(&pref_saddr)) {
struct inet6_dev *idev = ip6_dst_idev((struct dst_entry *)rt);
err = ipv6_dev_get_saddr(&init_net, idev ? idev->dev : NULL,
@@ -794,8 +795,6 @@ cxgbi_check_route6(struct sockaddr *dst_addr, int ifindex)
&daddr6->sin6_addr);
goto rel_rt;
}
- } else {
- pref_saddr = rt->from->fib6_prefsrc.addr;
}
csk->csk_family = AF_INET6;