]> git.baikalelectronics.ru Git - kernel.git/commit
rds: rds_msg_zcopy should return error of null rm->data.op_mmp_znotifier
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Thu, 22 Feb 2018 21:40:27 +0000 (13:40 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Feb 2018 17:30:52 +0000 (12:30 -0500)
commite9a690a235423a48998f199d931938c46e651d3b
treee03e5079d90724f8191618d5983afdc09868d356
parent6bf1a16c5982363d47a2b90bf8ebba78ab017d9b
rds: rds_msg_zcopy should return error of null rm->data.op_mmp_znotifier

if either or both of MSG_ZEROCOPY and SOCK_ZEROCOPY have not been
specified, the rm->data.op_mmp_znotifier allocation will be skipped.
In this case, it is invalid ot pass down a cmsghdr with
RDS_CMSG_ZCOPY_COOKIE, so return EINVAL from rds_msg_zcopy for this
case.

Reported-by: syzbot+f893ae7bb2f6456dfbc3@syzkaller.appspotmail.com
Fixes: c10ff07a453d ("rds: zerocopy Tx support.")
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/send.c