lkml.org 
[lkml]   [2017]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] drop_monitor: consider inserted data in genlmsg_end
From
From: Reiter Wolfgang <wr0112358@gmail.com>
Date: Tue, 3 Jan 2017 00:34:10 +0100

> Final nlmsg_len field update must reflect inserted net_dm_drop_point
> data.
>
> This patch depends on previous patch:
> "drop_monitor: add missing call to genlmsg_end"
>
> Signed-off-by: Reiter Wolfgang <wr0112358@gmail.com>

Several coding style errors:

> @@ -112,6 +111,12 @@ static struct sk_buff *reset_per_cpu_data(struct per_cpu_dm_data *data)
> swap(data->skb, skb);
> spin_unlock_irqrestore(&data->lock, flags);
>
> + if(skb) {

There must be a space between "if" and "(skb)"

> + struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data;
> + struct genlmsghdr *gnlh = (struct genlmsghdr *)nlmsg_data(nlh);
> + genlmsg_end(skb, genlmsg_data(gnlh));
> + }

There should be an empty line between the local variable declarations
and actual code.

\
 
 \ /
  Last update: 2017-01-03 01:35    [W:0.086 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site