Re: [PATCH v3] driver core: fix use-after-free of driver_override via driver_match_device()
From: Danilo Krummrich
Date: Tue Jan 13 2026 - 09:20:08 EST
On Tue Jan 13, 2026 at 3:05 PM CET, Gui-Dong Han wrote:
> I see your point now. I agree that we should frame this as fixing the
> inconsistent locking guarantee of match() callbacks. This is exactly
> what the code changes in my patch implement. The fix for
> driver_override UAF is a natural result of this consistency.
>
> I plan to send a v4 to update the subject and commit log to focus on
> enforcing consistent locking.
Great, thanks!
> For the code comment, I will remove the mention of
> driver_set_override. Do you prefer /* Ensure consistent locking for
> match() callbacks */ or simply no comment?
I think both is fine, the comment probably doesn't hurt.
> Regarding the larger refactoring of driver_override, I am willing to
> look into it as a follow-up task.
Thanks!