summaryrefslogtreecommitdiff
path: root/scripts/asn1_compiler.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2017-02-12 05:33:02 +0900
committerBruno Martins <bgcngm@gmail.com>2022-10-28 15:39:24 +0100
commitc9c596de3e525e3af0b8769981da26378f4fd594 (patch)
tree07123514567b88da5a386bff957b1e4bb35da256 /scripts/asn1_compiler.c
parent2172eaf5a901c3864c7540066ca0bc6e04fc211b (diff)
UPSTREAM: kernfs: fix locking around kernfs_ops->release() callback
The release callback may be called from two places - file release operation and kernfs open file draining. kernfs_open_file->mutex is used to synchronize the two callsites. This unfortunately leads to possible circular locking because of->mutex is used to protect the usual kernfs operations which may use locking constructs which are held while removing and thus draining kernfs files. @of->mutex is for synchronizing concurrent kernfs access operations and all we need here is synchronization between the releaes and drain paths. As the drain path has to grab kernfs_open_file_mutex anyway, let's use the mutex to synchronize the release operation instead. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-and-tested-by: Tony Lindgren <tony@atomide.com> Fixes: 0e67db2f9fe9 ("kernfs: add kernfs_ops->open/release() callbacks") Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit f83f3c515654474e19c7fc86e3b06564bb5cb4d4) Bug: 111308141 Test: modified lmkd to use PSI and tested using lmkd_unit_test Change-Id: I75253c2aa8924987e9342d94e8bae445d6c8f5be Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Diffstat (limited to 'scripts/asn1_compiler.c')
0 files changed, 0 insertions, 0 deletions