Re: [PATCH v2] platform/x86: ISST: fix use-after-free in tpmi_sst_dev_remove()

From: Markus Elfring
Date: Sat May 18 2024 - 13:31:27 EST



> Fix this by reordering the kfree() post the dereference.

Would a wording approach (like the following) be a bit nicer?

Move a kfree() call behind an assignment statement in the affected if branch.



> ---
> v1->v2: Add R.B from Hans and fix commit message wrapping to 75 chars.
> This is found by smatch and only compile tested.

* Can it occasionally be nicer to use an enumeration also for
version descriptions?

* Is it helpful to separate additional comments by blank lines?


> ---
> drivers/platform/x86/intel/speed_select_if/isst_tpmi_core.c | 2 +-

How do you think about to omit a repeated marker line here?

Regards,
Markus