public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: "Gerd Bayer" <gbayer@linux.ibm.com>, "Ma Ke" <make24@iscas.ac.cn>,
	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>,
	"David S. Miller" <davem@davemloft.net>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Niklas Schnelle" <schnelle@linux.ibm.com>,
	"Stefan Raspl" <raspl@linux.ibm.com>,
	"Sven Schnelle" <svens@linux.ibm.com>,
	"Thorsten Winkler" <twinkler@linux.ibm.com>,
	"Wenjia Zhang" <wenjia@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390/ism: Add check for dma_set_max_seg_size in ism_probe()
Date: Wed, 26 Jun 2024 16:00:40 +0200	[thread overview]
Message-ID: <17b2f95a-b6ce-47d5-a826-9cfd1ff3f419@web.de> (raw)
In-Reply-To: <4ab328297c12d1c286c56dbc01d611b77ea2da03.camel@linux.ibm.com>

> > As the possible failure of the dma_set_max_seg_size(), we should
> > better check the return value of the dma_set_max_seg_size().
>
> I think formally you're correct. dma_set_max_seg_size() could return an
> error if dev->dma_parms was not present.
>
> However, since ISM devices are PCI attached (and will remain PCI
> attached I believe) we can take the existance of dev->dma_parms for
> granted since pci_device_add() (in drivers/pci/probe.c) will make that
> point to the pci_dev's dma_parms for every PCI device.
>
> So I'm not sure how important this fix is.

Another function call can fail eventually.

dma_set_seg_boundary()
https://elixir.bootlin.com/linux/v6.10-rc5/source/include/linux/dma-mapping.h#L562

Will it become relevant to complete the error detection
and corresponding exception handling any further?

Regards,
Markus

  reply	other threads:[~2024-06-26 14:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26  8:12 [PATCH] s390/ism: Add check for dma_set_max_seg_size in ism_probe() Ma Ke
2024-06-26 12:48 ` Gerd Bayer
2024-06-26 14:00   ` Markus Elfring [this message]
2024-06-26 14:26   ` Niklas Schnelle
2024-06-28  5:50   ` Christoph Hellwig
2024-06-26 14:52 ` Markus Elfring
2024-06-28  5:50 ` Christoph Hellwig

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=17b2f95a-b6ce-47d5-a826-9cfd1ff3f419@web.de \
    --to=markus.elfring@web.de \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=gbayer@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=make24@iscas.ac.cn \
    --cc=netdev@vger.kernel.org \
    --cc=raspl@linux.ibm.com \
    --cc=schnelle@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=twinkler@linux.ibm.com \
    --cc=wenjia@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox