Re: [Devel] [PATCH rh7] fs: drop useless d_root_check()

2015-12-08 Thread Andrew Vagin
On Fri, Dec 04, 2015 at 05:42:52PM +0300, Andrey Ryabinin wrote: > d_root_check() takes the following locks in wrong order: > > write_seqlock(&rename_lock); > br_read_lock(&vfsmount_lock); > > thus we may endup with deadlock. > While we could fix it by taking these locks in reverse >

[Devel] [PATCH rh7 0/4] mm: page_idle: fix anon_vma dereference/locking

2015-12-08 Thread Vladimir Davydov
rmap_walk() present in RH7 requires the caller to either hold mmap_sem or pin the page's anon_vma. page_idle_clear_pte_refs does neither. As a result, it might end up trying to lock/unlock anon_vma which has already been freed and possibly reallocated. This won't do any good. Let's pull the new ve

[Devel] [PATCH rh7 4/4] mm: page_idle: look up page anon_vma carefully when checking references

2015-12-08 Thread Vladimir Davydov
Since we don't hold mmap_sem when checking references, we can't just read anon_vma from page->mapping and call down_read on its rwsem, becuase the page can be unmapped in the meantime and the anon_vma can be freed so that we will end up messing with already freed and perhaps reallocated anon_vma. T

[Devel] [PATCH rh7 2/4] mm/rmap: make rmap_walk to get the rmap_walk_control argument

2015-12-08 Thread Vladimir Davydov
From: Joonsoo Kim In each rmap traverse case, there is some difference so that we need function pointers and arguments to them in order to handle these For this purpose, struct rmap_walk_control is introduced in this patch, and will be extended in following patch. Introducing and extending are

[Devel] [PATCH rh7 1/4] mm/rmap: factor lock function out of rmap_walk_anon()

2015-12-08 Thread Vladimir Davydov
From: Joonsoo Kim When we traverse anon_vma, we need to take a read-side anon_lock. But there is subtle difference in the situation so that we can't use same method to take a lock in each cases. Therefore, we need to make rmap_walk_anon() taking difference lock function. This patch is the firs

[Devel] [PATCH rh7 3/4] mm/rmap: extend rmap_walk_xxx() to cope with different cases

2015-12-08 Thread Vladimir Davydov
From: Joonsoo Kim There are a lot of common parts in traversing functions, but there are also a little of uncommon parts in it. By assigning proper function pointer on each rmap_walker_control, we can handle these difference correctly. Following are differences we should handle. 1. difference

[Devel] [PATCH RHEL7 COMMIT] ms/mm/rmap: factor lock function out of rmap_walk_anon()

2015-12-08 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-229.7.2.vz7.9.15 --> commit 7d409af21c38dea0fb3654bb9e88aa693c05024b Author: Vladimir Davydov Date: Tue Dec 8 18:15:55 2015 +0400 ms/mm/rmap:

[Devel] [PATCH RHEL7 COMMIT] mm: page_idle: look up page anon_vma carefully when checking references

2015-12-08 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-229.7.2.vz7.9.15 --> commit b653eb7dd123fb0315efc08808128bc1b6fa7b93 Author: Vladimir Davydov Date: Tue Dec 8 18:15:56 2015 +0400 mm: page_idl

[Devel] [PATCH RHEL7 COMMIT] ms/mm/rmap: extend rmap_walk_xxx() to cope with different cases

2015-12-08 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-229.7.2.vz7.9.15 --> commit b0b85ef542d082b5eaf67e6c666fb2e56dd3b099 Author: Vladimir Davydov Date: Tue Dec 8 18:15:56 2015 +0400 ms/mm/rmap:

[Devel] [PATCH RHEL7 COMMIT] ms/mm/rmap: make rmap_walk to get the rmap_walk_control argument

2015-12-08 Thread Konstantin Khorenko
The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after rh7-3.10.0-229.7.2.vz7.9.15 --> commit 83bf1997dc0d0556638be25f2570f7d543edb1e6 Author: Vladimir Davydov Date: Tue Dec 8 18:15:55 2015 +0400 ms/mm/rmap:

[Devel] [NEW KERNEL] 3.10.0-229.7.2.vz7.9.16 (rhel7)

2015-12-08 Thread builder
Changelog: OpenVZ kernel rh7-3.10.0-229.7.2.vz7.9.16 * memory corruption due to bug in mm locking scheme (which leads to hangs) * ext4 corruption caused by unwritten and delayed extents * aio-dio vs freeze_fs race triggers data corruption Generated changelog: * Tue Dec 08 2015 Konstantin Khore

[Devel] [PATCH rh7] tcache: fix use-after-free in tcache_invalidate_node_pages()

2015-12-08 Thread Andrey Ryabinin
tcache_invalidate_node_pages() temporarly drops/takes back node->tree_lock. Once lock was dropped, another thread might remove and free the next slot. Don't drop the looks. https://jira.sw.ru/browse/PSBM-42104 Signed-off-by: Andrey Ryabinin --- mm/tcache.c | 13 +++-- 1 file changed, 3

Re: [Devel] [PATCH rh7] tcache: fix use-after-free in tcache_invalidate_node_pages()

2015-12-08 Thread Vladimir Davydov
On Tue, Dec 08, 2015 at 06:52:50PM +0300, Andrey Ryabinin wrote: > tcache_invalidate_node_pages() temporarly drops/takes back node->tree_lock. > Once lock was dropped, another thread might remove and free the next slot. > Don't drop the looks. > > https://jira.sw.ru/browse/PSBM-42104 > > Signed-o