From: Antonino A. Daplas Date: Mon, 3 Jul 2006 07:24:20 +0000 (-0700) Subject: [PATCH] vt: Decrement ref count of the VT backend on deallocation X-Git-Tag: v2.6.18-rc1~124 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d459ec0baa5d22e111dfb139c46d6d788a9eac20;p=linux-2.6 [PATCH] vt: Decrement ref count of the VT backend on deallocation When a VT is newly allocated, the module reference count of the backend will be incremented. This should be balanced by a module_put() when this VT is deallocated. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 3ef823d7d2..da7e66a2a3 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -886,6 +886,7 @@ void vc_disallocate(unsigned int currcons) if (vc_cons_allocated(currcons)) { struct vc_data *vc = vc_cons[currcons].d; vc->vc_sw->con_deinit(vc); + module_put(vc->vc_sw->owner); if (vc->vc_kmalloced) kfree(vc->vc_screenbuf); if (currcons >= MIN_NR_CONSOLES)