From: Joe Perches <joe@perches.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
John Fastabend <john.r.fastabend@intel.com>
Subject: Re: [PATCH net-next-2.6] net_sched: sch_mqprio: dont leak kernel memory
Date: Wed, 26 Jan 2011 09:43:43 -0800 [thread overview]
Message-ID: <1296063823.6115.37.camel@Joe-Laptop> (raw)
In-Reply-To: <1296062517.2899.86.camel@edumazet-laptop>
On Wed, 2011-01-26 at 18:21 +0100, Eric Dumazet wrote:
> mqprio_dump() should make sure all fields of struct tc_mqprio_qopt are
> initialized.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: John Fastabend <john.r.fastabend@intel.com>
> ---
> net/sched/sch_mqprio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c
> index fbc6f53..effd4ee 100644
> --- a/net/sched/sch_mqprio.c
> +++ b/net/sched/sch_mqprio.c
> @@ -215,7 +215,7 @@ static int mqprio_dump(struct Qdisc *sch, struct sk_buff *skb)
> struct net_device *dev = qdisc_dev(sch);
> struct mqprio_sched *priv = qdisc_priv(sch);
> unsigned char *b = skb_tail_pointer(skb);
> - struct tc_mqprio_qopt opt;
> + struct tc_mqprio_qopt opt = { 0 };
I think the best style to use memset so that any
possible struct padding is guaranteed to be zeroed.
next prev parent reply other threads:[~2011-01-26 17:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 17:21 [PATCH net-next-2.6] net_sched: sch_mqprio: dont leak kernel memory Eric Dumazet
2011-01-26 17:43 ` Joe Perches [this message]
2011-01-26 17:49 ` Eric Dumazet
2011-01-26 17:56 ` Joe Perches
2011-01-26 19:56 ` David Miller
2011-01-27 11:17 ` Pádraig Brady
2011-01-26 19:55 ` David Miller
2011-01-26 20:23 ` Eric Dumazet
2011-01-26 20:25 ` Eric Dumazet
2011-01-26 21:24 ` Joe Perches
2011-01-26 21:28 ` Eric Dumazet
2011-01-26 21:33 ` Joe Perches
2011-01-27 6:04 ` Joe Perches
2011-01-27 6:54 ` Changli Gao
2011-01-27 7:04 ` Eric Dumazet
2011-01-26 21:15 ` 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=1296063823.6115.37.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.