Re: [PATCH] platform/chrome: cros_ec_debugfs: unregister panic notifier on remove
Tzung-Bi Shih <[email protected]>
| Newsgroups | dev.linux.lists.chrome-platform,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jun 15, 2026 at 02:32:00PM +0800, Pengpeng Hou wrote: > cros_ec_debugfs_probe() registers a panic notifier whose callback > recovers struct cros_ec_debugfs with container_of() and can schedule or > flush the console log work. > > cros_ec_debugfs_remove() removes debugfs state and cleans up the console > log buffer, but it leaves the notifier registered. A later panic > notification can therefore call back into freed debugfs state. > > Unregister the panic notifier before tearing down the debugfs and log > state. > > Signed-off-by: Pengpeng Hou <[email protected]> For my reference, Reviewed-by: Tzung-Bi Shih <[email protected]>