Ilya Maximets
53af5b1e0a
vhost: fix leak of file descriptors
While migration of vhost-user device QEMU allocates memfd
to store information about dirty pages and sends fd to
vhost-user process.
File descriptor for this memory should be closed to prevent
"Too many open files" error for vhost-user process after
some amount of migrations.
Ex.:
# ls /proc/<ovs-vswitchd pid>/fd/ -alh
total 0
root qemu .
root qemu ..
root qemu 0 -> /dev/pts/0
root qemu 1 -> pipe:[1804353]
root qemu 10 -> socket:[1782240]
root qemu 100 -> /memfd:vhost-log (deleted)
root qemu 1000 -> /memfd:vhost-log (deleted)
root qemu 1001 -> /memfd:vhost-log (deleted)
root qemu 1004 -> /memfd:vhost-log (deleted)
[...]
root qemu 996 -> /memfd:vhost-log (deleted)
root qemu 997 -> /memfd:vhost-log (deleted)
ovs-vswitchd.log:
|WARN|punix:ovs-vswitchd.ctl: accept failed: Too many open files
Fixes: 54f9e32305d4 ("vhost: handle dirty pages logging request")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
2016-06-22 09:47:12 +02:00
..
2016-06-07 10:02:39 +02:00
2016-05-02 15:15:46 +02:00
2016-05-19 14:40:12 +02:00
2015-06-29 16:41:23 +02:00
2016-06-20 22:25:32 +02:00
2015-05-11 15:36:37 +02:00
2016-06-21 17:50:22 +02:00
2016-06-16 23:38:52 +02:00
2016-04-20 13:49:36 +02:00
2016-06-13 16:17:56 +02:00
2016-06-10 15:09:04 +02:00
2016-02-29 11:22:53 +01:00
2016-06-14 17:15:01 +02:00
2016-01-27 15:34:48 +01:00
2016-05-02 15:15:45 +02:00
2016-06-15 17:18:57 +02:00
2016-06-15 15:58:34 +02:00
2016-03-22 20:42:47 +01:00
2015-11-25 22:11:37 +01:00
2016-06-16 23:39:56 +02:00
2016-06-13 16:17:56 +02:00
2016-06-21 18:05:45 +02:00
2016-05-16 14:17:41 +02:00
2015-06-22 22:20:12 +02:00
2016-05-19 14:40:14 +02:00
2016-06-14 17:24:15 +02:00
2016-06-21 22:41:40 +02:00
2015-08-03 12:43:01 +02:00
2016-06-22 09:47:12 +02:00
2016-06-16 23:39:56 +02:00