mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
zvol: unsigned off can not be less than zero
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Toomas Soome <tsoome@me.com> Closes #10867
This commit is contained in:
parent
417e646722
commit
0db1b84a6d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user