diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2020-03-23 15:06:30 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-03-31 17:57:28 +0200 |
commit | 25e5cb780e62bde432b401f312bb847edc78b432 (patch) | |
tree | 96ef86307c52bda1f9f810b700777d4b5b78791e /net/tipc/node.c | |
parent | d038dd815fc56cd77ae8a51bb6d1d11e3aab9609 (diff) |
nvme-tcp: fix possible crash in write_zeroes processing
We cannot look at blk_rq_payload_bytes without first checking
that the request has a mappable physical segments first (e.g.
blk_rq_nr_phys_segments(rq) != 0) and only then to take the
request payload bytes. This caused us to send a wrong sgl to
the target or even dereference a non-existing buffer in case
we actually got to the data send sequence (if it was in-capsule).
Reported-by: Tony Asleson <tasleson@redhat.com>
Suggested-by: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'net/tipc/node.c')
0 files changed, 0 insertions, 0 deletions