11 Dec, 2008

1 commit

  • Miles Lane tailing /sys files hit a BUG which Pekka Enberg has tracked
    to my 966c8c12dc9e77f931e2281ba25d2f0244b06949 sprint_symbol(): use
    less stack exposing a bug in slub's list_locations() -
    kallsyms_lookup() writes a 0 to namebuf[KSYM_NAME_LEN-1], but that was
    beyond the end of page provided.

    The 100 slop which list_locations() allows at end of page looks roughly
    enough for all the other stuff it might print after the symbol before
    it checks again: break out KSYM_SYMBOL_LEN earlier than before.

    Latencytop and ftrace and are using KSYM_NAME_LEN buffers where they
    need KSYM_SYMBOL_LEN buffers, and vmallocinfo a 2*KSYM_NAME_LEN buffer
    where it wants a KSYM_SYMBOL_LEN buffer: fix those before anyone copies
    them.

    [akpm@linux-foundation.org: ftrace.h needs module.h]
    Signed-off-by: Hugh Dickins
    Cc: Christoph Lameter
    Cc Miles Lane
    Acked-by: Pekka Enberg
    Acked-by: Steven Rostedt
    Acked-by: Frederic Weisbecker
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

21 Oct, 2008

1 commit


10 Oct, 2008

3 commits

  • After commit 831830b5a2b5d413407adf380ef62fe17d6fcbf2 aka
    "restrict reading from /proc//maps to those who share ->mm or can ptrace"
    sysctl stopped being relevant because commit moved security checks from ->show
    time to ->start time (mm_for_maps()).

    Signed-off-by: Alexey Dobriyan
    Acked-by: Kees Cook

    Alexey Dobriyan
     
  • Make process personality flags visible in /proc. Since a process's
    personality is potentially sensitive (e.g. READ_IMPLIES_EXEC), make this
    file only readable by the process owner.

    Signed-off-by: Kees Cook
    Signed-off-by: Alexey Dobriyan

    Kees Cook
     
  • lock_task_sighand() make sure task->sighand is being protected,
    so we do not need rcu_read_lock().
    [ exec() will get task->sighand->siglock before change task->sighand! ]

    But code using rcu_read_lock() _just_ to protect lock_task_sighand()
    only appear in procfs. (and some code in procfs use lock_task_sighand()
    without such redundant protection.)

    Other subsystem may put lock_task_sighand() into rcu_read_lock()
    critical region, but these rcu_read_lock() are used for protecting
    "for_each_process()", "find_task_by_vpid()" etc. , not for protecting
    lock_task_sighand().

    Signed-off-by: Lai Jiangshan
    [ok from Oleg]
    Signed-off-by: Alexey Dobriyan

    Lai Jiangshan
     

06 Aug, 2008

1 commit

  • proc: fix warnings

    fs/proc/base.c:2429: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type 'u64'
    fs/proc/base.c:2429: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type 'u64'
    fs/proc/base.c:2429: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has type 'u64'
    fs/proc/base.c:2429: warning: format '%llu' expects type 'long long unsigned int', but argument 6 has type 'u64'
    fs/proc/base.c:2429: warning: format '%llu' expects type 'long long unsigned int', but argument 7 has type 'u64'
    fs/proc/base.c:2429: warning: format '%llu' expects type 'long long unsigned int', but argument 8 has type 'u64'
    fs/proc/base.c:2429: warning: format '%llu' expects type 'long long unsigned int', but argument 9 has type 'u64'

    Signed-off-by: Alexander Beregalov
    Acked-by: Andrea Righi
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Beregalov
     

28 Jul, 2008

