summaryrefslogtreecommitdiff
path: root/net/netlink
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-02-24 08:04:20 +0300
committerDavid S. Miller <davem@davemloft.net>2018-02-24 08:04:20 +0300
commitf74290fdb363665538743d14c4f00aeacdb68d87 (patch)
treea5c8f6332f06550e935d1e557ac927302f7f63c4 /net/netlink
parent1b71af6053af1bd2f849e9fda4f71c1e3f145dcf (diff)
parent9cb9c07d6b0c5fd97d83b8ab14d7e308ba4b612f (diff)
downloadlinux-f74290fdb363665538743d14c4f00aeacdb68d87.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 63cb55d3c2fd..5d10dcfe6411 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2308,7 +2308,7 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
if (cb->start) {
ret = cb->start(cb);
if (ret)
- goto error_unlock;
+ goto error_put;
}
nlk->cb_running = true;
@@ -2328,6 +2328,8 @@ int __netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
*/
return -EINTR;
+error_put:
+ module_put(control->module);
error_unlock:
sock_put(sk);
mutex_unlock(nlk->cb_mutex);