Commit bb4ebda7 authored by Tzung-Bi Shih's avatar Tzung-Bi Shih Committed by Richard Fung
Browse files

ANDROID: virtio_blk: Remove BUG_ON for discard/zero ops



This is technically a re-apply for the ANDROID commit 6192b3eb73aa
("ANDROID: virtio_blk: Remove BUG_ON for discard/zero ops") which has
been reverted after v5.15.54 stable merge.  The original ANDROID patch
doesn't apply after the merge.

Also see b/238595840#comment4.

The copied commit message from the original one:
The virtio_blk driver used by cuttlefish can crash if discard/zero ops,
added in 4.20, pass through virtio_queue_rq(). Our theory is that this
happens because multiple discards are merged, causing nr_phys_segments
to be increased beyond the sg_elem size. This makes sense as a
discard/zero is a form of I/O not backed by specific data.

This patch should be submitted upstream once the true root cause has
been tracked down and full analysis of the issue has been done.

[CPNOTE: 20/07/21] Lee: This is planned for upstreaming - more info in the bug

BUG=b:238595840
BUG=b:144592287
TEST=Build and test on various affected systems

Signed-off-by: default avatarTzung-Bi Shih <tzungbi@chromium.org>
Change-Id: Ic4e2519dc11e3aaac780b3d24a898f26a3ab96af
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4033156


Commit-Queue: David Stevens <stevensd@chromium.org>
Reviewed-by: default avatarSuleiman Souhlal <suleiman@chromium.org>
Tested-by: default avatarDavid Stevens <stevensd@chromium.org>
Signed-off-by: default avatarRichard Fung <richardfung@google.com>
parent 183a7fb5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment