virtio: console: prevent use-after-free of port name in port unplug
authorAmit Shah <amit.shah@redhat.com>
Wed, 7 Aug 2013 06:24:17 +0000 (15:54 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 9 Aug 2013 03:32:16 +0000 (13:02 +0930)
commit3b868a4073cdedf395f26d843874414e0e0e9cfd
treec61396970bcaa517abe6511dda51914737a8dfd3
parent11489736177c5930514482b4db7af862d945335d
virtio: console: prevent use-after-free of port name in port unplug

Remove the debugfs path before freeing port->name, to prevent a possible
use-after-free.

Reported-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c