* [PATCH 2/2 net-next] net/ncsi: unlock on error in ncsi_set_interface_nl()
@ 2018-03-08 9:36 Dan Carpenter
2018-03-09 2:50 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-03-08 9:36 UTC (permalink / raw)
To: David S. Miller, Samuel Mendoza-Jonas; +Cc: netdev, kernel-janitors
There are two error paths which are missing unlocks in this function.
Fixes: 955dc68cb9b2 ("net/ncsi: Add generic netlink family")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/net/ncsi/ncsi-netlink.c b/net/ncsi/ncsi-netlink.c
index b73239b76349..05fcfb4fbe1d 100644
--- a/net/ncsi/ncsi-netlink.c
+++ b/net/ncsi/ncsi-netlink.c
@@ -299,6 +299,7 @@ static int ncsi_set_interface_nl(struct sk_buff *msg, struct genl_info *info)
package = np;
if (!package) {
/* The user has set a package that does not exist */
+ spin_unlock_irqrestore(&ndp->lock, flags);
return -ERANGE;
}
@@ -317,6 +318,7 @@ static int ncsi_set_interface_nl(struct sk_buff *msg, struct genl_info *info)
/* The user has set a channel that does not exist on this
* package
*/
+ spin_unlock_irqrestore(&ndp->lock, flags);
netdev_info(ndp->ndev.dev, "NCSI: Channel %u does not exist!\n",
channel_id);
return -ERANGE;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2 net-next] net/ncsi: unlock on error in ncsi_set_interface_nl()
2018-03-08 9:36 [PATCH 2/2 net-next] net/ncsi: unlock on error in ncsi_set_interface_nl() Dan Carpenter
@ 2018-03-09 2:50 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-03-09 2:50 UTC (permalink / raw)
To: dan.carpenter; +Cc: sam, netdev, kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 8 Mar 2018 12:36:28 +0300
> There are two error paths which are missing unlocks in this function.
>
> Fixes: 955dc68cb9b2 ("net/ncsi: Add generic netlink family")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Also applied, thanks Dan.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-09 2:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-08 9:36 [PATCH 2/2 net-next] net/ncsi: unlock on error in ncsi_set_interface_nl() Dan Carpenter
2018-03-09 2:50 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).