Re: [PATCH] resctrl: Do not open directory for writing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2020-07-10 at 15:13 +0200, Martin Kletzander wrote:
> On Fri, Jul 10, 2020 at 10:47:22AM +0200, Michal Privoznik wrote:
> > On 7/9/20 6:30 PM, Andrea Bolognani wrote:
> > > This is all bikeshedding, of course: what actually matters is making
> > > that lock exclusive once again :)
> > 
> > Just realized that for exclusive (aka write) lock, the FD must be opened
> > for writing (working on patches for the following report [1] and been
> > experimenting a bit and that's what I'm seeing).
> 
> Good point, but luckily not related to flock(2).

That seems to be the case: according to flock(2),

  A shared or exclusive lock can be placed on a file regardless
  of the mode in which the file was opened.

Michal, does that sound reasonable to you?

-- 
Andrea Bolognani / Red Hat / Virtualization




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux