All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yunseong Kim <yskelg@gmail.com>
To: "Markus Elfring" <Markus.Elfring@web.de>,
	linux-s390@vger.kernel.org, netdev@vger.kernel.org,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Alexandra Winter" <wintera@linux.ibm.com>,
	"Christian Bornträger" <borntraeger@linux.ibm.com>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Sven Schnelle" <svens@linux.ibm.com>,
	"Thorsten Winkler" <twinkler@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>, MichelleJin <shjy180909@gmail.com>
Subject: Re: [PATCH] s390/netiucv: handle memory allocation failure in conn_action_start()
Date: Tue, 25 Jun 2024 03:00:47 +0900	[thread overview]
Message-ID: <880a70f0-89d6-4094-8a71-a9c331bab1ee@gmail.com> (raw)
In-Reply-To: <bb03a384-b2c4-438f-b36b-a4af33a95b60@web.de>

Hi Markus,

On 6/23/24 11:27 오후, Markus Elfring wrote:
>> This patch handle potential null pointer dereference in
>> iucv_path_connect(), When iucv_path_alloc() fails to allocate memory
>> for 'rc'.
> 
> 1. Can a wording approach (like the following) be a better change description?
> 
>    A null pointer is stored in the data structure member “path” after a call
>    of the function “iucv_path_alloc” failed. This pointer was passed to
>    a subsequent call of the function “iucv_path_connect” where an undesirable
>    dereference will be performed then.
>    Thus add a corresponding return value check.

Thank you very much for your detailed code review. I will thoughtfully
incorporate your advices into the next patch.

> 2. May the proposed error message be omitted
>    (because a memory allocation failure might have been reported
>    by an other function call already)?

I agree.

> 3. Is there a need to adjust the return type of the function “conn_action_start”?

I had the same thoughts while writing the code. Thank you!

> 4. Would you like to add any tags (like “Fixes”) accordingly?

Yes, I will refer to the mailing list and include the fix tag.

> 5. Under which circumstances will development interests grow for increasing
>    the application of scope-based resource management?
>    https://elixir.bootlin.com/linux/v6.10-rc4/source/include/linux/cleanup.h#L8

I am considering the environment in which the micro Virtual Machine
operates and testing the s390 architecture with QEMU on my Mac M2 PC.
I have been reviewing the code under the assumption of using a lot of
memory and having many micro Virtual Machines loaded simultaneously.

> Regards,
> Markus

I really appreciate code review Markus!


Best regards,

Yunseong Kim

  reply	other threads:[~2024-06-24 18:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 13:11 [PATCH] s390/netiucv: handle memory allocation failure in conn_action_start() yskelg
2024-06-23 14:27 ` Markus Elfring
2024-06-24 18:00   ` Yunseong Kim [this message]
2024-06-25  9:08     ` Alexandra Winter
2024-06-25 15:08       ` Jakub Kicinski

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 \
    --in-reply-to=880a70f0-89d6-4094-8a71-a9c331bab1ee@gmail.com \
    --to=yskelg@gmail.com \
    --cc=Markus.Elfring@web.de \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shjy180909@gmail.com \
    --cc=svens@linux.ibm.com \
    --cc=twinkler@linux.ibm.com \
    --cc=wintera@linux.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.