Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Vineeth Vijayan <vneethv@linux.ibm.com>
To: Peter Oberparleiter <oberpar@linux.ibm.com>
Cc: hca@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 11:22:28 +0200	[thread overview]
Message-ID: <14c7de90-0aa5-40a5-b004-2e38383d1187@linux.ibm.com> (raw)
In-Reply-To: <b7d20111-db61-4e47-9e84-5232b179b974@linux.ibm.com>



On 9/23/26 10:57, Peter Oberparleiter wrote:
> On 22.09.2026 22:48, 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.
> 
> Actually as I understand it, it is the other way around: the registry
> (css->chps) still contains the entry, but the PMCW CHPID list contains 0
> due a cleared SCHIB. Therefore the lookup will return NULL, unless by
> chance a CHPID 0 exists.
> 

mm..This is also a possibility. But we are not clearing SCHIB here. We 
still cache the old unpredictable value to sch->schib. And then based on
this, we try to read some index of registry which could be a NULL.

>> Add the missing NULL check before dereferencing the returned pointer.
>>
>> Fixes: 199652309a4d ("s390/cio: add helper to query utility strings per given ccw device")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
> 
> Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
> 
> 


  reply	other threads:[~2026-09-23  9:22 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 [this message]
2026-09-23 14:38 ` Heiko Carstens

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=14c7de90-0aa5-40a5-b004-2e38383d1187@linux.ibm.com \
    --to=vneethv@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=oberpar@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