On Fri, 13 Apr 2012 17:48:36 -0400, Sasha Levin <[email protected]> wrote:
> When a virtio_9p pci device is being removed, we should close down any
> active channels and free up resources, we're not supposed to BUG() if there's
> still an open channel since it's a valid case when removing the PCI device.
>
> Otherwise, removing the PCI device with an open channel would cause the
> following BUG():
(Damn changed notmuch.el bindings! Previous reply went only to Sasha).
Applied thanks,
Rusty.
Rusty Russell <[email protected]> writes:
> On Fri, 13 Apr 2012 17:48:36 -0400, Sasha Levin <[email protected]> wrote:
>> When a virtio_9p pci device is being removed, we should close down any
>> active channels and free up resources, we're not supposed to BUG() if there's
>> still an open channel since it's a valid case when removing the PCI device.
>>
>> Otherwise, removing the PCI device with an open channel would cause the
>> following BUG():
>
> (Damn changed notmuch.el bindings! Previous reply went only to Sasha).
>
> Applied thanks,
> Rusty.
I am not sure whether the patch is sufficient, p9_virtio_remove does a
kfree(chan) and since we are not doing anything at the file system
level, we would still allow new 9p client request. That means
p9_virtio_request would be dereferencing a freed memory.
-aneesh