login
Header Space

 
 

Re: [PATCH] [8/18] BKL-removal: Remove BKL from remote_llseek

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Trond Myklebust <Trond.Myklebust@...>
Cc: Steve French <smfrench@...>, <swhiteho@...>, <sfrench@...>, <vandrove@...>, <linux-kernel@...>, <linux-fsdevel@...>, <akpm@...>
Date: Sunday, January 27, 2008 - 10:58 pm

On Monday 28 January 2008 00:08:56 Trond Myklebust wrote:

The problem is that it's not a race in who gets to do its thing first, but a 
parallel reader can actually see a corrupted value from the two independent 
words on 32bit (e.g. during a 4GB). And this could actually completely corrupt 
f_pos when it happens with two racing relative seeks or read/write()s

I would consider that a bug.

Fixes would be either to always take a spinlock to update this (nasty on 
platforms where spinlocks are expensive like P4) or define some architecture
specific way to read/write 64bit values consistently. In theory also some
lazy locking seqlock like mechanism could be used, but that had the disadvantage
of being theoretically starvable.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] [8/18] BKL-removal: Remove BKL from remote_llseek, Andi Kleen, (Sun Jan 27, 10:58 pm)
Re: [PATCH] [8/18] BKL-removal: Remove BKL from remote_llseek, Trond Myklebust, (Mon Jan 28, 12:13 am)
Re: [PATCH] [8/18] BKL-removal: Remove BKL from remote_llseek, Trond Myklebust, (Mon Jan 28, 12:51 am)
[PATCH] [13/18] BKL-removal: Add compat_ioctl for cifs, Andi Kleen, (Sat Jan 26, 10:17 pm)
[PATCH] [4/18] ext3: Remove incorrect BKL comment, Andi Kleen, (Sat Jan 26, 10:17 pm)
[PATCH] [14/18] BKL-removal: Add unlocked_fasync, Andi Kleen, (Sat Jan 26, 10:17 pm)
Re: [PATCH] [14/18] BKL-removal: Add unlocked_fasync, KOSAKI Motohiro, (Sun Jan 27, 3:05 am)
[PATCH] [9/18] BKL-removal: Use unlocked_ioctl for jfs, Andi Kleen, (Sat Jan 26, 10:17 pm)
speck-geostationary