NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/53217: -current: dumping to wedges on GPT disks broken
The following reply was made to PR kern/53217; it has been noted by GNATS.
From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/53217: -current: dumping to wedges on GPT disks broken
Date: Fri, 27 Apr 2018 15:53:58 +0200
On Fri, Apr 27, 2018 at 01:50:01PM +0000, Frank Kardel wrote:
> dk.c:dkdump()
> 1624 bdev = bdevsw_lookup(sc->sc_pdev);
> 1625 rv = (*bdev->d_dump)(sc->sc_pdev, blkno +
> sc->sc_offset, va, size);
OK, I missed the parent device here.
> In dksubr.c dkdump (not the wedge code, the general disk support) then
> examines as I quoted
> 796 /* Convert to disk sectors. Request must be a
> multiple of size. */
> 797 part = DISKPART(dev);
> ...
> 806 p = &lp->d_partitions[part];
And here accessing the label at all is clearly a bug.
We need to remove that check and move it into the callers.
Martin
Home |
Main Index |
Thread Index |
Old Index