diff options
author | Toomas Soome <[email protected]> | 2020-09-02 19:30:29 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-02 09:30:29 -0700 |
commit | 0db1b84a6df462cee40f9eab24ac4489c654fa51 (patch) | |
tree | e97a860afbd564ead4edda8433e308fe23c31a59 /module | |
parent | 417e6467224ec697da5cc0f4425ce51f2ef4138e (diff) |
zvol: unsigned off can not be less than zero
Reviewed-by: Richard Elling <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Toomas Soome <[email protected]>
Closes #10867
Diffstat (limited to 'module')
-rw-r--r-- | module/os/freebsd/zfs/zvol_os.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/os/freebsd/zfs/zvol_os.c b/module/os/freebsd/zfs/zvol_os.c index 19018be3b..ecef075f9 100644 --- a/module/os/freebsd/zfs/zvol_os.c +++ b/module/os/freebsd/zfs/zvol_os.c @@ -626,7 +626,7 @@ zvol_geom_bio_strategy(struct bio *bp) addr = bp->bio_data; resid = bp->bio_length; - if (resid > 0 && (off < 0 || off >= volsize)) { + if (resid > 0 && off >= volsize) { error = SET_ERROR(EIO); goto resume; } |