DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Anatoly Burakov <anatoly.burakov@intel.com>,
	Akhil Goyal <gakhil@marvell.com>,
	 Fan Zhang <royzhang1980@gmail.com>,
	dev@dpdk.org, acc@openeuler.org
Subject: Re: [PATCH v2 resend] bus/vdev: vdev_cleanup checks dev->device.driver
Date: Thu, 20 Oct 2022 13:32:09 +0200	[thread overview]
Message-ID: <CAJFAV8yPaNPAgcv9X91ZUpcVUMRiaGev-Jy5+P1Ps7YurZ7ckQ@mail.gmail.com> (raw)
In-Reply-To: <20221019140801.1700392-1-zhangfei.gao@linaro.org>

On Wed, Oct 19, 2022 at 4:14 PM Zhangfei Gao <zhangfei.gao@linaro.org> wrote:
>
> vdev_probe calls driver->probe and set dev->device.driver,
> which will be NULL if the probe fails.
>
> In vdev_cleanup, drv = container_of(dev->device.driver)
> drv will be !NULL in this case, causing drv->remove
> Segmentation fault.
>
> Fixed by checking dev->device.driver before.
>
> Log:
> $ sudo dpdk-test --vdev=crypto_uadk --log-level=6
> vdev_probe(): failed to initialize crypto_uadk device
> EAL: Bus (vdev) probe failed.
> RTE>>quit
> Segmentation fault
>
> Fixes: 1cab1a40ea9b ("bus: cleanup devices on shutdown")

> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>

Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.


-- 
David Marchand


      reply	other threads:[~2022-10-20 11:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 10:48 [PATCH] " Zhangfei Gao
2022-10-19 11:39 ` David Marchand
2022-10-19 13:27   ` Zhangfei Gao
2022-10-19 13:37   ` Zhangfei Gao
2022-10-19 13:56 ` [PATCH v2] " Zhangfei Gao
2022-10-19 14:08 ` [PATCH v2 resend] " Zhangfei Gao
2022-10-20 11:32   ` David Marchand [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=CAJFAV8yPaNPAgcv9X91ZUpcVUMRiaGev-Jy5+P1Ps7YurZ7ckQ@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=acc@openeuler.org \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=royzhang1980@gmail.com \
    --cc=zhangfei.gao@linaro.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;
as well as URLs for NNTP newsgroup(s).