Skip to content

Commit

Permalink
[PATCH] vt: Decrement ref count of the VT backend on deallocation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Jul 3, 2006
1 parent 36c9366 commit d459ec0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d459ec0

Please sign in to comment.