Add a missing return statement to g_concat_kernel_dump().
The error occurs when upper layers attempt an out-of-bounds write. Submitted by: Noah Bergbauer <noah.bergbauer@tum.de> MFC after: 1 week
This commit is contained in:
parent
8e7127fd91
commit
3843d88ca8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344600
@ -238,8 +238,10 @@ g_concat_kernel_dump(struct bio *bp)
|
||||
sc->sc_disks[i].d_end > gkd->offset)
|
||||
break;
|
||||
}
|
||||
if (i == sc->sc_ndisks)
|
||||
if (i == sc->sc_ndisks) {
|
||||
g_io_deliver(bp, EOPNOTSUPP);
|
||||
return;
|
||||
}
|
||||
disk = &sc->sc_disks[i];
|
||||
gkd->offset -= disk->d_start;
|
||||
if (gkd->length > disk->d_end - disk->d_start - gkd->offset)
|
||||
|
Loading…
Reference in New Issue
Block a user