From: Yoann Padioleau <padator@wanadoo.fr>
To: Eugene Surovegin <ebs@ebshome.net>
Cc: kernel-janitors@vger.kernel.org, jeff@garzik.org,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 06/13] dev->priv to netdev_priv(dev), for drivers/net/ibm_emac
Date: Fri, 03 Aug 2007 20:27:06 +0200 [thread overview]
Message-ID: <87ir7w324l.fsf_-_@wanadoo.fr> (raw)
In-Reply-To: <20070803174754.GA1352@gate.ebshome.net> (Eugene Surovegin's message of "Fri, 3 Aug 2007 10:47:54 -0700")
Eugene Surovegin <ebs@ebshome.net> writes:
> On Fri, Aug 03, 2007 at 07:34:19PM +0200, Yoann Padioleau wrote:
>>
>> Replacing accesses to dev->priv to netdev_priv(dev). The replacment
>> is safe when netdev_priv is used to access a private structure that is
>> right next to the net_device structure in memory. Cf
>> http://groups.google.com/group/comp.os.linux.development.system/browse_thread/thread/de19321bcd94dbb8/0d74a4adcd6177bd
>> This is the case when the net_device structure was allocated with
>> a call to alloc_netdev or one of its derivative.
>
> NAK.
>
> While that assumption is correct for the actual emac net device, it's
> not for MAL poll one.
I forgot to add another condition in my semantic patch.
I was looking only for xxx->priv = yyy;
with this rule:
@ danger @
struct net_device *dev;
expression E;
@@
dev->priv = E
whereas sometimes it's written xxx.priv = yyy;
as in ibm_emac_mal ( mal->poll_dev.priv = mal; )
By adding the following rule in my semantic patch I correctly
_dont_ modify anything under drivers/net/ibm_emac
@ danger @
struct net_device dev;
expression E;
@@
dev.priv = E
It's also the case for drivers/net/e1000/e1000_main.c.
>
> You patch breaks a working driver.
>
> --
> Eugene
prev parent reply other threads:[~2007-08-03 18:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 17:34 [PATCH 06/13] dev->priv to netdev_priv(dev), for drivers/net/ibm_emac Yoann Padioleau
2007-08-03 17:47 ` Eugene Surovegin
2007-08-03 18:27 ` Yoann Padioleau [this message]
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=87ir7w324l.fsf_-_@wanadoo.fr \
--to=padator@wanadoo.fr \
--cc=akpm@linux-foundation.org \
--cc=ebs@ebshome.net \
--cc=jeff@garzik.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@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