public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* KVM: s390/mm: Clarification for two return value checks in gmap_shadow()
@ 2020-05-02 15:43 Markus Elfring
  2020-05-02 17:27 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2020-05-02 15:43 UTC (permalink / raw)
  To: linux-s390, kvm, Christian Bornträger, Claudio Imbrenda,
	Cornelia Huck, David Hildenbrand, Heiko Carstens, Janosch Frank,
	Vasily Gorbik
  Cc: LKML

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-02 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-02 15:43 KVM: s390/mm: Clarification for two return value checks in gmap_shadow() Markus Elfring
2020-05-02 17:27 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox