Re: ucounts: Move kfree() out of critical zone protected by ucounts_lock
From: Kuan-Wei Chiu
Date: Fri Dec 06 2024 - 00:56:02 EST
Hi MengEn,
On Fri, Dec 06, 2024 at 12:13:47PM +0800, mengensun88@xxxxxxxxx wrote:
> From: MengEn Sun <mengensun@xxxxxxxxxxx>
>
> Although kfree is a non-sleep function, it is possible to enter a
> long chain of calls probabilistically, so it looks better to move
> kfree from alloc_ucounts() out of the critical zone of ucounts_lock.
>
> Reviewed-by: YueHong Wu <yuehongwu@xxxxxxxxxxx>
> Signed-off-by: MengEn Sun <mengensun@xxxxxxxxxxx>
> ---
> kernel/ucount.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
It's a common convention to prefix your subject line with [PATCH] to
let others know it's a patch. Additionally, when resending a patch
without changes, consider adding RESEND to the subject line, e.g.,
[PATCH RESEND] ucounts: Move kfree() out of critical zone protected by
ucounts_lock.
See: https://www.kernel.org/doc/html/v6.12/process/submitting-patches.html#include-patch-in-the-subject
Regards,
Kuan-Wei