Thread (4 messages) flat view 4 messages, 2 authors, 2021-09-29

Re: [RFC PATCH] scsi: storvsc: Fix validation for unsolicited incoming packets

From: Andrea Parri <parri.andrea@gmail.com>
Date: 2021-09-29 13:56:15
Also in: linux-scsi, lkml

quoted
The patch looks good. But for readability, I'd suggested put the length
checks together like this:

	u32 minlen = rqst_id ? sizeof(struct vstor_packet) -
		stor_device->vmscsi_size_delta : VSTOR_MIN_UNSOL_PKT_SIZE;

	if (pktlen < minlen) {
		dev_err(&device->device,
			   "Invalid pkt: id=%llu, len=%u, minlen=%u\n",
			   rqst_id, pktlen, minlen);
		continue;
	}

Thanks.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
The tag was meant to be:
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Thank you, Haiyang.  I'll update as suggested.

  Andrea
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help