]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ipack: ipoctal: fix module reference leak
authorJohan Hovold <johan@kernel.org>
Fri, 17 Sep 2021 11:46:21 +0000 (13:46 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 5 Nov 2021 08:12:50 +0000 (09:12 +0100)
commit2958e71912741da2d7e22809f1301167c781693e
treee4e4b223e274dd1c910a9b1a807da6eda137a57d
parente9b6f16358446530d5ebc63638589609dd0389a2
ipack: ipoctal: fix module reference leak

BugLink: https://bugs.launchpad.net/bugs/1947888
commit bb8a4fcb2136508224c596a7e665bdba1d7c3c27 upstream.

A reference to the carrier module was taken on every open but was only
released once when the final reference to the tty struct was dropped.

Fix this by taking the module reference and initialising the tty driver
data when installing the tty.

Fixes: 82a82340bab6 ("ipoctal: get carrier driver to avoid rmmod")
Cc: stable@vger.kernel.org # 3.18
Cc: Federico Vaga <federico.vaga@cern.ch>
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210917114622.5412-6-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/ipack/devices/ipoctal.c