blkback: Fix CVE-2010-3699
authorKeir Fraser <keir@xen.org>
Thu, 25 Nov 2010 06:08:20 +0000 (22:08 -0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 14 Apr 2011 22:26:15 +0000 (18:26 -0400)
commit313d7b003ceceb797e8c0d18ab085ed0638b4aff
tree339506d76bb5850adb1203f2f7fd94784ec7541c
parenta81135d90bf176e6139c352c7b96c03d00131836
blkback: Fix CVE-2010-3699

A guest can cause the backend driver to leak a kernel thread. Such
leaked threads hold references to the device, whichmakes the device
impossible to tear down. If shut down, the guest remains a zombie
domain, the xenwatch process hangs, and most xm commands will stop
working.

This patch tries to do the following for blkback:
    - identify/extract idempotent teardown operations,
    - add/move the invocation of said teardown operation
      right before we're about to allocate new resources in the
      Connected states.

[ linux-2.6.18-xen.hg 59f097ef181b ]

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
drivers/xen/blkback/xenbus.c