From: Borislav Petkov <bp@alien8.de>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: linux-ide@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Linus Torvalds <torvalds@linux-foundation.org>,
Jens Axboe <axboe@kernel.dk>,
Bart Van Assche <bart.vanassche@sandisk.com>,
linux-kernel@vger.kernel.org
Subject: Re: [cdrom_check_status] BUG: unable to handle kernel NULL pointer dereference at 000001c0
Date: Tue, 7 Nov 2017 15:01:02 +0100 [thread overview]
Message-ID: <20171107140102.n2pncsaer5o5hmt7@pd.tnic> (raw)
In-Reply-To: <20171107130626.dk5rxrprolvcne5w@wfg-t540p.sh.intel.com>
On Tue, Nov 07, 2017 at 09:06:26PM +0800, Fengguang Wu wrote:
> It turns out rather hard to reproduce -- that's the only occurrence in
> 100 boots. Perhaps we'll have to give up on this.
Right,
you could blacklist CONFIG_IDE from your randconfig testing - IDE has
been going away since forever :-)
Alternatively, we could brown-paper bag it with something like this:
---
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index a7355ab3bb22..6ff0be8cbdc9 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -867,11 +867,16 @@ static void msf_from_bcd(struct atapi_msf *msf)
int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense)
{
struct cdrom_info *info = drive->driver_data;
- struct cdrom_device_info *cdi = &info->devinfo;
+ struct cdrom_device_info *cdi;
unsigned char cmd[BLK_MAX_CDB];
ide_debug_log(IDE_DBG_FUNC, "enter");
+ if (!info)
+ return -EIO;
+
+ cdi = &info->devinfo;
+
memset(cmd, 0, BLK_MAX_CDB);
cmd[0] = GPCMD_TEST_UNIT_READY;
--
but from looking at this (I had forgotten how, hm, "interesting" the
IDE code was :-)) it looks like some sort of a race where we've called
->release earlier and drive->driver_data is gone by the time the
workqueue function runs. Or something to that effect...
Anyway, you can still give me your qemu command line and I can try to
debug it, if you'd like. But yeah, it would probably be a waste of time
as IDE is long deprecated...
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
next prev parent reply other threads:[~2017-11-07 14:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 10:25 Fengguang Wu
2017-11-07 10:43 ` Borislav Petkov
2017-11-07 13:06 ` Fengguang Wu
2017-11-07 14:01 ` Borislav Petkov [this message]
2017-11-07 16:01 ` Linus Torvalds
2017-11-07 16:37 ` [PATCH] drivers/ide-cd: Handle missing driver data during status check gracefully Borislav Petkov
2017-11-07 17:13 ` Linus Torvalds
2017-11-08 0:08 ` David Miller
2017-11-07 16:34 ` [cdrom_check_status] BUG: unable to handle kernel NULL pointer dereference at 000001c0 Fengguang Wu
2017-11-07 16:29 ` Bart Van Assche
[not found] ` <CGME20171108162818epcas2p25c73e1093a9d8f20d9efb2f3cd469b45@epcas2p2.samsung.com>
2017-11-08 16:28 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20171108165043epcas2p2508e32c074e66a2c08b9a006f248f37c@epcas2p2.samsung.com>
2017-11-08 16:50 ` Bartlomiej Zolnierkiewicz
[not found] ` <CGME20171108180944epcas1p18bb9337cb4cfb5c7e9bd5f6eccfa33f4@epcas1p1.samsung.com>
2017-11-08 18:09 ` Bartlomiej Zolnierkiewicz
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=20171107140102.n2pncsaer5o5hmt7@pd.tnic \
--to=bp@alien8.de \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@sandisk.com \
--cc=davem@davemloft.net \
--cc=fengguang.wu@intel.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®