Re: [PATCH] module: print module name on refcount error
From: Michal Hocko <mhocko@suse.com>
Date: 2023-09-14 19:40:04
Also in:
lkml
From: Michal Hocko <mhocko@suse.com>
Date: 2023-09-14 19:40:04
Also in:
lkml
On Mon 28-08-23 14:18:30, Jean Delvare wrote: [...]
quoted
quoted
It would likely be better to use refcount_t instead of atomic_t.Patches welcomed.Michal, do I understand correctly that this would prevent the case our customer had (too many gets), but won't make a difference for actual too-many-puts situations?
yes, refcount_t cannot protect from too-many-puts because there is not real way to protect from those AFAICS. At a certain moment you just drop to 0 and lose your object and all following that is a UAF. But I do not think this is actually the interesting case at all. -- Michal Hocko SUSE Labs