2 commits

  • Simplify the code of include/linux/task_io_accounting.h.

    It is also more reasonable to have all the task i/o-related statistics in a
    single struct (task_io_accounting).

    Signed-off-by: Andrea Righi
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Andrea Righi
     
  • Put all i/o statistics in struct proc_io_accounting and use inline functions to
    initialize and increment statistics, removing a lot of single variable
    assignments.

    This also reduces the kernel size as following (with CONFIG_TASK_XACCT=y and
    CONFIG_TASK_IO_ACCOUNTING=y).

    text data bss dec hex filename
    11651 0 0 11651 2d83 kernel/exit.o.before
    11619 0 0 11619 2d63 kernel/exit.o.after
    10886 132 136 11154 2b92 kernel/fork.o.before
    10758 132 136 11026 2b12 kernel/fork.o.after

    3082029 807968 4818600 8708597 84e1f5 vmlinux.o.before
    3081869 807968 4818600 8708437 84e155 vmlinux.o.after

    Signed-off-by: Andrea Righi
    Acked-by: Oleg Nesterov
    Signed-off-by: Linus Torvalds

    Andrea Righi
     

27 Jul, 2008

5 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (39 commits)
    [PATCH] fix RLIM_NOFILE handling
    [PATCH] get rid of corner case in dup3() entirely
    [PATCH] remove remaining namei_{32,64}.h crap
    [PATCH] get rid of indirect users of namei.h
    [PATCH] get rid of __user_path_lookup_open
    [PATCH] f_count may wrap around
    [PATCH] dup3 fix
    [PATCH] don't pass nameidata to __ncp_lookup_validate()
    [PATCH] don't pass nameidata to gfs2_lookupi()
    [PATCH] new (local) helper: user_path_parent()
    [PATCH] sanitize __user_walk_fd() et.al.
    [PATCH] preparation to __user_walk_fd cleanup
    [PATCH] kill nameidata passing to permission(), rename to inode_permission()
    [PATCH] take noexec checks to very few callers that care
    Re: [PATCH 3/6] vfs: open_exec cleanup
    [patch 4/4] vfs: immutable inode checking cleanup
    [patch 3/4] fat: dont call notify_change
    [patch 2/4] vfs: utimes cleanup
    [patch 1/4] vfs: utimes: move owner check into inode_change_ok()
    [PATCH] vfs: use kstrdup() and check failing allocation
    ...

    Linus Torvalds
     
  • Oleg Nesterov points out that we should check that the task is still alive
    before we iterate over the threads. This patch includes a fixup for this.

    Also simplify do_io_accounting() implementation.

    Signed-off-by: Andrea Righi
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Righi
     
  • * kill nameidata * argument; map the 3 bits in ->flags anybody cares
    about to new MAY_... ones and pass with the mask.
    * kill redundant gfs2_iop_permission()
    * sanitize ecryptfs_permission()
    * fix remaining places where ->permission() instances might barf on new
    MAY_... found in mask.

    The obvious next target in that direction is permission(9)

    folded fix for nfs_permission() breakage from Miklos Szeredi

    Signed-off-by: Al Viro

    Al Viro
     
  • This adds /proc/PID/syscall and /proc/PID/task/TID/syscall magic files.
    These use task_current_syscall() to show the task's current system call
    number and argument registers, stack pointer and PC. For a task blocked
    but not in a syscall, the file shows "-1" in place of the syscall number,
    followed by only the SP and PC. For a task that's not blocked, it shows
    "running".

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • This adds the tracehook_tracer_task() hook to consolidate all forms of
    "Who is using ptrace on me?" logic. This is used for "TracerPid:" in
    /proc and for permission checks. We also clean up the selinux code the
    called an identical accessor.

    Signed-off-by: Roland McGrath
    Cc: Oleg Nesterov
    Reviewed-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     

26 Jul, 2008

1 commit

  • Report per-thread I/O statistics in /proc/pid/task/tid/io and aggregate
    parent I/O statistics in /proc/pid/io. This approach follows the same
    model used to account per-process and per-thread CPU times.

    As a practial application, this allows for example to quickly find the top
    I/O consumer when a process spawns many child threads that perform the
    actual I/O work, because the aggregated I/O statistics can always be found
    in /proc/pid/io.

    [ Oleg Nesterov points out that we should check that the task is still
    alive before we iterate over the threads, but also says that we can do
    that fixup on top of this later. - Linus ]

    Acked-by: Balbir Singh
    Signed-off-by: Andrea Righi
    Cc: Matt Heaton
    Cc: Shailabh Nagar
    Acked-by-with-comments: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Righi
     

