Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/net-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 3 Dec 2007 16:15:36 +0000 (08:15 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 3 Dec 2007 16:15:36 +0000 (08:15 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/net-2.6: (27 commits)
  [INET]: Fix inet_diag dead-lock regression
  [NETNS]: Fix /proc/net breakage
  [TEXTSEARCH]: Do not allow zero length patterns in the textsearch infrastructure
  [NETFILTER]: fix forgotten module release in xt_CONNMARK and xt_CONNSECMARK
  [NETFILTER]: xt_TCPMSS: remove network triggerable WARN_ON
  [DECNET]: dn_nl_deladdr() almost always returns no error
  [IPV6]: Restore IPv6 when MTU is big enough
  [RXRPC]: Add missing select on CRYPTO
  mac80211: rate limit wep decrypt failed messages
  rfkill: fix double-mutex-locking
  mac80211: drop unencrypted frames if encryption is expected
  mac80211: Fix behavior of ieee80211_open and ieee80211_close
  ieee80211: fix unaligned access in ieee80211_copy_snap
  mac80211: free ifsta->extra_ie and clear IEEE80211_STA_PRIVACY_INVOKED
  SCTP: Fix build issues with SCTP AUTH.
  SCTP: Fix chunk acceptance when no authenticated chunks were listed.
  SCTP: Fix the supported extensions paramter
  SCTP: Fix SCTP-AUTH to correctly add HMACS paramter.
  SCTP: Fix the number of HB transmissions.
  [TCP] illinois: Incorrect beta usage
  ...

1  2 
fs/proc/generic.c

diff --combined fs/proc/generic.c
index 39f3d65190353cf08604a8765ed47946f1cf6b8e,c2b752341f89eeea1f71900fb73d4ffaee81e1a4..5fccfe222a63cdcd11830e65daaaf7f8c7820846
@@@ -374,9 -374,16 +374,16 @@@ static int proc_delete_dentry(struct de
        return 1;
  }
  
+ static int proc_revalidate_dentry(struct dentry *dentry, struct nameidata *nd)
+ {
+       d_drop(dentry);
+       return 0;
+ }
  static struct dentry_operations proc_dentry_operations =
  {
        .d_delete       = proc_delete_dentry,
+       .d_revalidate   = proc_revalidate_dentry,
  };
  
  /*
@@@ -397,8 -404,11 +404,11 @@@ struct dentry *proc_lookup(struct inod
                        if (de->namelen != dentry->d_name.len)
                                continue;
                        if (!memcmp(dentry->d_name.name, de->name, de->namelen)) {
-                               unsigned int ino = de->low_ino;
+                               unsigned int ino;
  
+                               if (de->shadow_proc)
+                                       de = de->shadow_proc(current, de);
+                               ino = de->low_ino;
                                de_get(de);
                                spin_unlock(&proc_subdir_lock);
                                error = -EINVAL;
@@@ -555,6 -565,41 +565,6 @@@ static int proc_register(struct proc_di
        return 0;
  }
  
 -/*
 - * Kill an inode that got unregistered..
 - */
 -static void proc_kill_inodes(struct proc_dir_entry *de)
 -{
 -      struct list_head *p;
 -      struct super_block *sb;
 -
 -      /*
 -       * Actually it's a partial revoke().
 -       */
 -      spin_lock(&sb_lock);
 -      list_for_each_entry(sb, &proc_fs_type.fs_supers, s_instances) {
 -              file_list_lock();
 -              list_for_each(p, &sb->s_files) {
 -                      struct file *filp = list_entry(p, struct file,
 -                                                      f_u.fu_list);
 -                      struct dentry *dentry = filp->f_path.dentry;
 -                      struct inode *inode;
 -                      const struct file_operations *fops;
 -
 -                      if (dentry->d_op != &proc_dentry_operations)
 -                              continue;
 -                      inode = dentry->d_inode;
 -                      if (PDE(inode) != de)
 -                              continue;
 -                      fops = filp->f_op;
 -                      filp->f_op = NULL;
 -                      fops_put(fops);
 -              }
 -              file_list_unlock();
 -      }
 -      spin_unlock(&sb_lock);
 -}
 -
  static struct proc_dir_entry *proc_create(struct proc_dir_entry **parent,
                                          const char *name,
                                          mode_t mode,
@@@ -729,6 -774,8 +739,6 @@@ void remove_proc_entry(const char *name
  continue_removing:
                if (S_ISDIR(de->mode))
                        parent->nlink--;
 -              if (!S_ISREG(de->mode))
 -                      proc_kill_inodes(de);
                de->nlink = 0;
                WARN_ON(de->subdir);
                if (!atomic_read(&de->count))