Re: [PATCH] virtlockd: acquire locks on re-exec

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

 



On Thu, Mar 01, 2018 at 04:42:36PM -0700, Jim Fehlig wrote:
Locks held by virtlockd are dropped on re-exec.

virtlockd       94306 POSIX 5.4G WRITE 0     0   0 /tmp/test.qcow2
virtlockd       94306 POSIX   5B WRITE 0     0   0 /run/virtlockd.pid
virtlockd       94306 POSIX   5B WRITE 0     0   0 /run/virtlockd.pid

Acquire locks in PostExecRestart code path.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---

The CLOEXEC flag is set in virLockSpaceNewPostExecRestart(), so I assume
it is fine to call virFileLock() here as well.


I'm not that familiar with the internals of virtlockd, but I can't think
of what commands would the daemon run.  So can't we just keep the fd's
without O_CLOEXEC?  If not, then we could at least remove the flag
before re-exec (in PreExec) and then set it again back after (in
PostExec).  But more opinions might be better.

Martin

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[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