linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Handle NULL make_request_fn in generic_make_request()
@ 2020-01-23  9:17 Stefan Bader
  2020-01-23  9:17 ` [PATCH 1/1] blk/core: Gracefully handle unset make_request_fn Stefan Bader
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Bader @ 2020-01-23  9:17 UTC (permalink / raw)
  To: linux-kernel, dm-devel, linux-block
  Cc: Alasdair Kergon, Mike Snitzer, Jens Axboe, Tyler Hicks

In ff36ab34583a "dm: remove request-based logic from make_request_fn wrapper",
device creation became a 2 stage process. In the first stage, the block
device is created which has a queue set up but no mapping function set.
This is done in the second stage, when the mapping table is supplied. At
that stage the device can become either multi-queue/request based or
doing the mapping on the bio level.

So right now, it is possible to crash the kernel by doing a
- dmsetup create --notable <name>
- mount /dev/dm-<minor> <somewhere>

While this may also need to be some fixing up in the device-
mapper codebase, it also should be handled from the block core as
allocating a queue can potentially be done separate from assigning a
mapping function.
There is already one check for not having set up a queue for a device,
so this just adds an additional check for make_request_fn being unset
before trying to further submit the requests.

-Stefan

Stefan Bader (1):
  blk/core: Gracefully handle unset make_request_fn

 block/blk-core.c | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-01-28 16:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23  9:17 [PATCH 0/1] Handle NULL make_request_fn in generic_make_request() Stefan Bader
2020-01-23  9:17 ` [PATCH 1/1] blk/core: Gracefully handle unset make_request_fn Stefan Bader
2020-01-23 10:23   ` Tyler Hicks
2020-01-23 10:35   ` Mike Snitzer
2020-01-23 17:28     ` Mike Snitzer
2020-01-23 18:52       ` Jens Axboe
2020-01-24  6:04         ` Stefan Bader
2020-01-27 19:32         ` Mike Snitzer
2020-01-27 19:39           ` Jens Axboe
2020-01-28 14:32           ` Stefan Bader
2020-01-28 16:26             ` Mike Snitzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).