login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
September
»
20
Re: [PATCH] Fix potential OOPS in generic_setlease()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Pavel Emelyanov
Subject:
Re: [PATCH] Fix potential OOPS in generic_setlease()
Date: Thursday, September 20, 2007 - 1:38 am
J. Bruce Fields wrote:
quoted text
> On Wed, Sep 19, 2007 at 06:26:05PM +0400, Pavel Emelyanov wrote: >> This code is run under lock_kernel(), which is dropped during >> sleeping operations, so the following race is possible: >> >> CPU1: CPU2: >> vfs_setlease(); vfs_setlease(); >> lock_kernel(); >> lock_kernel(); /* spin */ >> generic_setlease(): >> ... >> for (before = ...) >> /* here we found some lease after >> * which we will insert the new one >> */ >> fl = locks_alloc_lock(); >> /* go to sleep in this allocation and >> * drop the BKL >> */ >> generic_setlease(): >> ... >> for (before = ...) >> /* here we find the "before" pointing >> * at the one we found on CPU1 >> */ >> ->fl_change(my_before, arg); >> lease_modify(); >> locks_free_lock(); >> /* and we freed it */ >> ... >> unlock_kernel(); >> locks_insert_lock(before, fl); >> /* OOPS! We have just tried to add the lease >> * at the tail of already removed one >> */ > > Thanks for spotting this! > > But--careful-- it looks like "fl" is also used as a temporary variable > in a loop between the new and old location of that allocation. Isn't > that a bug?
OOPS! Good catch, thanks. I will resend the patch shortly. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] Fix potential OOPS in generic_setlease()
, Pavel Emelyanov
, (Wed Sep 19, 7:26 am)
Re: [PATCH] Fix potential OOPS in generic_setlease()
, J. Bruce Fields
, (Wed Sep 19, 12:30 pm)
Re: [PATCH] Fix potential OOPS in generic_setlease()
, Pavel Emelyanov
, (Thu Sep 20, 1:38 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Mathieu Desnoyers
[PATCH 01/10] local_t : architecture independant extension
Ingo Molnar
Re: 2.6.20-rc6-mm3
monstr
[PATCH 46/56] microblaze_v2: headers files entry.h current.h mman.h registers.h se...
alan
Re: Versioning file system
Jan Engelhardt
Re: Linux Security *Module* Framework (Was: LSM conversion to static interface)
git
:
Andy Parkins
git-fetch fails with error code 128
Johannes Sixt
Re: [PATCH v2 04/13] Teach rebase interactive the mark command
Yakov Lerner
Re: Autoconf/Automake
Miklos Vajna
Re: [IRC/patches] Failed octopus merge does not clean up
Johannes Sixt
Re: [msysGit] [PATCH 01/12] Fake reencoding success under NO_ICONV instead of retu...
linux-netdev
:
jamal
[net-next-2.6 PATCH 1/7] xfrm: introduce basic mark infrastructure
jamal
[net-next-2.6 PATCH 0/7] xfrm by MARK
Timo Teräs
ip xfrm policy semantics
Jeff Garzik
Re: [PATCH 1/5] sky2: phy setup changes
Ken-ichirou MATSUZAWA
Re: [PATCH] don't touch bridge sysfs in container.
git-commits-head
:
Linux Kernel Mailing List
No need to do lock_super() for exclusion in generic_shutdown_super()
Linux Kernel Mailing List
x86, msr: Export the register-setting MSR functions via /dev/*/msr
Linux Kernel Mailing List
MIPS: SMTC: Fix lockup in smtc_distribute_timer
Linux Kernel Mailing List
V4L/DVB (13840): smsusb: Add ISDB-T firmware for Hauppauge WinTV-Nova-T-MiniStick
Linux Kernel Mailing List
Input: gpio-keys - add support for disabling gpios through sysfs
openbsd-misc
:
Marco Peereboom
Re: Defending OpenBSD Performance
elitdostlar
Seks partneri arayan bayanlar bu adreste - 8878xs706x6438
Damon Schultz
Routing iTunes sharing across subnets using OpenBSD
Ashraf Cotu
Je sur comptable a la banque BCB je vais virée $6.million a la etranger
Chris Black
Re: carp, 2 router
Colocation donated by:
Syndicate