All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: linux-kernel@vger.kernel.org
Cc: Rodolfo Giometti <giometti@enneenne.com>
Subject: [PATCH 04/12] pps: pps_parport: fix oops on module unloading
Date: Fri, 14 Dec 2012 15:02:40 +0400	[thread overview]
Message-ID: <20121214110240.11019.48429.stgit@zurg> (raw)
In-Reply-To: <20121214110229.11019.63713.stgit@zurg>

Seems like port->cad is NULL for unused ports

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Rodolfo Giometti <giometti@enneenne.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;
 


  parent reply	other threads:[~2012-12-14 11:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14 11:02 [PATCH 01/12] tools/testing/modules: introduce test which loads/unloads random modules Konstantin Khlebnikov
2012-12-14 11:02 ` [PATCH 02/12] driver core: add debug-objects debug for device-drivers Konstantin Khlebnikov
2012-12-14 11:02 ` [PATCH 03/12] mISDN: fix race in timer canceling on module unloading Konstantin Khlebnikov
2012-12-14 18:16   ` David Miller
2012-12-14 11:02 ` Konstantin Khlebnikov [this message]
2012-12-14 11:02 ` [PATCH 05/12] staging: vme_pio2: fix oops " Konstantin Khlebnikov
2012-12-17 12:01   ` Martyn Welch
2012-12-14 11:02 ` [PATCH 06/12] media/rc: fix oops on unloading module rc-core Konstantin Khlebnikov
2012-12-14 11:02 ` [PATCH 07/12] stmmac: fix platform driver unregistering Konstantin Khlebnikov
2012-12-14 18:16   ` David Miller
2012-12-14 11:02 ` [PATCH 08/12] bonding: do not cancel works in bond_uninit() Konstantin Khlebnikov
2012-12-14 18:16   ` David Miller
2012-12-14 11:02 ` [PATCH 09/12] pps: fix device destruction ordering Konstantin Khlebnikov
2012-12-14 11:03 ` [PATCH 10/12] mac802154: fix destructon ordering for ieee802154 devices Konstantin Khlebnikov
2012-12-14 18:16   ` David Miller
2012-12-14 18:16     ` David Miller
2012-12-14 11:03 ` [PATCH 11/12] firmware/dmi-sysfs: fix sysfs warning on module unload Konstantin Khlebnikov
2012-12-14 11:03 ` [PATCH 12/12] edac: fix kernel panic on module unloading Konstantin Khlebnikov
2012-12-14 11:26   ` Alan Cox
2012-12-14 11:50     ` Borislav Petkov
2012-12-14 11:55     ` Konstantin Khlebnikov
2012-12-14 13:26       ` Alan Cox
2012-12-15 17:53   ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121214110240.11019.48429.stgit@zurg \
    --to=khlebnikov@openvz.org \
    --cc=giometti@enneenne.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.