14 Jul, 2008

1 commit

  • Enable security modules to distinguish reading of process state via
    proc from full ptrace access by renaming ptrace_may_attach to
    ptrace_may_access and adding a mode argument indicating whether only
    read access or full attach access is requested. This allows security
    modules to permit access to reading process state without granting
    full ptrace access. The base DAC/capability checking remains unchanged.

    Read access to /proc/pid/mem continues to apply a full ptrace attach
    check since check_mem_permission() already requires the current task
    to already be ptracing the target. The other ptrace checks within
    proc for elements like environ, maps, and fds are changed to pass the
    read mode instead of attach.

    In the SELinux case, we model such reading of process state as a
    reading of a proc file labeled with the target process' label. This
    enables SELinux policy to permit such reading of process state without
    permitting control or manipulation of the target process, as there are
    a number of cases where programs probe for such information via proc
    but do not need to be able to control the target (e.g. procps,
    lsof, PolicyKit, ConsoleKit). At present we have to choose between
    allowing full ptrace in policy (more permissive than required/desired)
    or breaking functionality (or in some cases just silencing the denials
    via dontaudit rules but this can hide genuine attacks).

    This version of the patch incorporates comments from Casey Schaufler
    (change/replace existing ptrace_may_attach interface, pass access
    mode), and Chris Wright (provide greater consistency in the checking).

    Note that like their predecessors __ptrace_may_attach and
    ptrace_may_attach, the __ptrace_may_access and ptrace_may_access
    interfaces use different return value conventions from each other (0
    or -errno vs. 1 or 0). I retained this difference to avoid any
    changes to the caller logic but made the difference clearer by
    changing the latter interface to return a bool rather than an int and
    by adding a comment about it to ptrace.h for any future callers.

    Signed-off-by: Stephen Smalley
    Acked-by: Chris Wright
    Signed-off-by: James Morris

    Stephen Smalley
     

07 Jun, 2008

1 commit

  • This patch:

    commit e9720acd728a46cb40daa52c99a979f7c4ff195c
    Author: Pavel Emelyanov
    Date: Fri Mar 7 11:08:40 2008 -0800

    [NET]: Make /proc/net a symlink on /proc/self/net (v3)

    introduced a /proc/self/net directory without bumping the corresponding
    link count for /proc/self.

    This patch replaces the static link count initializations with a call that
    counts the number of directory entries in the given pid_entry table
    whenever it is instantiated, and thus relieves the burden of manually
    keeping the two in sync.

    [akpm@linux-foundation.org: cleanup]
    Acked-by: Eric W. Biederman
    Cc: Pavel Emelyanov
    Signed-off-by: Vegard Nossum
    Cc: "David S. Miller"
    Cc: Alexey Dobriyan
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vegard Nossum
     

17 May, 2008

1 commit


02 May, 2008

1 commit


29 Apr, 2008

2 commits

  • This cleans up the permission checks done for /proc/PID/mem i/o calls. It
    puts all the logic in a new function, check_mem_permission().

    The old code repeated the (!MAY_PTRACE(task) || !ptrace_may_attach(task))
    magical expression multiple times. The new function does all that work in one
    place, with clear comments.

    The old code called security_ptrace() twice on successful checks, once in
    MAY_PTRACE() and once in __ptrace_may_attach(). Now it's only called once,
    and only if all other checks have succeeded.

    Signed-off-by: Roland McGrath
    Cc: Alexey Dobriyan
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • The kernel implements readlink of /proc/pid/exe by getting the file from
    the first executable VMA. Then the path to the file is reconstructed and
    reported as the result.

    Because of the VMA walk the code is slightly different on nommu systems.
    This patch avoids separate /proc/pid/exe code on nommu systems. Instead of
    walking the VMAs to find the first executable file-backed VMA we store a
    reference to the exec'd file in the mm_struct.

    That reference would prevent the filesystem holding the executable file
    from being unmounted even after unmapping the VMAs. So we track the number
    of VM_EXECUTABLE VMAs and drop the new reference when the last one is
    unmapped. This avoids pinning the mounted filesystem.

    [akpm@linux-foundation.org: improve comments]
    [yamamoto@valinux.co.jp: fix dup_mmap]
    Signed-off-by: Matt Helsley
    Cc: Oleg Nesterov
    Cc: David Howells
    Cc:"Eric W. Biederman"
    Cc: Christoph Hellwig
    Cc: Al Viro
    Cc: Hugh Dickins
    Signed-off-by: YAMAMOTO Takashi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Helsley
     

