Re: Kernel panic when reading /sys/firmware/acpi/tables/data/BERT

From: Francesco Ruggeri
Date: Tue Nov 19 2019 - 21:00:06 EST


On Tue, Nov 19, 2019 at 3:30 PM Francesco Ruggeri <fruggeri@xxxxxxxxxx> wrote:
>
> If I run
>
> for ((i=0; i<10; i++))
> do for ((j=0; j<1000000; j++))
> do cat /sys/firmware/acpi/tables/data/BERT >/dev/null
> done &
> done
>
> I see this panic in 5.3.11. I see a similar panic in 4.19.84.
>

The issue seems to be that acpi_os_map_cleanup does not execute under
mutex_lock(&acpi_ioremap_lock), so more than one process may end up
freeing the same map.
I will prepare a patch.

Francesco Ruggeri