Re: [PATCH v8 11/12] zram: fix crashes with cpu hotplug multistate

From
Miroslav Benes <mbenes@suse.cz>
Date
2021-10-27 11:42:45
Also in
linux-block, linux-doc, linux-fsdevel, linux-kselftest, lkml
Reply to
Ming Lei, 2021-10-26
quoted
The livepatch code uses workqueue because the livepatch can be
disabled via sysfs interface. It obviously could not wait until
the sysfs interface is removed in the sysfs write() callback
that triggered the removal.
If klp_free_patch_* is moved into module_exit() and not let enable
store() to kill kobjects, all kobjects can be deleted in module_exit(),
then wait_for_completion(patch->finish) may be removed, also wq isn't
required for the async cleanup.
It sounds like a nice cleanup. If we combine kobject_del() to prevent any 
show()/store() accesses and free everything later in module_exit(), it 
could work. If I am not missing something around how we maintain internal 
lists of live patches and their modules.

Thanks

Miroslav
Thread (20 messages) 20 messages, 5 authors, last reply 2021-11-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help