23 Apr, 2008

3 commits

  • [mszeredi@suse.cz] rewrite and split big patch into managable chunks

    /proc/mounts in its current form lacks important information:

    - propagation state
    - root of mount for bind mounts
    - the st_dev value used within the filesystem
    - identifier for each mount and it's parent

    It also suffers from the following problems:

    - not easily extendable
    - ambiguity of mountpoints within a chrooted environment
    - doesn't distinguish between filesystem dependent and independent options
    - doesn't distinguish between per mount and per super block options

    This patch introduces /proc//mountinfo which attempts to address
    all these deficiencies.

    Code shared between /proc//mounts and /proc//mountinfo is
    extracted into separate functions.

    Thanks to Al Viro for the help in getting the design right.

    Signed-off-by: Ram Pai
    Signed-off-by: Miklos Szeredi
    Signed-off-by: Al Viro

    Ram Pai
     
  • Allow /proc//mountinfo to use the root of to calculate
    mountpoints.

    - move definition of 'struct proc_mounts' to
    - add the process's namespace and root to this structure
    - pass a pointer to 'struct proc_mounts' into seq_operations

    In addition the following cleanups are made:

    - use a common open function for /proc//{mounts,mountstat}
    - surround namespace.c part of these proc files with #ifdef CONFIG_PROC_FS
    - make the seq_operations structures const

    Signed-off-by: Miklos Szeredi
    Signed-off-by: Al Viro

    Miklos Szeredi
     
  • Since we drop the rcu_read_lock inside the loop, we can't assume
    that files->fdt will remain unchanged (and not freed) between
    iterations.

    Signed-off-by: Al Viro

    Al Viro
     

