public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: linux-ide@vger.kernel.org, Borislav Petkov <bp@alien8.de>,
	"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: Wed, 08 Nov 2017 19:09:42 +0100	[thread overview]
Message-ID: <4286386.v3LAhFsTvW@amdc3058> (raw)
In-Reply-To: <7885793.0mqNGdeUvE@amdc3058>

On Wednesday, November 08, 2017 05:28:16 PM Bartlomiej Zolnierkiewicz wrote:

> Something is very wrong here as pci_request_selected_regions() in
> drivers/ide/setup-pci.c:ide_pci_enable() should allocate PCI resources
> so the second probe attempt should not happen. Also interface/device
> names reuse should be prevented by ide_find_port_slot()..

OK, I see now what is going on here:

...
CONFIG_DEBUG_TEST_DRIVER_REMOVE=y
...

config DEBUG_TEST_DRIVER_REMOVE
	bool "Test driver remove calls during probe (UNSTABLE)"
	depends on DEBUG_KERNEL
	help
	  Say Y here if you want the Driver core to test driver remove functions
	  by calling probe, remove, probe. This tests the remove path without
	  having to unbind the driver or unload the driver module.

	  This option is expected to find errors and may render your system
	  unusable. You should say N here unless you are explicitly looking to
	  test this functionality.

We actually see race on ->remove inside IDE's ide-cd.c driver related to
disk_check_events() handling..

It is not worth to continue with fixing IDE but from the quick look SCSI
sr.c may have similar problem - it may be worth to try to reproduce it
using libata's piix driver (disable CONFIG_IDE and enable CONFIG_BLK_DEV_SR,
CONFIG_ATA_PIIX is already enabled).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


      parent reply	other threads:[~2017-11-08 18:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20171108162818epcas2p25c73e1093a9d8f20d9efb2f3cd469b45@epcas2p2.samsung.com>
2017-11-07 10:25 ` [cdrom_check_status] BUG: unable to handle kernel NULL pointer dereference at 000001c0 Fengguang Wu
2017-11-07 10:43   ` Borislav Petkov
2017-11-07 13:06     ` Fengguang Wu
2017-11-07 14:01       ` Borislav Petkov
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
2017-11-08 16:28   ` Bartlomiej Zolnierkiewicz
2017-11-08 16:50     ` Bartlomiej Zolnierkiewicz
2017-11-08 18:09     ` Bartlomiej Zolnierkiewicz [this message]

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=4286386.v3LAhFsTvW@amdc3058 \
    --to=b.zolnierkie@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=bart.vanassche@sandisk.com \
    --cc=bp@alien8.de \
    --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