CHROMIUM: virtio_blk: fix incorrect container_of
Pass the virtio_blk ptr directly to virtblk_setup_cmd and read the virtio_device from that pointer, rather than trying to use container_of to go the other direction. This fixes an incorrect usage of the container_of introduced by 7c6c7d6b7dc8. The container_of macro should be given a pointer to a nested struct, but it was instead given a pointer to a function parameter. Things happens to work if compiled with clang, perhaps due to inlining, but if compiled with then the BUG_ON is always triggered. The original ANDROID patch has been upstreamed in 5.17. BUG=None TEST=make vmlinux; rsync; arc.Boot.vm TEST=emerge and deploy arcvm-kernel-ack-5_10; arc.Boot.vm Change-Id: Ibb4866448a13592317a4b153172f1eb664241988 Signed-off-by:David Stevens <stevensd@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4170283 Reviewed-by:
Suleiman Souhlal <suleiman@chromium.org> Signed-off-by:
Richard Fung <richardfung@google.com>
Loading
Please sign in to comment