[SRU F/Unstable 0/1] Handle I/O on a blk device without request function

Stefan Bader stefan.bader at canonical.com
Thu Jan 23 08:33:02 UTC 2020


This is to handle a situation which only recently started to be
exercised but the underlying breakage has been around since 4.1
(Xenial onwards).

The plan is to try getting this upstream and backported via
stable as it is nothing that will happen accidental in a normal
workflow.

Just for the background, this was observed when uc20 started to
support encrypted devices. During the initial setup, when the
encrypted device is created, there is a short period of time
(cryptsetup luksOpen does under the hood have first the device-
mapper target without a mapping table and then supply the mapping)
where the logical block device is around but has no function set up
to do the I/O mapping. This stage already fires a uvent about the
block device being added and this is acted on by a udev rule which
only takes action when inside a snap, and this action attempts a
mount which sends I/O to detect which (or wheteher) filesystem is
on the block device/partition. And that causes a kernel crash.

-Stefan

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

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

-- 
2.17.1




More information about the kernel-team mailing list