mirror of https://gitee.com/openkylin/linux.git
crypto/chtls: correct net_device reference count
ip_dev_find() call holds net_device reference which is not needed,
use __ip_dev_find() which does not hold reference.
v1->v2:
- Correct submission tree.
- Add fixes tag.
Fixes: cc35c88ae4
("crypto : chtls - CPL handler definition")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c271042eb6
commit
30d9e5057a
|
@ -102,7 +102,7 @@ static struct net_device *chtls_find_netdev(struct chtls_dev *cdev,
|
||||||
case PF_INET:
|
case PF_INET:
|
||||||
if (likely(!inet_sk(sk)->inet_rcv_saddr))
|
if (likely(!inet_sk(sk)->inet_rcv_saddr))
|
||||||
return ndev;
|
return ndev;
|
||||||
ndev = ip_dev_find(&init_net, inet_sk(sk)->inet_rcv_saddr);
|
ndev = __ip_dev_find(&init_net, inet_sk(sk)->inet_rcv_saddr, false);
|
||||||
break;
|
break;
|
||||||
#if IS_ENABLED(CONFIG_IPV6)
|
#if IS_ENABLED(CONFIG_IPV6)
|
||||||
case PF_INET6:
|
case PF_INET6:
|
||||||
|
|
Loading…
Reference in New Issue