]> git.ipfire.org Git - thirdparty/lxc.git/commit
lxccontainer: fix F_OFD_GETLK checks 2526/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 14 Aug 2018 11:00:29 +0000 (13:00 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 14 Aug 2018 11:00:29 +0000 (13:00 +0200)
commitec74f3f859dbe04a62e7dcb169ce6a5baf81841b
tree71fac24d7b1e177a983003c1d193509436f9f85b
parent375121e4e0824201acf06e2bca9395927513020b
lxccontainer: fix F_OFD_GETLK checks

When we check whether an open file description lock has been taken on a file we
need to set the l_pid field to 0 otherwise the kernel will send back EINVAL.
Additionally, the kernel will not do pid translation and simply set the l_pid
value to -1.

Fixes https://discuss.linuxcontainers.org/t/container-deleted-or-stopped-when-lxc-ls-executed-concurrently/2439

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c