From: Alex Williamson <alex.williamson@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfio: fix crash on rmmod
Date: Wed, 05 Jun 2013 09:11:22 -0600 [thread overview]
Message-ID: <1370445082.3516.15.camel@ul30vt.home> (raw)
In-Reply-To: <1370412194-32211-1-git-send-email-aik@ozlabs.ru>
On Wed, 2013-06-05 at 16:03 +1000, Alexey Kardashevskiy wrote:
> devtmpfs_delete_node() calls devnode() callback with mode==NULL but
> vfio still tries to write there.
>
> The patch fixes this.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>
> ---
Oops. Applied. The mode change just went in for 3.10, so I'll get this
in before the final rc. Thanks,
Alex
> Steps to reproduce on freshly booted system with no devices given to VFIO:
> modprobe vfio
> rmmod vfio_iommu_spapr_tce
> rmmod vfio
> ---
> drivers/vfio/vfio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
> index 523c121..259ad28 100644
> --- a/drivers/vfio/vfio.c
> +++ b/drivers/vfio/vfio.c
> @@ -1360,7 +1360,7 @@ static const struct file_operations vfio_device_fops = {
> */
> static char *vfio_devnode(struct device *dev, umode_t *mode)
> {
> - if (MINOR(dev->devt) == 0)
> + if (mode && (MINOR(dev->devt) == 0))
> *mode = S_IRUGO | S_IWUGO;
>
> return kasprintf(GFP_KERNEL, "vfio/%s", dev_name(dev));
prev parent reply other threads:[~2013-06-05 15:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 6:03 [PATCH] vfio: fix crash on rmmod Alexey Kardashevskiy
2013-06-05 15:11 ` Alex Williamson [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=1370445082.3516.15.camel@ul30vt.home \
--to=alex.williamson@redhat.com \
--cc=aik@ozlabs.ru \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.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