From: Miles Chen via iommu <iommu@lists.linux-foundation.org>
To: <robin.murphy@arm.com>
Cc: miles.chen@mediatek.com, jroedel@suse.de,
linux-kernel@vger.kernel.org, matthias.bgg@gmail.com,
iommu@lists.linux-foundation.org,
linux-mediatek@lists.infradead.org, hverkuil-cisco@xs4all.nl,
mchehab@kernel.org, will@kernel.org,
linux-arm-kernel@lists.infradead.org,
angelogioacchino.delregno@collabora.com
Subject: Re: [PATCH v2] iommu/mediatek: fix NULL pointer dereference when printing dev_name
Date: Wed, 27 Apr 2022 10:13:08 +0800 [thread overview]
Message-ID: <20220427021308.22855-1-miles.chen@mediatek.com> (raw)
In-Reply-To: <9debe3ab-603d-0d30-a6aa-8963b48e83d4@arm.com>
hi Robin,
>> - link = device_link_add(dev, larbdev,
>> - DL_FLAG_PM_RUNTIME | DL_FLAG_STATELESS);
>> - if (!link)
>> - dev_err(dev, "Unable to link %s\n", dev_name(larbdev));
>> + if (larbdev) {
>
>Until the MT8195 infra MMU support lands, is there ever a case where
>it's actually valid for larbdev to be NULL? If not, I think it would be
>a lot clearer to explicitly fail the probe here, rather than silently
>continue and risk fatal errors, hangs, or other weird behaviour if
>there's no guarantee that the correct LARB is powered up (plus then the
>release callbacks wouldn't need to worry about it either).
Thanks, I will do probe fail in patch v3 and remove the release modification.
thanks,
Miles
>
>Robin.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
prev parent reply other threads:[~2022-04-27 2:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 8:24 [PATCH v2] iommu/mediatek: fix NULL pointer dereference when printing dev_name Miles Chen via iommu
2022-04-25 10:03 ` Robin Murphy
2022-04-26 5:52 ` Yong Wu via iommu
2022-04-27 2:13 ` Miles Chen via iommu
2022-04-27 2:13 ` Miles Chen via iommu [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=20220427021308.22855-1-miles.chen@mediatek.com \
--to=iommu@lists.linux-foundation.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=jroedel@suse.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=miles.chen@mediatek.com \
--cc=robin.murphy@arm.com \
--cc=will@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