Re: Race condition in ext4 (was Re: 4.11-rc1 acpi stomping ext4 slabs)

From: Theodore Ts'o
Date: Wed Mar 08 2017 - 21:36:42 EST


On Tue, Mar 07, 2017 at 10:40:53PM +0200, Nikolay Borisov wrote:
> So this is wrong, the reason why the issues seemed fix is because I
> switched my compiler to version 5.4.0. So this manifests only if I'm
> using gcc 4.7.4. With the pr_info added here is the output of a boot. So
> there are multiple invocations of ext4_ext_map_blocks and the freeing,
> including with the address being used in subsequent kasan reports :
> ffff88006ae8fdb0

Can you help bisect this, then? I'm using Debian Testing, and the
default gcc is gcc 6.3.0. I'm currently forcing the use of gcc 5.4.1
because I was running into problems with gcc 6.x a while back. (TBH,
I was thinking about trying to see if gcc 6.3 was stable for kernel
compiles when I had some spare time.) But I don't have access to
*any* gcc 4.x on my development system, and I don't think I've tried
using gcc 4.x in a long, Long, LONG time.

I'm currently kicking off a test run using 5.4.1 with KASAN enabled to
see if I can trigger it myself. Can you send me a copy of your
.config so I can see what else might be interesting with your config?
(e.g., SLAB vs SLUB, etc.)

Thanks,

- Ted