GEOM_VOL panics when audio CD is present

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Dec 30 11:39:22 PST 2004


In message <xzpsm5nvb53.fsf at dwp.des.no>, =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=
 writes:
>--=-=-=
>Content-Type: text/plain; charset=iso-8859-1
>Content-Transfer-Encoding: quoted-printable
>
>Any objections to the attached patch?  It's not the most efficient
>solution, but it is the one least likely to give us surprises down the
>road.

I think the right check is to make sure the sectorsize is a power
of two && > DEV_BSIZE.


	if (!powerof2(cp->provider->sectorsize) || 
	    cp->provider->sectorsize < DEV_BSIZE)
		return (EINVAL)

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-geom mailing list