[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87fx3jqpi3.fsf@basil.nowhere.org>
Date: Mon, 29 Mar 2010 14:30:28 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Jiri Kosina <jkosina@...e.cz>,
Frederic Weisbecker <fweisbec@...il.com>,
linux-kernel@...r.kernel.org, Matthew Wilcox <matthew@....cx>,
Thomas Gleixner <tglx@...utronix.de>, jblunck@...e.de,
Alan Cox <alan@...ux.intel.com>, Ingo Molnar <mingo@...e.hu>,
gregkh@...e.de
Subject: Re: [GIT, RFC] Killing the Big Kernel Lock II
Arnd Bergmann <arnd@...db.de> writes:
>> - The seek function in uhci-debug.c probably is still racy.
>
> That function could be removed in favor of using generic_file_ioctl
> and setting i_size to up->size.
Does that lock against read in libfs?
> Also, the race is only between concurrent calls of llseek on
> the same file descriptor, which is undefined anyway.
> The current code also doesn't protect you against partial updates
> of f_pos during ->read() on 32 bit systems (nothing ever does),
That is not what I meant.
> and it even fails to protect against the concurrent llseek race
> because the assignment is done outside of the f_pos update.
I wasn't sure it would protect against parallel reads.
Does it?
> The patch looks correct, but I probably wouldn't bother with the rename,
> and simply drop the BKL in the caller.
I think a rename is better, I take compile errors over subtle
breakage any day.
>>Author: Andi Kleen <ak@...ux.intel.com>
>>Date: Mon Mar 29 01:15:32 2010 +0200
>>
>> USB-BKL: Remove BKL from usb serial drivers ioctl handlers
>>
>> I audited all the low level serial ioctl handlers and none of them
>> actually need the BKL.
>>
>> To make sure all code is checked change the usb_serial_driver ->ioctl
>> field to ->unlocked_ioctl
>>
>> Note this is still called for now with BKL held because tty drivers
>> don't have a ->unlocked_ioctl from the tty layer in mainline.
>> This could be trivially changed now though.
>>
>> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
>
> The serial_ioctl function is already called without the BKL, depite the
> name. tty_operations->ioctl was converted a long time ago, so I guess this
> patch can be dropped from your series.
Ok.
-Andi
--
ak@...ux.intel.com -- Speaking for myself only.
--
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