Re: Possible race in dev_coredumpm()-del_timer() path

From: Thomas Gleixner
Date: Thu Apr 14 2022 - 07:32:00 EST


On Thu, Apr 14 2022 at 16:50, Mukesh Ojha wrote:
> On Thu, Apr 14, 2022 at 12:38:13PM +0200, Thomas Gleixner wrote:
>> So, yes this needs serialization of some sort.
>
> Thanks for understanding the problem.
> Can the patch mentioned at below link helps with the first problem ?
>
> https://lore.kernel.org/lkml/57a04278-0a60-cc7d-7ce8-a75c2befd568@xxxxxxxxxxx/

Something like that.

>> Same problem vs. disabled_store().
>
> you mean, while userspace is reading the data and suddenly disable_store() done from
> sysfs.

No, that's not a problem because the reader holds a reference, but it's
the same problem vs. initialization:

device_add()
disable_store()
devcd_free()
mod_delayed_work()
....
Thanks,

tglx