drm/nouveau/vm: fix memory corruption when pgt allocation fails
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Mon, 10 Dec 2012 20:30:51 +0000 (21:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Feb 2013 17:20:53 +0000 (09:20 -0800)
commit56c8d200f7974c2d2bef905ef3d67f6f3eaba71c
treeda092b85b90c78f94c9b3ee403fa8282b40bf5d7
parent5b7be6344b4177fa55d128de75b0e5b42229fd37
drm/nouveau/vm: fix memory corruption when pgt allocation fails

commit cfd376b6bfccf33782a0748a9c70f7f752f8b869 upstream.

If we return freed vm, nouveau_drm_open will happily call nouveau_cli_destroy,
which will try to free it again.

Reported-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/core/subdev/vm/base.c