qio: Fix Qmsg panic in read_all_blocks()
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 20 Jul 2018 17:25:10 +0000 (13:25 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 20 Jul 2018 17:54:08 +0000 (13:54 -0400)
commit9196d29ad275f90b1e2bd0fd821fe2b48730d5f2
tree0d222e3ce48e12a1c0e21882ad86ca06bdca6903
parent84a977c4f4b5b27886294306641cce4d7eb1a962
qio: Fix Qmsg panic in read_all_blocks()

Qmsg queues will return a full block, regardless of the number of bytes.
Short reads on Qmsg queues will have BLEN > amt, which is fine.  Those
bytes are discarded, which is what you get with Qmsg.  We simply shouldn't
panic in those cases.

Reported-by: syzbot+2c8228df3c647d4f581e@syzkaller.appspotmail.com
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/src/ns/qio.c