| To: | Jonathan Corbet <corbet@xxxxxxx> |
|---|---|
| Subject: | Re: [xfs-masters] RFC: Fix f_flags races without the BKL |
| From: | Christoph Hellwig <hch@xxxxxx> |
| Date: | Mon, 29 Dec 2008 13:50:50 +0100 |
| Cc: | LKML <linux-kernel@xxxxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>, bfields@xxxxxxxxxxxx, xfs-masters@xxxxxxxxxxx, Andi Kleen <andi@xxxxxxxxxxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> |
| In-reply-to: | <20081229041352.6bbdf57c@tpl> |
| References: | <20081229041352.6bbdf57c@tpl> |
| User-agent: | Mutt/1.3.28i |
On Mon, Dec 29, 2008 at 04:13:52AM -0700, Jonathan Corbet wrote: > Accesses to the f_flags field have always involved a read-modify-write > operation, and have always been racy in the absence of the BKL. The recent > BKL-removal work made this problem worse, but it has been there for a very > long time. The race is quite small, and, arguably, has never affected > anybody, but it's still worth fixing. > > After pondering for a while, I couldn't come up with anything better than a > global file->f_flags mutex. There's no point in bloating struct file with > a mutex just for this purpose; it's hard to imagine that there will be any > real contention for this lock. What speaks against having on in fs_struct so that it's at least not globally serialized? |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: RFC: Fix f_flags races without the BKL, Oleg Nesterov |
|---|---|
| Next by Date: | Re: [xfs-masters] RFC: Fix f_flags races without the BKL, Andi Kleen |
| Previous by Thread: | Re: RFC: Fix f_flags races without the BKL, Andi Kleen |
| Next by Thread: | Re: [xfs-masters] RFC: Fix f_flags races without the BKL, Andi Kleen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |