public inbox for [email protected]
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <[email protected]>
To: Markus Elfring <[email protected]>
Cc: [email protected],  [email protected],
	 Jens Axboe <[email protected]>,
	 Pavel Begunkov <[email protected]>,
	 LKML <[email protected]>
Subject: Re: [PATCH v2 2/2] io_uring: Improve exception handling in io_ring_ctx_alloc()
Date: Fri, 12 Jan 2024 11:30:21 -0300	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]> (Markus Elfring's message of "Wed, 10 Jan 2024 21:50:15 +0100")

Markus Elfring <[email protected]> writes:

> From: Markus Elfring <[email protected]>
> Date: Wed, 10 Jan 2024 21:15:48 +0100
>
> 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.
>

As I mentioned on v1, this doesn't do us any good, as kfree can handle
NULL pointers just fine, and changes like this becomes churn later when
backporting or modifying the code.

-- 
Gabriel Krisman Bertazi

  parent reply	other threads:[~2024-01-12 14:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[email protected]>
     [not found] ` <[email protected]>
2024-01-10 11:23   ` io_uring: Fix exception handling in io_ring_ctx_alloc() Markus Elfring
2024-01-10 16:55   ` [cocci] [PATCH] " Gabriel Krisman Bertazi
2024-01-10 20:45     ` [PATCH v2 0/2] io_uring: Adjustments for io_ring_ctx_alloc() Markus Elfring
2024-01-10 20:48       ` [PATCH v2 1/2] io_uring: Delete a redundant kfree() call in io_ring_ctx_alloc() Markus Elfring
2024-01-12 14:25         ` Gabriel Krisman Bertazi
2024-01-12 16:18           ` Jens Axboe
2024-01-12 17:15             ` Gabriel Krisman Bertazi
2024-01-12 17:50               ` [v2 " Markus Elfring
2024-01-10 20:50       ` [PATCH v2 2/2] io_uring: Improve exception handling " Markus Elfring
2024-01-11 13:23         ` Pavel Begunkov
2024-01-12 14:30         ` Gabriel Krisman Bertazi [this message]
2024-01-12 15:00           ` [v2 " Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox