1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-24 09:13:20 -05:00
linux/drivers/block/drbd
Christoph Böhmwalder 4b9c2edaf7 drbd: swap bvec_set_page len and offset
bvec_set_page has the following signature:

static inline void bvec_set_page(struct bio_vec *bv, struct page *page,
		unsigned int len, unsigned int offset)

However, the usage in DRBD swaps the len and offset parameters. This
leads to a bvec with length=0 instead of the intended length=4096, which
causes sock_sendmsg to return -EIO.

This leaves DRBD unable to transmit any pages and thus completely
broken.

Swapping the parameters fixes the regression.

Fixes: eeac7405c7 ("drbd: Use sendmsg(MSG_SPLICE_PAGES) rather than sendpage()")
Reported-by: Serguei Ivantsov <manowar@gsc-game.com>
Link: https://lore.kernel.org/regressions/CAKH+VT3YLmAn0Y8=q37UTDShqxDLsqPcQ4hBMzY7HPn7zNx+RQ@mail.gmail.com/
Cc: stable@vger.kernel.org
Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Link: https://lore.kernel.org/r/20230906133034.948817-1-christoph.boehmwalder@linbit.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-09-06 07:33:03 -06:00
..
drbd_actlog.c
drbd_bitmap.c
drbd_buildtag.c
drbd_debugfs.c
drbd_debugfs.h
drbd_int.h
drbd_interval.c
drbd_interval.h
drbd_main.c drbd: swap bvec_set_page len and offset 2023-09-06 07:33:03 -06:00
drbd_nl.c
drbd_nla.c
drbd_nla.h
drbd_polymorph_printk.h
drbd_proc.c
drbd_protocol.h
drbd_receiver.c
drbd_req.c
drbd_req.h
drbd_state.c
drbd_state.h
drbd_state_change.h
drbd_strings.c
drbd_strings.h
drbd_vli.h
drbd_worker.c
Kconfig
Makefile