Subject: Re: ccdioctl in no context
To: Jed Davis <jdev@panix.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 04/24/2006 09:40:47
--5vNYLRcllDrimb99
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Apr 23, 2006 at 07:03:52PM -0400, Jed Davis wrote:
> I notice that ccdioctl no longer works without a context, as it does
> "curlwp->l_proc" at the top.  The Xen disk backend driver does
> DIOGCPART on the underlying device to get its size, and xbd-on-ccd
> used to work.
>=20
> I've attached a change that attempts to make it do the right thing,
> based on what it was sort of doing before, and now xbd-on-ccd works
> again.  But I'm not hugely familiar with this area of things yet, so I
> invite comment.

What you sent will work fine.

The one comment I'd make is that, as best I can see, struct proc *p is=20
only used to get the credentials. If so, then skip it and consolidate the=
=20
l =3D=3D NULL test in the uc assignment.

Now it could be that I missed something as I only saw the diffs. If p is=20
used in other parts of the routine that weren't in the patch (as they=20
didn't chante), then forget what I said. :-)

Take care,

Bill

--5vNYLRcllDrimb99
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFETP+PWz+3JHUci9cRAg7kAJ9uecfdsxbE7pwBscDiVxMDmQMuDwCfXZVC
p1fK94+d2v1IbKmv/QFyywo=
=VIbu
-----END PGP SIGNATURE-----

--5vNYLRcllDrimb99--