diff options
author | Tejun Heo <tj@kernel.org> | 2014-02-03 19:02:57 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-07 23:42:40 (GMT) |
commit | ccf02aaf8167bb8bfb3c17c01c843d309b872671 (patch) | |
tree | 744c59c27e0883dca4da631118432a8df86ce894 /ipc/ipcns_notifier.c | |
parent | 35beab0635f3cdd475e3c11a304b866c25b76fcf (diff) | |
download | linux-ccf02aaf8167bb8bfb3c17c01c843d309b872671.tar.xz |
kernfs: invoke kernfs_unmap_bin_file() directly from kernfs_deactivate()
kernfs_unmap_bin_file() is supposed to unmap all memory mappings of
the target file before kernfs_remove() finishes; however, it currently
is being called from kernfs_addrm_finish() and has the same race
problem as the original implementation of deactivation when there are
multiple removers - only the remover which snatches the node to its
addrm_cxt->removed list is guaranteed to wait for its completion
before returning.
It can be easily fixed by moving kernfs_unmap_bin_file() invocation
from kernfs_addrm_finish() to kernfs_deactivated(). The function may
be called multiple times but that shouldn't do any harm.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'ipc/ipcns_notifier.c')
0 files changed, 0 insertions, 0 deletions