Re: [PATCH] s390/debug: Fix deadlock during unregister
| Newsgroups | org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
> Unregistering an s390dbf debug area while one of the associated debugfs > files is being written to can cause a deadlock: > > $ echo >.../vmur/level $ rmmod vmur > =================================================== > debugfs write > debugfs_file_get() > debug_unregister() > mutex_lock(debug_mutex) > debugfs_remove() > wait for debugfs_file_put() > debug_file_ops.write() > debug_input() > mutex_lock(debug_mutex) ==> DEADLOCK > > Fix this by splitting debug_unregister() into an s390dbf and debugfs > part, and running only the s390dbf part with debug_mutex locked. > > Signed-off-by: Peter Oberparleiter <[email protected]> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1