]> git.baikalelectronics.ru Git - kernel.git/commit
mic: vop: Fix crash on remove
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Fri, 1 Feb 2019 08:45:09 +0000 (09:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Feb 2019 14:53:54 +0000 (15:53 +0100)
commit49e62c931dd72a6deefdc27ce8f524e297e17155
tree8a624c8605796425923137747e9f1c1d9356fd48
parent4c43c1d4a1de7f50a58aad64068be0666509f300
mic: vop: Fix crash on remove

The remove path contains a hack which depends on internal structures in
other source files, similar to the one which was recently removed from
the registration path.  Since commit 330ba74c5c24 ("virtio_ring:
introduce packed ring support"), this leads to a crash when vop devices
are removed.

The structure in question is only examined to get the virtual address of
the allocated used page.  Store that pointer locally instead to fix the
crash.

Fixes: 330ba74c5c24 ("virtio_ring: introduce packed ring support")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mic/vop/vop_main.c