summaryrefslogtreecommitdiffstats
path: root/net/dcb/dcbnl.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-12 13:22:22 +0100
committerThomas Gleixner <tglx@linutronix.de>2011-03-12 13:22:28 +0100
commitcfe08bba1e0017d94a8f738a195d3a2b479327e3 (patch)
tree4546939fd9fbddc978b6eaa0299b03177e9e643b /net/dcb/dcbnl.c
parent58bff947e2d164c7e5cbf7f485e4b3d4884befeb (diff)
parentabb0052289e58140d933b29491f59e4be0a19727 (diff)
Merge branch 'x86/apic' into x86/irq
Reason: Update to latest genirq code conflicts with pending apic changes Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'net/dcb/dcbnl.c')
-rw-r--r--net/dcb/dcbnl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
index 6b03f561cae..d5074a56728 100644
--- a/net/dcb/dcbnl.c
+++ b/net/dcb/dcbnl.c
@@ -626,6 +626,9 @@ static int dcbnl_getapp(struct net_device *netdev, struct nlattr **tb,
dcb->cmd = DCB_CMD_GAPP;
app_nest = nla_nest_start(dcbnl_skb, DCB_ATTR_APP);
+ if (!app_nest)
+ goto out_cancel;
+
ret = nla_put_u8(dcbnl_skb, DCB_APP_ATTR_IDTYPE, idtype);
if (ret)
goto out_cancel;
@@ -1613,6 +1616,10 @@ EXPORT_SYMBOL(dcb_getapp);
u8 dcb_setapp(struct net_device *dev, struct dcb_app *new)
{
struct dcb_app_type *itr;
+ struct dcb_app_type event;
+
+ memcpy(&event.name, dev->name, sizeof(event.name));
+ memcpy(&event.app, new, sizeof(event.app));
spin_lock(&dcb_lock);
/* Search for existing match and replace */
@@ -1644,7 +1651,7 @@ u8 dcb_setapp(struct net_device *dev, struct dcb_app *new)
}
out:
spin_unlock(&dcb_lock);
- call_dcbevent_notifiers(DCB_APP_EVENT, new);
+ call_dcbevent_notifiers(DCB_APP_EVENT, &event);
return 0;
}
EXPORT_SYMBOL(dcb_setapp);