lkml.org 
[lkml]   [2008]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
FromAndi Kleen <>
SubjectRe: [PATCH] [8/18] BKL-removal: Remove BKL from remote_llseek
DateMon, 28 Jan 2008 03:43:27 +0100
On Sunday 27 January 2008 17:57:14 Steve French wrote:
> Don't you need to a spinlock/spinunlock(i_lock) or something similar
> (there isn't a spinlock in the file struct unfortunately) around the
> reads and writes from f_pos in fs/read_write.c in remote_llseek with
> your patch since the reads/writes from that field are not necessarily
> atomic and threads could be racing in seek on the same file struct?

Funny that you mention it. I actually noticed this too while working on this,
but noticed that it is wrong everywhere (as in even plain sys_write/read gets
it wrong). So I decided to not address it because it is already
broken.

I did actually send email to a few people about this, but no answer
yet.

I agree it's probably all broken on 32bit platforms, but I'm not
sure how to best address this. When it is comprehensively addressed remote_llseek
can use that new method too.

-Andi



\
 
 \ /
  Last update: 2008-01-28 03:47    [from the cache]
©2003-2010