[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091226.201729.15225529.davem@davemloft.net>
Date: Sat, 26 Dec 2009 20:17:29 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: error27@...il.com
Cc: jarkao2@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [patch] hamradio: avoid null deref v2
From: Dan Carpenter <error27@...il.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@...il.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists