[PATCH v4 3/3] mtd: mtdoops: panic caused mtdoops to call mtdoops_erase function immediately

Miquel Raynal miquel.raynal at bootlin.com
Tue Oct 18 02:56:13 PDT 2022


On Mon, 2022-10-10 at 04:55:49 UTC, Ray Zhang wrote:
> The panic function disables the local interrupts, preemption, and all
> other processors. When the invoked mtdoops needs to erase a used page,
> calling schedule_work() to do it will not work. Instead, just call
> mtdoops_erase function immediately.
> 
> Tested:
> ~# echo c > /proc/sysrq-trigger
> [  171.654759] sysrq: Trigger a crash
> [  171.658325] Kernel panic - not syncing: sysrq triggered crash
> ......
> [  172.406423] mtdoops: not ready 34, 35 (erase immediately)
> [  172.432285] mtdoops: ready 34, 35
> [  172.435633] Rebooting in 10 seconds..
> 
> Signed-off-by: Ray Zhang <sgzhang at google.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel



More information about the linux-mtd mailing list