From: Jiri Slaby <jirislaby@gmail.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] NET: ipv6, fix potential null dereference
Date: Sun, 10 Jan 2010 12:05:07 +0100 [thread overview]
Message-ID: <4B49B463.3010502@gmail.com> (raw)
In-Reply-To: <20100110104742.GC4769@x200>
On 01/10/2010 11:47 AM, Alexey Dobriyan wrote:
> On Sun, Jan 10, 2010 at 11:38:57AM +0100, Jiri Slaby wrote:
>> On 01/10/2010 11:35 AM, Alexey Dobriyan wrote:
>>>> Stanse found a potential null dereference
>>>
>>> Nobody learns from Coverity, it seems. :^)
>>
>> If it is known, why the test is still there?
>>
>> I don't have access to the Coverity results anyway.
>
> Well, when Coverity first exposed their database there were innumerable
> "potential NULL dereference" defects and people fixed them by moving
> stuff and most were bogus and there were flamewars and there were second
> wave and so on...
Well, it is a clear error. Either the check is superfluous, or there is
a potential NULL dereference.
And until people start to look at the reports for their stuff
themselves, they will get bogus fixes from others. And they have to nack
them, indeed.
While we are at it, could anybody look at (watch `task'):
int xprt_reserve_xprt(struct rpc_task *task)
{
struct rpc_rqst *req = task->tk_rqstp; <---- here
struct rpc_xprt *xprt = req->rq_xprt;
if (test_and_set_bit(XPRT_LOCKED, &xprt->state)) {
if (task == xprt->snd_task)
return 1;
if (task == NULL) <------- here
return 0;
And this (I checked 2.6.28, where netdev_priv was dev->priv):
static void __devexit de_remove_one (struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct de_private *de = netdev_priv(dev);
BUG_ON(!dev);
I know, currently netdev_priv returns dev+offset, but will this hold in
the future?
>>> snmp6_unregister_dev() always called with valid idev.
>
> irda patch is not right too: calling tty->ops->hook with NULL tty is
> impossible.
Yup, I somehow messed with tty->driver_data being NULL.
thanks,
--
js
next prev parent reply other threads:[~2010-01-10 11:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-10 10:35 [PATCH 1/1] NET: ipv6, fix potential null dereference Alexey Dobriyan
2010-01-10 10:38 ` Jiri Slaby
2010-01-10 10:47 ` Alexey Dobriyan
2010-01-10 11:05 ` Jiri Slaby [this message]
2010-01-10 11:37 ` Jiri Slaby
2010-01-10 10:43 ` [PATCH 1/1] NET: ipv6, remove unnecessary check Jiri Slaby
2010-01-10 21:28 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2010-01-10 9:06 [PATCH 1/1] NET: ipv6, fix potential null dereference Jiri Slaby
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=4B49B463.3010502@gmail.com \
--to=jirislaby@gmail.com \
--cc=adobriyan@gmail.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 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).