mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 16:44:27 +08:00
[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 <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
36c9366efd
commit
d459ec0baa
@ -886,6 +886,7 @@ void vc_disallocate(unsigned int currcons)
|
|||||||
if (vc_cons_allocated(currcons)) {
|
if (vc_cons_allocated(currcons)) {
|
||||||
struct vc_data *vc = vc_cons[currcons].d;
|
struct vc_data *vc = vc_cons[currcons].d;
|
||||||
vc->vc_sw->con_deinit(vc);
|
vc->vc_sw->con_deinit(vc);
|
||||||
|
module_put(vc->vc_sw->owner);
|
||||||
if (vc->vc_kmalloced)
|
if (vc->vc_kmalloced)
|
||||||
kfree(vc->vc_screenbuf);
|
kfree(vc->vc_screenbuf);
|
||||||
if (currcons >= MIN_NR_CONSOLES)
|
if (currcons >= MIN_NR_CONSOLES)
|
||||||
|
Loading…
Reference in New Issue
Block a user