From: Dominique Martinet <asmadeus@codewreck.org>
To: piaojun <piaojun@huawei.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
Eric Van Hensbergen <ericvh@gmail.com>,
Ron Minnich <rminnich@sandia.gov>,
Latchesar Ionkov <lucho@ionkov.net>, Greg Kurz <groug@kaod.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
v9fs-developer@lists.sourceforge.net
Subject: Re: [PATCH] net/9p/trans_virtio.c: decrease the refcount of 9p virtio device when removing it
Date: Wed, 8 Aug 2018 11:40:14 +0200 [thread overview]
Message-ID: <20180808094014.GA5585@nautica> (raw)
In-Reply-To: <5B6AB081.6090608@huawei.com>
piaojun wrote on Wed, Aug 08, 2018:
> I try to remove 9pnet_virtio.ko by 'rmmod 9pnet_virtio' as I want to
> replace it without rebooting system.
I do that all the time when testing, it works for me.
What exact kernel commit are you running?
> Here I have not mount 9pfs yet, so the refcount is still 0.
>
> Before rmmod:
> # lsmod | grep 9p
> 9pnet_virtio 20480 0
> 9pnet 106496 1 9pnet_virtio
> virtio_ring 28672 5 virtio_scsi,9pnet_virtio,virtio_pci,virtio_blk,virtio_net
> virtio 16384 5 virtio_scsi,9pnet_virtio,virtio_pci,virtio_blk,virtio_net
>
> After rmmod:
> # lsmod | grep 9p
> 9pnet_virtio 20480 0
> 9pnet 106496 1 9pnet_virtio
> virtio_ring 28672 5 virtio_scsi,9pnet_virtio,virtio_pci,virtio_blk,virtio_net
> virtio 16384 5 virtio_scsi,9pnet_virtio,virtio_pci,virtio_blk,virtio_net
>
> Normally 9pnet_virtio should be invisible after rmmod like this:
> # lsmod | grep 9p
> 9pnet 106496 0
Right, that obviously didn't work...
But on the other hand, if I apply your commit and load/unload
9pnet_virtio 5-10 times (I ran it in a loop) I get KASAN errors because
we put too many of these refs ; that doesn't happen without your patch
so it's apparently wrong.
I'm curious how that could make modprobe work better for you as well, it
shouldn't depend on that...
Maybe `modprobe -r` might give a better error, or something in dmesg?
--
Dominique
next prev parent reply other threads:[~2018-08-08 9:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-08 8:14 [PATCH] net/9p/trans_virtio.c: decrease the refcount of 9p virtio device when removing it piaojun
2018-08-08 8:36 ` Dominique Martinet
2018-08-08 8:57 ` piaojun
2018-08-08 9:40 ` Dominique Martinet [this message]
2018-08-09 0:45 ` piaojun
2018-08-09 1:18 ` Dominique Martinet
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=20180808094014.GA5585@nautica \
--to=asmadeus@codewreck.org \
--cc=akpm@linux-foundation.org \
--cc=ericvh@gmail.com \
--cc=groug@kaod.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=piaojun@huawei.com \
--cc=rminnich@sandia.gov \
--cc=v9fs-developer@lists.sourceforge.net \
/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