diff options
| author | Alok Tiwari <[email protected]> | 2025-06-28 18:33:53 +0000 |
|---|---|---|
| committer | Michael S. Tsirkin <[email protected]> | 2025-08-01 13:11:08 +0000 |
| commit | 400cad513c78f9af72c5a20f3611c1f1dc71d465 (patch) | |
| tree | ba7f0771e276f18289bbf95498793aa7f0a585da /rust/helpers/rcu.c | |
| parent | virtio: virtio_dma_buf: fix missing parameter documentation (diff) | |
| download | kernel-400cad513c78f9af72c5a20f3611c1f1dc71d465.tar.gz kernel-400cad513c78f9af72c5a20f3611c1f1dc71d465.zip | |
vhost-scsi: Fix check for inline_sg_cnt exceeding preallocated limit
The condition comparing ret to VHOST_SCSI_PREALLOC_SGLS was incorrect,
as ret holds the result of kstrtouint() (typically 0 on success),
not the parsed value. Update the check to use cnt, which contains the
actual user-provided value.
prevents silently accepting values exceeding the maximum inline_sg_cnt.
Fixes: bca939d5bcd0 ("vhost-scsi: Dynamically allocate scatterlists")
Signed-off-by: Alok Tiwari <[email protected]>
Reviewed-by: Mike Christie <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Acked-by: Jason Wang <[email protected]>
Diffstat (limited to 'rust/helpers/rcu.c')
0 files changed, 0 insertions, 0 deletions
