|
@@ -455,9 +455,14 @@ static int netlink_create(struct net *net, struct socket *sock, int protocol,
|
|
if (nl_table[protocol].registered &&
|
|
if (nl_table[protocol].registered &&
|
|
try_module_get(nl_table[protocol].module))
|
|
try_module_get(nl_table[protocol].module))
|
|
module = nl_table[protocol].module;
|
|
module = nl_table[protocol].module;
|
|
|
|
+ else
|
|
|
|
+ err = -EPROTONOSUPPORT;
|
|
cb_mutex = nl_table[protocol].cb_mutex;
|
|
cb_mutex = nl_table[protocol].cb_mutex;
|
|
netlink_unlock_table();
|
|
netlink_unlock_table();
|
|
|
|
|
|
|
|
+ if (err < 0)
|
|
|
|
+ goto out;
|
|
|
|
+
|
|
err = __netlink_create(net, sock, cb_mutex, protocol);
|
|
err = __netlink_create(net, sock, cb_mutex, protocol);
|
|
if (err < 0)
|
|
if (err < 0)
|
|
goto out_module;
|
|
goto out_module;
|