Hello all, I've been doing some work with a Linux kernel module that enables zero-copy I/O to block devices using a custom user/kernel interface. In porting this from an older Linux kernel to a more modern release, I ran into an issue when interacting with MD devices that I traced back to what I believe to be a problem in bio_map_user_iov. The problem and fix are described in the first attached patch. The second is a simple test module and user program which triggers the bug and validates the fix. Thanks, -m ps. This is my first attempt at pushing a patch upstream so please forgive any newbie mistakes.