1. 09 Mar, 2011 1 commit
  2. 08 Mar, 2011 1 commit
    • Al Viro's avatar
      unfuck proc_sysctl ->d_compare() · dfef6dcd
      Al Viro authored
      a) struct inode is not going to be freed under ->d_compare();
      however, the thing PROC_I(inode)->sysctl points to just might.
      Fortunately, it's enough to make freeing that sucker delayed,
      provided that we don't step on its ->unregistering, clear
      the pointer to it in PROC_I(inode) before dropping the reference
      and check if it's NULL in ->d_compare().
      
      b) I'm not sure that we *can* walk into NULL inode here (we recheck
      dentry->seq between verifying that it's still hashed / fetching
      dentry->d_inode and passing it to ->d_compare() and there's no
      negative hashed dentries in /proc/sys/*), but if we can walk into
      that, we really should not have ->d_compare() return 0 on it!
      Said that, I really suspect that this check can be simply killed.
      Nick?
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      dfef6dcd
  3. 04 Mar, 2011 1 commit
    • Al Viro's avatar
      minimal fix for do_filp_open() race · 1858efd4
      Al Viro authored
      failure exits on the no-O_CREAT side of do_filp_open() merge with
      those of O_CREAT one; unfortunately, if do_path_lookup() returns
      -ESTALE, we'll get out_filp:, notice that we are about to return
      -ESTALE without having trying to create the sucker with LOOKUP_REVAL
      and jump right into the O_CREAT side of code.  And proceed to try
      and create a file.  Usually that'll fail with -ESTALE again, but
      we can race and get that attempt of pathname resolution to succeed.
      
      open() without O_CREAT really shouldn't end up creating files, races
      or not.  The real fix is to rearchitect the whole do_filp_open(),
      but for now splitting the failure exits will do.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      1858efd4
  4. 03 Mar, 2011 29 commits
  5. 02 Mar, 2011 8 commits