Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Vineeth Vijayan <vneethv@linux.ibm.com>
Cc: oberpar@linux.ibm.com, agordeev@linux.ibm.com, gor@linux.ibm.com,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH] s390/cio: Fix NULL dereference in ccw_device_get_util_str()
Date: Wed, 23 Sep 2026 16:38:10 +0200	[thread overview]
Message-ID: <20260923143810.9636D86-hca@linux.ibm.com> (raw)
In-Reply-To: <20260922204839.965043-1-vneethv@linux.ibm.com>

On Tue, Sep 22, 2026 at 10:48:39PM +0200, Vineeth Vijayan wrote:
> The channel path registry entry associated with a CHPID may be removed
> while the subchannel's PMCW still references that CHPID. In this case,
> chpid_to_chp() can return NULL, leading to a NULL pointer dereference.
>  
> Add the missing NULL check before dereferencing the returned pointer.
> +	if (!chp)
> +		return NULL;
>  
>  	util_str = kmalloc(sizeof(chp->desc_fmt3.util_str), GFP_KERNEL);

The context diff is confusing; as if this would be the to be fixed bug :)
But ok, just a few lines below chp is indeed dereferenced.

Applied, thanks!

      parent reply	other threads:[~2026-09-23 14:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 20:48 [PATCH] s390/cio: Fix NULL dereference in ccw_device_get_util_str() Vineeth Vijayan
2026-09-22 21:01 ` sashiko-bot
2026-09-23  8:57 ` Peter Oberparleiter
2026-09-23  9:22   ` Vineeth Vijayan
2026-09-23 14:38 ` Heiko Carstens [this message]

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=20260923143810.9636D86-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=oberpar@linux.ibm.com \
    --cc=vneethv@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox