Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1228492
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.10 17/20] auxdisplay: ks0108: fix refcount |
| Date | 2015-09-19 19:30 +0200 |
| Message-ID | <qau7w-80f-29@gated-at.bofh.it> (permalink) |
| References | <qau7v-80f-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
commit bab383de3b84e584b0f09227151020b2a43dc34c upstream.
parport_find_base() will implicitly do parport_get_port() which
increases the refcount. Then parport_register_device() will again
increment the refcount. But while unloading the module we are only
doing parport_unregister_device() decrementing the refcount only once.
We add an parport_put_port() to neutralize the effect of
parport_get_port().
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/auxdisplay/ks0108.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/auxdisplay/ks0108.c
+++ b/drivers/auxdisplay/ks0108.c
@@ -139,6 +139,7 @@ static int __init ks0108_init(void)
ks0108_pardevice = parport_register_device(ks0108_parport, KS0108_NAME,
NULL, NULL, NULL, PARPORT_DEV_EXCL, NULL);
+ parport_put_port(ks0108_parport);
if (ks0108_pardevice == NULL) {
printk(KERN_ERR KS0108_NAME ": ERROR: "
"parport didn't register new device\n");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3.10 00/20] 3.10.89-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 19:30 +0200
[PATCH 3.10 17/20] auxdisplay: ks0108: fix refcount Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 19:30 +0200
[PATCH 3.10 09/20] usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 19:30 +0200
[PATCH 3.10 19/20] drivercore: Fix unregistration path of platform devices Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:40 +0200
[PATCH 3.10 16/20] devres: fix devres_get() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:40 +0200
[PATCH 3.10 12/20] crypto: ghash-clmulni: specify context size for ghash async algorithm Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:40 +0200
[PATCH 3.10 18/20] of/address: Dont loop forever in of_find_matching_node_by_address(). Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:40 +0200
[PATCH 3.10 20/20] hpfs: update ctime and mtime on directory modification Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:40 +0200
[PATCH 3.10 08/20] USB: ftdi_sio: Added custom PID for CustomWare products Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:40 +0200
[PATCH 3.10 15/20] xtensa: fix kernel register spilling Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 03/20] iio: Add inverse unit conversion macros Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 02/20] iio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 05/20] clk: versatile: off by one in clk_sp810_timerclken_of_get() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 13/20] HID: usbhid: Fix the check for HID_RESET_PENDING in hid_io_error Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 14/20] xtensa: fix threadptr reload on return to userspace Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 06/20] PCI: Fix TI816X class code quirk Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 11/20] serial: 8250: dont bind to SMSC IrCC IR port Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 07/20] USB: symbolserial: Use usb_get_serial_port_data Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 01/20] DRM - radeon: Dont link train DisplayPort on HPD until we get the dpcd Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 04/20] iio: adis16480: Fix scale factors Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
[PATCH 3.10 10/20] usb: host: ehci-sys: delete useless bus_to_hcd conversion Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-19 20:50 +0200
Re: [PATCH 3.10 00/20] 3.10.89-stable review Guenter Roeck <linux@roeck-us.net> - 2015-09-20 02:20 +0200
Re: [PATCH 3.10 00/20] 3.10.89-stable review Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-20 11:00 +0200
Re: [PATCH 3.10 00/20] 3.10.89-stable review Guenter Roeck <linux@roeck-us.net> - 2015-09-20 18:10 +0200
Re: [PATCH 3.10 00/20] 3.10.89-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-21 06:40 +0200
Re: [PATCH 3.10 00/20] 3.10.89-stable review Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-09-21 10:40 +0200
csiph-web