lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <878r4xnn52.fsf@mailhost.krisman.be>
Date: Wed, 10 Jan 2024 13:55:53 -0300
From: Gabriel Krisman Bertazi <krisman@...e.de>
To: Markus Elfring <Markus.Elfring@....de>
Cc: kernel-janitors@...r.kernel.org,  io-uring@...r.kernel.org,  Hao Xu
 <howeyxu@...cent.com>,  Jens Axboe <axboe@...nel.dk>,  Pavel Begunkov
 <asml.silence@...il.com>,  cocci@...ia.fr,  LKML
 <linux-kernel@...r.kernel.org>
Subject: Re: [cocci] [PATCH] io_uring: Fix exception handling in
 io_ring_ctx_alloc()

Markus Elfring <Markus.Elfring@....de> writes:

> Date: Wed, 29 Mar 2023 17:35:16 +0200
>
> The label “err” was used to jump to a kfree() call despite of
> the detail in the implementation of the function “io_ring_ctx_alloc”
> that it was determined already that a corresponding variable contained
> a null pointer because of a failed memory allocation.
>
> 1. Thus use more appropriate labels instead.
>
> 2. Reorder jump targets at the end.

FWIW, I don't think it makes sense to have the extra labels or re-sort
without a good reason. kfree works fine with the NULL pointers, so there
is no bug to be fixed and moving code around for no reason just makes
life painful for backporters.

Also, the patch no longer applies.

> 3. Omit the statement “kfree(ctx->io_bl);”.

>From a quick look, this might still make sense.  can you confirm and make
that change into a separate patch?

-- 
Gabriel Krisman Bertazi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