From: Paul Menzel <paul.menzel@giantmonkey.de>
To: "James E. J. Bottomley" <JBottomley@odin.com>,
linux-scsi@vger.kernel.org
Cc: submit@bugs.debian.org
Subject: Re: NULL pointer dereference: IP: [<f828a00c>] sr_runtime_suspend+0xc/0x20 [sr_mod]
Date: Fri, 16 Oct 2015 09:54:37 +0200 [thread overview]
Message-ID: <1444982077.2350.0.camel@giantmonkey.de> (raw)
In-Reply-To: <1444957547.1325.2.camel@giantmonkey.de>
[-- Attachment #1: Type: text/plain, Size: 4268 bytes --]
Package: linux-image-4.2.0-1-686-pae
Version: 4.2.3-2
Severity: important
Dear Linux SCSI folks,
please don’t include the address submit@bugs.debian.org in your reply.
Am Freitag, den 16.10.2015, 03:05 +0200 schrieb Paul Menzel:
> using Debian Sid/unstable with Linux 4.2.3-1 upgrading from systemd
> 227-1 to 227-2 [1] and other packages, the system doesn’t start up
> anymore and the /dev/md1 device doesn’t seem to be found and I am
> dropped into shell from initramfs (BusyBox).
>
> Only having wireless LAN and no serial or USB debug capabilities, and
> mount a USB storage device did not work, I manually copied the beginning
> of the Oops.
>
> ```
> BUG: unable to handle kernel NULL pointer dereference at 00000014
> IP: [<f828a00c>] sr_runtime_suspend+0xc/0x20 [sr_mod]
> *pdpt = 000000003696e001 *pde = 000000000000000000
> Oops: 0000 [#1] SMB
> Modules linked in: sd_mod(+) sr_mod(+) cdrom ata_generic ohci_pci ahci libahci pata_amd firwire_ohci firewire_core crc_iti_t forcedeth libata scsi_mod ohci_hcd ehci_pci ehci_hcd usbcore usb_common fan thermal thermal_sys floppy(+)
> CPU: 1 PID: 73 Comm: systemd-udevd Not tainted 4.2.0-1-686-pae #1 Debian 4.2.3-1
> Hardware name: Packard Bell imedia S3210/WMCP78M, BIOs P01-B2 11/06/2009
> task: f68dd040 ti: f6988000 task.ti: f6988000
> EIP: 0060:[<fh28a00c>] EFLAGS: 00010246 CPU: 1
> EIP is at sr_runtime_suspend+0xc/0x20 [sr_mod]
> EAX: 00000000 EBX: f6a30cd8 ECX: f6c03d2c EDX: 00000000
> ESI: 00000000 EDI: f828e100 EBP: f6989ba8 ESP: f6989b88
> DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
> CR0: 8005003b CR2: 00000014 CR3: 3696d780 CR4: 000006f0
> Stack:
> af83346c3 00000000 00000001 fffffff5 f6a7d150 f6a30cd8 f6a30d3c 00000000
> f6989bbc c1390cb7 f6a30cd8 f8334660 00000000 f6989bd0 c1390d0f f6a30cd8
> f8334660 00000000 f6989c0c c13916cb f694a614 f68dd040 00000000 00000008
> Call Trace:
> […] ? scsi_runtime_suspend+0x63/0xa0 [scsi_mod]
> […] ? __rpm_callback+0x27/0x60
> […]
> ```
>
> I tried also to boot with Linux 4.1 and it fails the same way.
>
> Is that a known problem and has been fixed in the mean time? It’d be
> great if you helped me getting the system to boot again. Please tell me
> if you need more information to debug this issue and I’ll do my best to
> get it.
Ben Hutchings asked me to test the patch below to get more debug
information.
```
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 8bd54a6..dd5b5b2 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -144,6 +144,12 @@ static int sr_runtime_suspend(struct device *dev)
{
struct scsi_cd *cd = dev_get_drvdata(dev);
+ if (WARN_ON(!cd)) {
+ pr_info("%s: cd == NULL; power.usage_count = %d\n",
+ __func__, atomic_read(&dev->power.usage_count));
+ return 0;
+ }
+
if (cd->media_present)
return -EBUSY;
else
@@ -652,7 +658,13 @@ static int sr_probe(struct device *dev)
struct scsi_cd *cd;
int minor, error;
- scsi_autopm_get_device(sdev);
+ error = scsi_autopm_get_device(sdev);
+ if (error) {
+ pr_err("%s: scsi_autopm_get_device returned %d\n",
+ __func__, error);
+ return error;
+ }
+
error = -ENODEV;
if (sdev->type != TYPE_ROM && sdev->type != TYPE_WORM)
goto fail;
@@ -719,6 +731,9 @@ static int sr_probe(struct device *dev)
if (register_cdrom(&cd->cdi))
goto fail_put;
+ pr_info("%s: power.usage_count = %d\n",
+ __func__, atomic_read(&dev->power.usage_count));
+
/*
* Initialize block layer runtime PM stuffs before the
* periodic event checking request gets started in add_disk.
```
I’ll try that as soon as a spare drive has arrived, where I can copy the
data to as a backup.
More thoughts are welcome! Especially, if that error suggests a failing
drive or not.
Thanks,
Paul
> [1] http://metadata.ftp-master.debian.org/changelogs//main/s/systemd/systemd_227-2_changelog
--
GPG-Schlüssel: 33623E9B
Fingerabdruck = 0EB1 649D 4361 D04F 3C70 6F71 4DD7 BF75 3362 3E9B
Giant Monkey Software Engineering GmbH
Brunnenstr. 7D
10119 Berlin Mitte
Geschäftsführer Adrian Fuhrmann, Lion Vollnhals und Paul Menzel
USt-IdNr.: DE281524720
HRB 139495 B Amtsgericht Charlottenburg
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-10-16 7:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 1:05 NULL pointer dereference: IP: [<f828a00c>] sr_runtime_suspend+0xc/0x20 [sr_mod] Paul Menzel
2015-10-16 7:54 ` Paul Menzel [this message]
2015-10-16 8:52 ` Paul Menzel
2015-10-20 1:39 ` Ben Hutchings
2015-10-31 9:39 ` Paul Menzel
2015-11-01 1:56 ` Alan Stern
2015-11-01 2:05 ` Alan Stern
2016-01-09 15:23 ` Paul Menzel
2016-01-09 16:36 ` Alan Stern
2016-01-10 11:44 ` Erich Schubert
2016-01-10 15:32 ` Alan Stern
[not found] <CAGKbab941Nh7Sy1NTZC6ySxG_P5g7HpjATQ_GSCvDY8y=qgmHA@mail.gmail.com>
2016-01-19 16:38 ` Alan Stern
2016-01-19 16:52 ` Paul Menzel
2016-01-19 21:08 ` Alan Stern
2016-01-19 23:20 ` Paul Menzel
2016-01-20 22:07 ` Alexandre Rossi
2016-02-09 16:47 ` Paul Menzel
2016-02-09 19:56 ` Alexandre Rossi
2016-02-09 20:51 ` Ben Hutchings
2016-02-18 16:27 ` Alan Stern
2016-02-22 23:15 ` Alexandre Rossi
2016-02-23 15:14 ` Alan Stern
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=1444982077.2350.0.camel@giantmonkey.de \
--to=paul.menzel@giantmonkey.de \
--cc=JBottomley@odin.com \
--cc=linux-scsi@vger.kernel.org \
--cc=submit@bugs.debian.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox