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
7c36a9e24a
commit
ef8a6fe9fe
|
@ -626,7 +626,7 @@ zvol_geom_bio_strategy(struct bio *bp)
|
||||||
addr = bp->bio_data;
|
addr = bp->bio_data;
|
||||||
resid = bp->bio_length;
|
resid = bp->bio_length;
|
||||||
|
|
||||||
if (resid > 0 && (off < 0 || off >= volsize)) {
|
if (resid > 0 && off >= volsize) {
|
||||||
error = SET_ERROR(EIO);
|
error = SET_ERROR(EIO);
|
||||||
goto resume;
|
goto resume;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue