From: Arnd Bergmann <arnd@arndb•de>
To: Jeff Garzik <jeff@garzik•org>
Cc: David Miller <davem@davemloft•net>,
netdev@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>,
Andrew Morton <akpm@linux-foundation•org>
Subject: Re: [PATCH] net/core: split dev_ifsioc() according to locking
Date: Sun, 7 Oct 2007 02:17:08 +0200 [thread overview]
Message-ID: <200710070217.09073.arnd@arndb.de> (raw)
In-Reply-To: <20071006204212.GA32177@havoc.gtf.org>
On Saturday 06 October 2007, Jeff Garzik wrote:
>
> This always bugged me: dev_ioctl() called dev_ifsioc() either inside
> read_lock(dev_base_lock) or rtnl_lock(), depending on the ioctl being
> executed.
>
> This change moves the ioctls executed inside dev_base_lock to a new
> function, dev_ifsioc_locked(). Now the locking context is completely
> clear to the reader.
>
> Signed-off-by: Jeff Garzik <jgarzik@redhat•com>
Great idea!
I've been experimenting with a new compat_dev_ioctl() function along
the lines of what I just posted for the blkdev ioctls. For that, it
would be perfect to streamline dev_ioctl further:
* move the dev_load() and locking into dev_ifsioc{,_locked}
* move the copy_to_user step to a single place at the end of dev_ioctl
After that, we could have very simple dev_ioctl and compat_dev_ioctl
functions calling the same dev_ifsioc{,_locked} functions.
Arnd <><
next prev parent reply other threads:[~2007-10-07 0:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-06 20:42 [PATCH] net/core: split dev_ifsioc() according to locking Jeff Garzik
2007-10-07 0:17 ` Arnd Bergmann [this message]
2007-10-08 7:06 ` 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=200710070217.09073.arnd@arndb.de \
--to=arnd@arndb$(echo .)de \
--cc=akpm@linux-foundation$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=jeff@garzik$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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