From: sashiko-bot@kernel.org
To: "Youssef Samir" <youssef.abdulrahman@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] accel/qaic: Add support for AI200 virtual functions
Date: Mon, 31 Aug 2026 17:09:34 +0000 [thread overview]
Message-ID: <20260831170934.E94041F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260831135008.1418190-1-youssef.abdulrahman@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] System crash on VF suspend due to unconditional NULL pointer dereference of qdev->mqts_ch.
--
commit 136267f1b302748ae2c7ab124a5490ff5bbea19a
Author: Zack McKevitt <zmckevit@qti.qualcomm.com>
accel/qaic: Add support for AI200 virtual functions
This patch registers the qaic_pci_sriov_configure() callback to allow
virtual functions to be created through the AIC200's sysfs numvfs entry.
It also defines a new MHI family for the channels supported by AIC200 VFs.
Link: https://lore.kernel.org/all/20260814165907.C76841F00A3A@smtp.kernel.org/
> diff --git a/drivers/accel/qaic/qaic_drv.c b/drivers/accel/qaic/qaic_drv.c
> index 0acf6cdd44f81..6427105ebdf75 100644
> --- a/drivers/accel/qaic/qaic_drv.c
> +++ b/drivers/accel/qaic/qaic_drv.c
[ ... ]
> @@ -768,6 +814,7 @@ static struct pci_driver qaic_pci_driver = {
> .remove = qaic_pci_remove,
> .shutdown = qaic_pci_shutdown,
> .err_handler = &qaic_pci_err_handler,
> + .sriov_configure = qaic_pci_sriov_configure,
> .driver = {
> .pm = pm_sleep_ptr(&qaic_pm_ops),
[Severity: High]
This is a pre-existing issue, but since this patch introduces virtual
functions that can be suspended, will this cause a system crash on VF suspend?
When the system suspends a QAIC virtual function, qaic_pm_suspend() is called
via the qaic_pm_ops struct. This function unconditionally calls into the
timesync code:
drivers/accel/qaic/qaic_drv.c:qaic_pm_suspend() {
...
qaic_mqts_ch_stop_timer(qdev->mqts_ch);
...
}
However, since VFs do not support or initialize the QAIC_TIMESYNC_PERIODIC
channel, qdev->mqts_ch is always NULL for them. This leads to an unconditional
NULL pointer dereference when stopping the timer:
drivers/accel/qaic/qaic_timesync.c:qaic_mqts_ch_stop_timer() {
struct mqts_dev *mqtsdev = dev_get_drvdata(&mhi_dev->dev);
...
}
Because dev_get_drvdata accesses dev->driver_data, passing the evaluated
address of the NULL pointer's dev struct will trigger a kernel panic. Should
qaic_pm_suspend() or qaic_mqts_ch_stop_timer() check for a NULL channel
before attempting to stop the timer?
> },
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260831135008.1418190-1-youssef.abdulrahman@oss.qualcomm.com?part=1
prev parent reply other threads:[~2026-08-31 17:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 13:50 [PATCH v2] accel/qaic: Add support for AI200 virtual functions Youssef Samir
2026-08-31 17:09 ` sashiko-bot [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=20260831170934.E94041F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=youssef.abdulrahman@oss.qualcomm.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