From: Neil Horman <nhorman@tuxdriver.com>
To: Reiter Wolfgang <wr0112358@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drop_monitor: consider inserted data in genlmsg_end
Date: Tue, 3 Jan 2017 08:09:25 -0500 [thread overview]
Message-ID: <20170103130925.GA11735@hmsreliant.think-freely.org> (raw)
In-Reply-To: <20170103003910.8984-1-wr0112358@gmail.com>
On Tue, Jan 03, 2017 at 01:39:10AM +0100, Reiter Wolfgang wrote:
> 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>
> ---
> net/core/drop_monitor.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
> index f465bad..fb55327 100644
> --- a/net/core/drop_monitor.c
> +++ b/net/core/drop_monitor.c
> @@ -102,7 +102,6 @@ static struct sk_buff *reset_per_cpu_data(struct per_cpu_dm_data *data)
> }
> msg = nla_data(nla);
> memset(msg, 0, al);
> - genlmsg_end(skb, msg_header);
> goto out;
>
> err:
> @@ -112,6 +111,13 @@ 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) {
> + struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data;
> + struct genlmsghdr *gnlh = (struct genlmsghdr *)nlmsg_data(nlh);
> +
> + genlmsg_end(skb, genlmsg_data(gnlh));
> + }
> +
> return skb;
> }
>
> --
> 2.9.3
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
next prev parent reply other threads:[~2017-01-03 13:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-03 0:39 [PATCH] drop_monitor: consider inserted data in genlmsg_end Reiter Wolfgang
2017-01-03 13:09 ` Neil Horman [this message]
2017-01-03 14:54 ` David Miller
2017-01-03 16:04 ` Neil Horman
2017-01-03 16:10 ` David Miller
2017-01-03 23:09 ` Wolfgang Reiter
-- strict thread matches above, loose matches on Subject: below --
2017-01-02 23:34 Reiter Wolfgang
2017-01-03 0:30 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170103130925.GA11735@hmsreliant.think-freely.org \
--to=nhorman@tuxdriver.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wr0112358@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox