[rsbac] RSBAC and OpenAFS Kernel Null Pointer Exception

Amon Ott ao at rsbac.org
Tue Apr 6 07:54:50 CEST 2004


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.

Amon.
-- 
http://www.rsbac.org - GnuPG: 2048g/5DEAAA30 2002-10-22
-------------- nächster Teil --------------
Ein Dateianhang mit Bin?rdaten wurde geschreddert...
Dateiname   : namei.diff
Dateityp    : text/x-diff
Dateigr??e  : 411 bytes
Beschreibung: nicht verf?gbar
URL         : http://www.rsbac.org/pipermail/rsbac/attachments/20040406/7da28fc0/namei.bin


More information about the rsbac mailing list