Commit 70bfa2d2 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

dcb: unlock on error in dcbnl_ieee_get()

There is a "goto nla_put_failure" hidden inside the NLA_PUT() macro, but
we're holding the dcb_lock so we need to unlock first.
Signed-off-by: default avatarDan Carpenter <>
Signed-off-by: default avatarDavid S. Miller <>
parent 0c661001
......@@ -1264,9 +1264,14 @@ static int dcbnl_ieee_get(struct net_device *netdev, struct nlattr **tb,
list_for_each_entry(itr, &dcb_app_list, list) {
if (strncmp(itr->name, netdev->name, IFNAMSIZ) == 0)
sizeof(itr->app), &itr->app);
if (strncmp(itr->name, netdev->name, IFNAMSIZ) == 0) {
err = nla_put(skb, DCB_ATTR_IEEE_APP, sizeof(itr->app),
if (err) {
goto nla_put_failure;
nla_nest_end(skb, app);
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