David Howells
fb5bb2c3b7
ovl: Warn on copy up if a process has a R/O fd open to the lower file
...
Print a warning when overlayfs copies up a file if the process that
triggered the copy up has a R/O fd open to the lower file being copied up.
This can help catch applications that do things like the following:
fd1 = open("foo", O_RDONLY);
fd2 = open("foo", O_RDWR);
where they expect fd1 and fd2 to refer to the same file - which will no
longer be the case post-copy up.
With this patch, the following commands:
bash 5</mnt/a/foo128
6<>/mnt/a/foo128
assuming /mnt/a/foo128 to be an un-copied up file on an overlay will
produce the following warning in the kernel log:
overlayfs: Copying up foo129, but open R/O on fd 5 which will cease
to be coherent [pid=3818 bash]
This is enabled by setting:
/sys/module/overlay/parameters/check_copy_up
to 1.
The warnings are ratelimited and are also limited to one warning per file -
assuming the copy up completes in each case.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2016-03-21 17:31:45 +01:00
..
2016-01-22 18:04:28 -05:00
2016-01-20 17:09:18 -08:00
2016-02-20 00:15:51 -05:00
2016-01-22 18:04:28 -05:00
2016-03-19 18:52:29 -07:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2016-03-17 15:09:34 -07:00
2016-02-01 12:30:10 -05:00
2016-03-19 18:52:29 -07:00
2016-03-19 18:52:29 -07:00
2016-01-23 12:24:56 -08:00
2016-03-19 18:52:29 -07:00
2015-12-08 22:41:36 -05:00
2016-01-22 18:04:28 -05:00
2016-02-06 23:45:46 -08:00
2016-03-17 16:38:36 -07:00
2016-03-19 18:52:29 -07:00
2016-02-10 16:25:52 +00:00
2016-01-14 16:00:49 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-03-17 16:31:18 -07:00
2016-03-17 16:31:18 -07:00
2016-01-27 20:35:55 +08:00
2016-01-22 18:04:28 -05:00
2015-12-08 22:41:36 -05:00
2015-11-11 02:11:02 -05:00
2016-01-22 18:04:28 -05:00
2016-03-17 16:51:32 -07:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-02-27 19:15:51 -05:00
2016-01-22 18:04:28 -05:00
2016-01-14 16:00:49 -08:00
2016-03-13 17:38:20 -04:00
2016-03-11 10:13:49 -08:00
2016-01-22 18:04:28 -05:00
2016-02-07 20:21:35 -08:00
2016-01-07 10:10:50 -05:00
2016-01-22 18:04:28 -05:00
2016-01-14 16:00:49 -08:00
2016-03-07 22:25:16 -05:00
2016-03-19 18:52:29 -07:00
2015-08-13 10:22:06 -04:00
2016-03-19 18:52:29 -07:00
2016-03-17 15:09:34 -07:00
2016-02-18 16:23:24 -08:00
2016-01-22 18:04:28 -05:00
2016-03-17 16:25:46 -07:00
2015-05-28 18:25:19 -07:00
2016-01-14 16:00:49 -08:00
2016-03-21 17:31:45 +01:00
2016-03-17 15:09:34 -07:00
2016-03-10 09:43:36 -08:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2016-03-14 00:16:48 -04:00
2015-12-08 22:41:36 -05:00
2016-01-22 18:04:28 -05:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2015-11-13 21:53:18 -08:00
2016-01-14 16:00:49 -08:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-01-23 12:24:56 -08:00
2016-01-14 16:00:49 -08:00
2016-03-15 16:55:16 -07:00
2015-09-04 16:54:41 -07:00
2016-01-22 18:04:28 -05:00
2015-12-06 21:17:14 -05:00
2015-11-10 12:07:22 -08:00
2016-02-27 10:28:52 -08:00
2016-01-22 18:04:28 -05:00
2016-03-18 16:43:11 -07:00
2016-03-15 16:55:16 -07:00
2015-08-05 13:49:35 -07:00
2016-02-14 14:25:59 -08:00
2016-01-04 10:28:32 -05:00
2016-01-20 17:09:18 -08:00
2016-03-09 15:43:42 -08:00
2016-03-14 00:17:38 -04:00
2016-03-19 18:52:29 -07:00
2015-08-17 18:39:46 -04:00
2015-12-08 14:52:03 +01:00
2016-03-17 15:09:34 -07:00
2016-02-21 09:06:10 -05:00
2016-01-09 02:55:37 -05:00
2015-06-02 10:29:07 -07:00
2015-08-07 04:39:40 +03:00
2016-01-14 16:00:49 -08:00
2016-01-19 12:02:23 -05:00
2015-04-09 11:39:55 -05:00
2016-03-03 14:42:50 -07:00
2016-02-16 14:57:21 -07:00
2016-01-08 21:20:11 -05:00
2016-01-22 18:04:28 -05:00
2016-01-15 17:56:32 -08:00
2015-04-14 16:49:05 -07:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-02-22 22:35:22 -05:00
2016-02-22 22:44:04 -05:00
2015-06-30 19:44:56 -07:00
2016-03-15 16:55:16 -07:00
2016-03-14 00:16:33 -04:00
2016-01-22 18:04:28 -05:00
2015-09-11 15:21:34 -07:00
2016-01-22 18:04:28 -05:00
2016-01-19 19:25:21 -05:00
2016-02-20 00:15:52 -05:00
2015-07-22 20:33:27 -05:00
2015-12-13 19:46:12 -05:00
2016-03-16 13:09:08 -04:00
2016-03-18 16:07:38 -04:00
2016-01-22 18:04:28 -05:00
2016-03-17 15:09:34 -07:00
2015-11-06 17:50:42 -08:00
2015-08-07 04:39:40 +03:00
2016-03-18 16:07:38 -04:00
2016-01-16 11:17:23 -08:00
2016-03-03 14:42:50 -07:00
2015-11-06 17:50:42 -08:00
2016-01-17 11:13:55 +01:00
2016-03-02 09:03:18 -08:00
2016-01-22 18:04:28 -05:00
2016-02-20 00:15:51 -05:00