Hi Juergen,

it's incorrect to pass a NULL kcred_t* down; if PCFS does this in syncpcp(), then it needs to be fixed.

If you want to log a bug for that against kernel/pcfs, and use CRED() instead of NULL in the field (which should fix it), I'll sponsor that fix for you (got those 2kB ones of yours lined up anyway).

On Wed, 30 May 2007, Juergen Keil wrote:

[ ... ]
pc_rele() calls syncpcp(), which calls fop_putpage with a NULL cred_t ?

Here:

http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/pcfs/pc_node.c#204

As mentioned, I do think it should use CRED() instead of ((struct cred *)0).

FrankH.



usr/src/uts/common/os/cred.c, crgetmapped() might have to handle a
NULL cred_t arg?


/*
* If the credential contains any ephemeral IDs, map the credential
* to nobody.
*/
cred_t *
crgetmapped(const cred_t *cr)
{
       if (cr->cr_ksid != NULL) {
               int i;

               for (i = 0; i < KSID_COUNT; i++)
                       if (cr->cr_ksid->kr_sidx[i].ks_id > MAXUID)
                               return (ephemeral_data.nobody);
               if (cr->cr_ksid->kr_sidlist != NULL &&
                   cr->cr_ksid->kr_sidlist->ksl_neid > 0) {
                               return (ephemeral_data.nobody);
               }
       }

       return ((cred_t *)cr);
}



Or the VOPXID_MAP_CR macro in usr/src/uts/common/fs/vnode.c has to
handle the NULL cr; shouldn't call crgetmapped() when cr == NULL ?

_______________________________________________
ufs-discuss mailing list
[email protected]

_______________________________________________
ufs-discuss mailing list
[email protected]

Reply via email to