All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zheyu Ma <zheyuma97@gmail.com>
To: Jason Wang <jasowang@redhat.com>
Cc: mst <mst@redhat.com>, Zhu Lingshan <lingshan.zhu@intel.com>,
	Yongji Xie <xieyongji@bytedance.com>, Eli Cohen <elic@nvidia.com>,
	Parav Pandit <parav@nvidia.com>,
	virtualization <virtualization@lists.linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] vDPA/ifcvf: got a warning when removing the module
Date: Mon, 23 May 2022 12:47:01 +0800	[thread overview]
Message-ID: <CAMhUBj=rC8ziy5B8cOroeZQW7f+DhsOkCvLWH-L89zx2LZy-Eg@mail.gmail.com> (raw)
In-Reply-To: <CACGkMEvgtzUXw9v=cMN3=Mqm9YTp_2bKmc4--q2+BREvgVdeLg@mail.gmail.com>

On Mon, May 23, 2022 at 12:15 PM Jason Wang <jasowang@redhat.com> wrote:
>
> On Sat, May 21, 2022 at 10:27 PM Zheyu Ma <zheyuma97@gmail.com> wrote:
> >
> > Hello,
> >
> > I found a bug in the ifcvf driver.
> > When removing the module, I got the following warning:
> >
> > [   14.478123] general protection fault, probably for non-canonical
> > address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN PTI
> > [   14.478701] KASAN: null-ptr-deref in range
> > [0x0000000000000028-0x000000000000002f]
> > [   14.479922] RIP: 0010:vdpa_mgmtdev_unregister+0x39/0x150
> > [   14.484063] Call Trace:
> > [   14.484186]  <TASK>
> > [   14.484292]  ? _raw_spin_unlock_irqrestore+0x3d/0x60
> > [   14.484536]  ifcvf_remove+0x3a/0x50 [ifcvf]
> > [   14.484743]  pci_device_remove+0x92/0x240
> >
> > The reason is that the 'ifcvf_mgmt_dev' is zero which means that
> > ifcvf_vdpa_dev_add() was not executed.
> > Since I am not familiar with the driver, I cannot find a proper solution for it.
> >
>
> Looks like the drv data needs to be set in probe(). Could you pleas
> try to the attached patch? (compile test only).

This patch works for me, thanks!

Tested-by: Zheyu Ma <zheyuma97@gmail.com>

Regards,
Zheyu Ma

      reply	other threads:[~2022-05-23  4:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-21 14:27 [BUG] vDPA/ifcvf: got a warning when removing the module Zheyu Ma
2022-05-23  4:15 ` Jason Wang
2022-05-23  4:15   ` Jason Wang
2022-05-23  4:47   ` Zheyu Ma [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='CAMhUBj=rC8ziy5B8cOroeZQW7f+DhsOkCvLWH-L89zx2LZy-Eg@mail.gmail.com' \
    --to=zheyuma97@gmail.com \
    --cc=elic@nvidia.com \
    --cc=jasowang@redhat.com \
    --cc=lingshan.zhu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=parav@nvidia.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xieyongji@bytedance.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.