summaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-03 19:38:22 -0800
committerDavid S. Miller <davem@davemloft.net>2010-02-03 19:38:22 -0800
commit9c119ba54c0fcae72881948af3d37b47a2f8e1f9 (patch)
tree0be51b0bf02ece3bb32955e9d33a3998ecd57250 /net/netlink
parenta4b97f2054af2e411c414ed4cb5e1d0dbfd24a47 (diff)
parentfdd3d631cddad20ad9d3e1eb7dbf26825a8a121f (diff)
downloadlinux-stable-9c119ba54c0fcae72881948af3d37b47a2f8e1f9.tar.gz
linux-stable-9c119ba54c0fcae72881948af3d37b47a2f8e1f9.tar.bz2
linux-stable-9c119ba54c0fcae72881948af3d37b47a2f8e1f9.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index a4957bf2ca60..4c5972ba8c78 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -455,9 +455,14 @@ static int netlink_create(struct net *net, struct socket *sock, int protocol,
if (nl_table[protocol].registered &&
try_module_get(nl_table[protocol].module))
module = nl_table[protocol].module;
+ else
+ err = -EPROTONOSUPPORT;
cb_mutex = nl_table[protocol].cb_mutex;
netlink_unlock_table();
+ if (err < 0)
+ goto out;
+
err = __netlink_create(net, sock, cb_mutex, protocol);
if (err < 0)
goto out_module;