public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: linux-s390@vger.kernel.org, kvm@vger.kernel.org,
	"Christian Bornträger" <borntraeger@de.ibm.com>,
	"Claudio Imbrenda" <imbrenda@linux.ibm.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Heiko Carstens" <heiko.carstens@de.ibm.com>,
	"Janosch Frank" <frankja@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: KVM: s390/mm: Clarification for two return value checks in gmap_shadow()
Date: Sat, 2 May 2020 17:43:01 +0200	[thread overview]
Message-ID: <7f0b7ac0-d061-9484-bc5e-bdd9e32aa42b@web.de> (raw)

Hello,

I have tried another small script out for the semantic patch language.
This source code analysis approach points out that the function “gmap_find_shadow”
is called two times by the function “gmap_shadow”.
https://elixir.bootlin.com/linux/v5.7-rc3/source/arch/s390/mm/gmap.c#L1628
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/arch/s390/mm/gmap.c

Null pointer checks are performed at these places.
The function “gmap_find_shadow” is documented in the same source file
that the pointer “ERR_PTR(-EAGAIN)” can eventually be returned.
Are the referenced gmap data structures always initialised here?

Regards,
Markus

             reply	other threads:[~2020-05-02 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02 15:43 Markus Elfring [this message]
2020-05-02 17:27 ` KVM: s390/mm: Clarification for two return value checks in gmap_shadow() David Hildenbrand

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=7f0b7ac0-d061-9484-bc5e-bdd9e32aa42b@web.de \
    --to=markus.elfring@web.de \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /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