From: David Miller <davem@davemloft.net>
To: error27@gmail.com
Cc: jarkao2@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] hamradio: avoid null deref v2
Date: Sat, 26 Dec 2009 20:17:29 -0800 (PST) [thread overview]
Message-ID: <20091226.201729.15225529.davem@davemloft.net> (raw)
In-Reply-To: <20091226123812.GB6075@bicker>
From: Dan Carpenter <error27@gmail.com>
Date: Sat, 26 Dec 2009 14:38:12 +0200
> Bump the stats on the original dev not on the newly assigned NULL version of
> dev.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
This doesn't look real nice.
The bpq_get_ether_dev() abstraction exists so that the details of
bpq->this and bpq->that are hidden behind it.
Exposing those details inline just to fix this bug makes the
abstraction significantly less useful, and the code more ugly.
Please just create an "orig_dev" pointer to save the original device
in, and use it to fix this problem properly.
That way you only fetch the bpq ether device pointer via the
abstraction interface.
And BTW, this is how other reviewers told you to implement this
fix. :-)
Thanks.
next prev parent reply other threads:[~2009-12-27 4:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 13:25 [patch] hamradio: avoid null deref Dan Carpenter
2009-12-23 17:47 ` Jarek Poplawski
2009-12-23 21:32 ` David Miller
2009-12-26 12:38 ` [patch] hamradio: avoid null deref v2 Dan Carpenter
2009-12-27 4:17 ` David Miller [this message]
2009-12-28 16:54 ` [patch] hamradio: avoid null deref v3 Dan Carpenter
2010-01-04 5:44 ` 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=20091226.201729.15225529.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=error27@gmail.com \
--cc=jarkao2@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).