21 Mar, 2008

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (46 commits)
    [NET] ifb: set separate lockdep classes for queue locks
    [IPV6] KCONFIG: Fix description about IPV6_TUNNEL.
    [TCP]: Fix shrinking windows with window scaling
    netpoll: zap_completion_queue: adjust skb->users counter
    bridge: use time_before() in br_fdb_cleanup()
    [TG3]: Fix build warning on sparc32.
    MAINTAINERS: bluez-devel is subscribers-only
    audit: netlink socket can be auto-bound to pid other than current->pid (v2)
    [NET]: Fix permissions of /proc/net
    [SCTP]: Fix a race between module load and protosw access
    [NETFILTER]: ipt_recent: sanity check hit count
    [NETFILTER]: nf_conntrack_h323: logical-bitwise & confusion in process_setup()
    [RT2X00] drivers/net/wireless/rt2x00/rt2x00dev.c: remove dead code, fix warning
    [IPV4]: esp_output() misannotations
    [8021Q]: vlan_dev misannotations
    xfrm: ->eth_proto is __be16
    [IPV4]: ipv4_is_lbcast() misannotations
    [SUNRPC]: net/* NULL noise
    [SCTP]: fix misannotated __sctp_rcv_asconf_lookup()
    [PKT_SCHED]: annotate cls_u32
    ...

    Linus Torvalds
     
  • commit e9720ac ([NET]: Make /proc/net a symlink on /proc/self/net (v3))
    broke ganglia and probably other applications that read /proc/net/dev.

    This is due to the change of permissions of /proc/net that was
    introduced in that commit.

    Before: dr-xr-xr-x 5 root root 0 Mar 19 11:30 /proc/net
    After: dr-xr--r-- 5 root root 0 Mar 19 11:29 /proc/self/net

    This patch restores the permissions to the old value which makes
    ganglia happy again.

    Pavel Emelyanov says:

    This also broke the postfix, as it was reported in bug #10286
    and described in detail by Benjamin.

    Signed-off-by: Andre Noll
    Acked-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Andre Noll
     

18 Mar, 2008

1 commit


13 Mar, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits)
    [SCTP]: Fix local_addr deletions during list traversals.
    net: fix build with CONFIG_NET=n
    [TCP]: Prevent sending past receiver window with TSO (at last skb)
    rt2x00: Add new D-Link USB ID
    rt2x00: never disable multicast because it disables broadcast too
    libertas: fix the 'compare command with itself' properly
    drivers/net/Kconfig: fix whitespace for GELIC_WIRELESS entry
    [NETFILTER]: nf_queue: don't return error when unregistering a non-existant handler
    [NETFILTER]: nfnetlink_queue: fix EPERM when binding/unbinding and instance 0 exists
    [NETFILTER]: nfnetlink_log: fix EPERM when binding/unbinding and instance 0 exists
    [NETFILTER]: nf_conntrack: replace horrible hack with ksize()
    [NETFILTER]: nf_conntrack: add \n to "expectation table full" message
    [NETFILTER]: xt_time: fix failure to match on Sundays
    [NETFILTER]: nfnetlink_log: fix computation of netlink skb size
    [NETFILTER]: nfnetlink_queue: fix computation of allocated size for netlink skb.
    [NETFILTER]: nfnetlink: fix ifdef in nfnetlink_compat.h
    [NET]: include into linux/ethtool.h for __u* typedef
    [NET]: Make /proc/net a symlink on /proc/self/net (v3)
    RxRPC: fix rxrpc_recvmsg()'s returning of msg_name
    net/enc28j60: oops fix
    ...

    Linus Torvalds
     

12 Mar, 2008

1 commit

  • fs/built-in.o:(.rodata+0x1134): undefined reference to `proc_net_inode_operations'
    fs/built-in.o:(.rodata+0x1138): undefined reference to `proc_net_operations'

    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Andrew Morton
     

08 Mar, 2008

1 commit

  • Current /proc/net is done with so called "shadows", but current
    implementation is broken and has little chances to get fixed.

    The problem is that dentries subtree of /proc/net directory has
    fancy revalidation rules to make processes living in different
    net namespaces see different entries in /proc/net subtree, but
    currently, tasks see in the /proc/net subdir the contents of any
    other namespace, depending on who opened the file first.

    The proposed fix is to turn /proc/net into a symlink, which points
    to /proc/self/net, which in turn shows what previously was in
    /proc/net - the network-related info, from the net namespace the
    appropriate task lives in.

    # ls -l /proc/net
    lrwxrwxrwx 1 root root 8 Mar 5 15:17 /proc/net -> self/net

    In other words - this behaves like /proc/mounts, but unlike
    "mounts", "net" is not a file, but a directory.

    Changes from v2:
    * Fixed discrepancy of /proc/net nlink count and selinux labeling
    screwup pointed out by Stephen.

    To get the correct nlink count the ->getattr callback for /proc/net
    is overridden to read one from the net->proc_net entry.

    To make selinux still work the net->proc_net entry is initialized
    properly, i.e. with the "net" name and the proc_net parent.

    Selinux fixes are
    Acked-by: Stephen Smalley

    Changes from v1:
    * Fixed a task_struct leak in get_proc_task_net, pointed out by Paul.

    Signed-off-by: Pavel Emelyanov
    Acked-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     

25 Feb, 2008

3 commits

  • Change getting task_struct by get_proc_task() at read or write time,
    and returns -ESRCH if get_proc_task() returns NULL.
    This is same behavior as other /proc files.

    Signed-off-by: Hiroshi Shimamoto
    Signed-off-by: Ingo Molnar

    Hiroshi Shimamoto
     
  • At lstats_open(), calling get_proc_task() gets task struct, but it never put.
    put_task_struct() should be called when releasing.

    Signed-off-by: Hiroshi Shimamoto
    Signed-off-by: Ingo Molnar

    Hiroshi Shimamoto
     
  • Reading /proc//latency or /proc//task//latency could cause
    NULL pointer dereference.

    In lstats_open(), get_proc_task() can return NULL, in which case the kernel
    will oops at lstats_show_proc() because m->private is NULL.

    When get_proc_task() returns NULL, the kernel should return -ENOENT.

    This can be reproduced by the following script.
    while :
    do
    date
    bash -c 'ls > ls.$$' &
    pid=$!
    cat /proc/$pid/latency &
    cat /proc/$pid/latency &
    cat /proc/$pid/latency &
    cat /proc/$pid/latency
    done

    Signed-off-by: Hiroshi Shimamoto
    Signed-off-by: Ingo Molnar

    Hiroshi Shimamoto
     

24 Feb, 2008

1 commit

  • RLIMIT_RTTIME was introduced to allow the user to set a runtime timeout on
    real-time tasks: http://lkml.org/lkml/2007/12/18/218. This patch updates
    /proc//limits with the new rlimit.

    Signed-off-by: Eugene Teo
    Acked-by: Peter Zijlstra
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eugene Teo
     

15 Feb, 2008

5 commits

  • d_path() is used on a pair. Lets use a struct path to
    reflect this.

    [akpm@linux-foundation.org: fix build in mm/memory.c]
    Signed-off-by: Jan Blunck
    Acked-by: Bryan Wu
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Cc: "J. Bruce Fields"
    Cc: Neil Brown
    Cc: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     
  • proc_get_link() is always called with a dentry and a vfsmount from a struct
    path. Make proc_get_link() take it directly as an argument.

    Signed-off-by: Jan Blunck
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Cc: "J. Bruce Fields"
    Cc: Neil Brown
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     
  • * Use struct path in fs_struct.

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Jan Blunck
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     
  • * Add path_put() functions for releasing a reference to the dentry and
    vfsmount of a struct path in the right order

    * Switch from path_release(nd) to path_put(&nd->path)

    * Rename dput_path() to path_put_conditional()

    [akpm@linux-foundation.org: fix cifs]
    Signed-off-by: Jan Blunck
    Signed-off-by: Andreas Gruenbacher
    Acked-by: Christoph Hellwig
    Cc:
    Cc: Al Viro
    Cc: Steven French
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     
  • This is the central patch of a cleanup series. In most cases there is no good
    reason why someone would want to use a dentry for itself. This series reflects
    that fact and embeds a struct path into nameidata.

    Together with the other patches of this series
    - it enforced the correct order of getting/releasing the reference count on
    pairs
    - it prepares the VFS for stacking support since it is essential to have a
    struct path in every place where the stack can be traversed
    - it reduces the overall code size:

    without patch series:
    text data bss dec hex filename
    5321639 858418 715768 6895825 6938d1 vmlinux

    with patch series:
    text data bss dec hex filename
    5320026 858418 715768 6894212 693284 vmlinux

    This patch:

    Switch from nd->{dentry,mnt} to nd->path.{dentry,mnt} everywhere.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: fix cifs]
    [akpm@linux-foundation.org: fix smack]
    Signed-off-by: Jan Blunck
    Signed-off-by: Andreas Gruenbacher
    Acked-by: Christoph Hellwig
    Cc: Al Viro
    Cc: Casey Schaufler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Blunck
     

09 Feb, 2008

2 commits

  • Revert commit c6caeb7c4544608e8ae62731334661fc396c7f85 ("proc: fix the
    threaded /proc/self"), since Eric says "The patch really is wrong.
    There is at least one corner case in procps that cares."

    Cc: Eric W. Biederman
    Cc: Ingo Molnar
    Cc: "Guillaume Chazarain"
    Cc: "Pavel Emelyanov"
    Cc: "Rafael J. Wysocki"
    Cc: Oleg Nesterov
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Signed-off-by: Jan Engelhardt
    Acked-by: Geert Uytterhoeven
    Acked-by: Mike Frysinger
    Acked-By: David Howells
    Acked-by: Bryan Wu
    Acked-by: Jesper Nilsson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Engelhardt