lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121214110240.11019.48429.stgit@zurg>
Date:	Fri, 14 Dec 2012 15:02:40 +0400
From:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
To:	linux-kernel@...r.kernel.org
Cc:	Rodolfo Giometti <giometti@...eenne.com>
Subject: [PATCH 04/12] pps: pps_parport: fix oops on module unloading

Seems like port->cad is NULL for unused ports

Signed-off-by: Konstantin Khlebnikov <khlebnikov@...nvz.org>
Cc: Rodolfo Giometti <giometti@...eenne.com>

---

[    0.151192] BUG: unable to handle kernel NULL pointer dereference at           (null)
[    0.151759] IP: [<ffffffffa2de3048>] parport_detach+0x24/0x95 [pps_parport]
[    0.153875] Process rmmod (pid: 22117, threadinfo ffff880061174000, task ffff8800613db000)
[    0.153875] Call Trace:
[    0.153875]  [<ffffffffa064c49c>] parport_unregister_driver+0x51/0x8b [parport]
[    0.153875]  [<ffffffffa2de364f>] pps_parport_exit+0x17/0x20 [pps_parport]
[    0.153875]  [<ffffffff8110e976>] sys_delete_module+0x328/0x3d2
[    0.153875]  [<ffffffff8168e7e8>] tracesys+0xe1/0xe6
---
 drivers/pps/clients/pps_parport.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pps/clients/pps_parport.c b/drivers/pps/clients/pps_parport.c
index e1b4705..7e9bcd4 100644
--- a/drivers/pps/clients/pps_parport.c
+++ b/drivers/pps/clients/pps_parport.c
@@ -194,7 +194,7 @@ static void parport_detach(struct parport *port)
 	struct pps_client_pp *device;
 
 	/* FIXME: oooh, this is ugly! */
-	if (strcmp(pardev->name, KBUILD_MODNAME))
+	if (!pardev || strcmp(pardev->name, KBUILD_MODNAME))
 		/* not our port */
 		return;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