Commit 30d9e505 authored by Vinay Kumar Yadav's avatar Vinay Kumar Yadav Committed by David S. Miller

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: cc35c88a ("crypto : chtls - CPL handler definition")
Signed-off-by: default avatarVinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c271042e
...@@ -102,7 +102,7 @@ static struct net_device *chtls_find_netdev(struct chtls_dev *cdev, ...@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment