[rsbac] RSBAC and OpenAFS Kernel Null Pointer Exception

Amon Ott ao at rsbac.org
Tue Apr 6 08:04:37 CEST 2004


On Dienstag, 6. April 2004 07:54, Amon Ott wrote:
> On Freitag, 2. April 2004 16:58, Rob See wrote:
> > 	I have applied the RSBAC patches(1.2.2) to a clean 2.4.25 source tree. 
> > I also compiled the latest stable OpenAFS (1.2.11). Whenever I try to 
> > create a symlink from one file on AFS to another location on AFS, I get 
> > a kernel OOPS because of a Null Pointer Exception. I have traced the 
> > problem down to the following chunk of code in fs/namei.c, starting 
> > around line 2224.
> > 
> > #ifdef CONFIG_RSBAC
> >          if (!error)
> >            {
> >              rsbac_new_target_id.file.device = dentry->d_inode->i_dev;
> >              rsbac_new_target_id.file.inode  = dentry->d_inode->i_ino;
> 
> 
> > int afs_linux_symlink(struct inode *dip, struct dentry *dp,
> >                        const char *target)
> > {
> >      int code;
> >      cred_t *credp = crref();
> >      struct vattr vattr;
> >      const char *name = dp->d_name.name;
> > 
> >      /* If afs_symlink returned the vnode, we could instantiate the
> >       * dentry. Since it's not, we drop this one and do a new lookup.
> >       */
> >      d_drop(dp);   <========= Problem ?
> 
> Yes, this is the problem. Could you please retry with the attached patch 
> against namei.c? It can still create a race because of this early drop, 
> but the effects should not be visible.

The absolutely correct solution would be to relookup the dentry in 
vfs_symlink just for notification of AFS symlinks.

BTW, if the problem still exists, you could also try to enable the RSBAC 
kernel config switch 'No decision on net mounts' in the 'Other options' 
section.

Amon.
-- 
http://www.rsbac.org - GnuPG: 2048g/5DEAAA30 2002-10-22



More information about the rsbac mailing list