From: Artem Bityutskiy <dedekind1@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org, Arnd Bergmann <arnd@arndb.de>,
LKML <linux-kernel@vger.kernel.org>,
ALan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [patch 4/5] mtd: Remove BKL and convert to unlocked_ioctl
Date: Fri, 16 Oct 2009 09:44:00 +0300 [thread overview]
Message-ID: <1255675440.32489.311.camel@localhost> (raw)
In-Reply-To: <20091015202758.523050101@linutronix.de>
On Thu, 2009-10-15 at 20:28 +0000, Thomas Gleixner wrote:
> plain text document attachment
> (mtd-remove-bkl-and-convert-to-unlocked-ioctl.patch)
> mtd_open() got lock/unlock kernel from the big BKL push down, but it
> never relied on the BKL serialization as get_mtd_device() takes care
> of serialization vs. device init/teardown.
>
> mtd_ioctl() is safe w/o the BKL as well. The data which is copied from
> the mtd data structure is either set up during device initialization
> or statistics which have never been protected by the BKL against
> concurrent modification. The mtd functions which are called from
> various ioctl commands are safe as well.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: linux-mtd@lists.infradead.org
> ---
> drivers/mtd/mtdchar.c | 30 ++++++++----------------------
> 1 file changed, 8 insertions(+), 22 deletions(-)
[dedekind@eru l2-mtd-2.6.git]$ make -j8
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC [M] drivers/mtd/mtdchar.o
drivers/mtd/mtdchar.c: In function ‘mtd_compat_ioctl’:
drivers/mtd/mtdchar.c:865: warning: passing argument 1 of ‘mtd_ioctl’ from incompatible pointer type
drivers/mtd/mtdchar.c:444: note: expected ‘struct file *’ but argument is of type ‘struct inode *’
drivers/mtd/mtdchar.c:865: warning: passing argument 2 of ‘mtd_ioctl’ makes integer from pointer without a cast
drivers/mtd/mtdchar.c:444: note: expected ‘u_int’ but argument is of type ‘struct file *’
drivers/mtd/mtdchar.c:865: error: too many arguments to function ‘mtd_ioctl’
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
WARNING: multiple messages have this Message-ID (diff)
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
ALan Cox <alan@lxorguk.ukuu.org.uk>,
Arnd Bergmann <arnd@arndb.de>,
David Woodhouse <dwmw2@infradead.org>,
linux-mtd@lists.infradead.org
Subject: Re: [patch 4/5] mtd: Remove BKL and convert to unlocked_ioctl
Date: Fri, 16 Oct 2009 09:44:00 +0300 [thread overview]
Message-ID: <1255675440.32489.311.camel@localhost> (raw)
In-Reply-To: <20091015202758.523050101@linutronix.de>
On Thu, 2009-10-15 at 20:28 +0000, Thomas Gleixner wrote:
> plain text document attachment
> (mtd-remove-bkl-and-convert-to-unlocked-ioctl.patch)
> mtd_open() got lock/unlock kernel from the big BKL push down, but it
> never relied on the BKL serialization as get_mtd_device() takes care
> of serialization vs. device init/teardown.
>
> mtd_ioctl() is safe w/o the BKL as well. The data which is copied from
> the mtd data structure is either set up during device initialization
> or statistics which have never been protected by the BKL against
> concurrent modification. The mtd functions which are called from
> various ioctl commands are safe as well.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: linux-mtd@lists.infradead.org
> ---
> drivers/mtd/mtdchar.c | 30 ++++++++----------------------
> 1 file changed, 8 insertions(+), 22 deletions(-)
[dedekind@eru l2-mtd-2.6.git]$ make -j8
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC [M] drivers/mtd/mtdchar.o
drivers/mtd/mtdchar.c: In function ‘mtd_compat_ioctl’:
drivers/mtd/mtdchar.c:865: warning: passing argument 1 of ‘mtd_ioctl’ from incompatible pointer type
drivers/mtd/mtdchar.c:444: note: expected ‘struct file *’ but argument is of type ‘struct inode *’
drivers/mtd/mtdchar.c:865: warning: passing argument 2 of ‘mtd_ioctl’ makes integer from pointer without a cast
drivers/mtd/mtdchar.c:444: note: expected ‘u_int’ but argument is of type ‘struct file *’
drivers/mtd/mtdchar.c:865: error: too many arguments to function ‘mtd_ioctl’
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
next prev parent reply other threads:[~2009-10-16 6:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 20:28 [patch 0/5] BKL another bunch Thomas Gleixner
2009-10-15 20:28 ` [lm-sensors] [patch 1/5] hwmon: Convert fschmd to unlocked_ioctl Thomas Gleixner
2009-10-15 20:28 ` Thomas Gleixner
2009-11-06 13:15 ` [lm-sensors] " Jean Delvare
2009-11-06 13:15 ` Jean Delvare
2009-11-06 13:22 ` Arnd Bergmann
2009-11-06 13:22 ` Arnd Bergmann
2009-11-06 13:31 ` Jean Delvare
2009-11-06 13:31 ` Jean Delvare
2009-11-06 13:36 ` Hans de Goede
2009-11-06 13:36 ` Hans de Goede
2009-11-06 13:37 ` Arnd Bergmann
2009-11-06 13:37 ` Arnd Bergmann
2009-11-06 13:35 ` Hans de Goede
2009-11-06 13:35 ` Hans de Goede
2009-11-06 15:56 ` Thomas Gleixner
2009-11-06 15:56 ` Thomas Gleixner
2009-12-17 13:12 ` Jean Delvare
2009-12-17 13:12 ` Jean Delvare
2009-10-15 20:28 ` [patch 2/5] macintosh: Remove BKL from nvram driver Thomas Gleixner
2009-10-15 20:28 ` Thomas Gleixner
2009-10-15 20:28 ` [patch 3/5] sunrpc: Convert to unlocked_ioctl and remove stray smp_lock.h Thomas Gleixner
2009-10-15 20:28 ` [patch 4/5] mtd: Remove BKL and convert to unlocked_ioctl Thomas Gleixner
2009-10-15 20:28 ` Thomas Gleixner
2009-10-16 6:44 ` Artem Bityutskiy [this message]
2009-10-16 6:44 ` Artem Bityutskiy
2009-10-20 5:27 ` Thomas Gleixner
2009-10-20 5:27 ` Thomas Gleixner
2009-10-15 20:28 ` [patch 5/5] bluetooth: Remove stub ioctl in hci_vhci Thomas Gleixner
2009-10-15 20:28 ` Thomas Gleixner
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=1255675440.32489.311.camel@localhost \
--to=dedekind1@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arnd@arndb.de \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.