lkml.org 
[lkml]   [2015]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5] fs: clear file privilege bits when mmap writing
On Thu, Dec 10, 2015 at 07:16:11PM +0100, Willy Tarreau wrote:

> > Is f_flags safe to write like this without holding a lock?
>
> Unfortunately I have no idea. I've seen places where it's written without
> taking a lock such as in blkdev_open() and I don't think that this one is
> called with a lock held.

In any ->open() we obviously have nobody else able to find that struct file,
let alone modify it, so there the damn thing is essentially caller-private
and no locking is needed.


\
 
 \ /
  Last update: 2015-12-10 21:01    [W:2.681 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site