1. 16 Mar, 2011 18 commits
  2. 15 Mar, 2011 22 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · 422e6c4b
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (57 commits)
        tidy the trailing symlinks traversal up
        Turn resolution of trailing symlinks iterative everywhere
        simplify link_path_walk() tail
        Make trailing symlink resolution in path_lookupat() iterative
        update nd->inode in __do_follow_link() instead of after do_follow_link()
        pull handling of one pathname component into a helper
        fs: allow AT_EMPTY_PATH in linkat(), limit that to CAP_DAC_READ_SEARCH
        Allow passing O_PATH descriptors via SCM_RIGHTS datagrams
        readlinkat(), fchownat() and fstatat() with empty relative pathnames
        Allow O_PATH for symlinks
        New kind of open files - "location only".
        ext4: Copy fs UUID to superblock
        ext3: Copy fs UUID to superblock.
        vfs: Export file system uuid via /proc/<pid>/mountinfo
        unistd.h: Add new syscalls numbers to asm-generic
        x86: Add new syscalls for x86_64
        x86: Add new syscalls for x86_32
        fs: Remove i_nlink check from file system link callback
        fs: Don't allow to create hardlink for deleted file
        vfs: Add open by file handle support
        ...
      422e6c4b
    • Trond Myklebust's avatar
      VFS: Fix the nfs sillyrename regression in kernel 2.6.38 · c83ce989
      Trond Myklebust authored
      The new vfs locking scheme introduced in 2.6.38 breaks NFS sillyrename
      because the latter relies on being able to determine the parent
      directory of the dentry in the ->iput() callback in order to send the
      appropriate unlink rpc call.
      
      Looking at the code that cares about races with dput(), there doesn't
      seem to be anything that specifically uses d_parent as a test for
      whether or not there is a race:
        - __d_lookup_rcu(), __d_lookup() all test for d_hashed() after d_parent
        - shrink_dcache_for_umount() is safe since nothing else can rearrange
          the dentries in that super block.
        - have_submount(), select_parent() and d_genocide() can test for a
          deletion if we set the DCACHE_DISCONNECTED flag when the dentry
          is removed from the parent's d_subdirs list.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: stable@kernel.org (2.6.38, needs commit c826cb7d "dcache.c:
      	create helper function for duplicated functionality" )
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c83ce989
    • Linus Torvalds's avatar
      dcache.c: create helper function for duplicated functionality · c826cb7d
      Linus Torvalds authored
      This creates a helper function for he "try to ascend into the parent
      directory" case, which was written out in triplicate before.  With all
      the locking and subtle sequence number stuff, we really don't want to
      duplicate that kind of code.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c826cb7d
    • Al Viro's avatar
      tidy the trailing symlinks traversal up · 574197e0
      Al Viro authored
      * pull the handling of current->total_link_count into
      __do_follow_link()
      * put the common "do ->put_link() if needed and path_put() the link"
        stuff into a helper (put_link(nd, link, cookie))
      * rename __do_follow_link() to follow_link(), while we are at it
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      574197e0
    • Al Viro's avatar
      Turn resolution of trailing symlinks iterative everywhere · b356379a
      Al Viro authored
      The last remaining place (resolution of nested symlink) converted
      to the loop of the same kind we have in path_lookupat() and
      path_openat().
      
      Note that we still *do* have a recursion in pathname resolution;
      can't avoid it, really.  However, it's strictly for nested symlinks
      now - i.e. ones in the middle of a pathname.
      
      link_path_walk() has lost the tail now - it always walks everything
      except the last component.
      
      do_follow_link() renamed to nested_symlink() and moved down.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      b356379a
    • Al Viro's avatar
      simplify link_path_walk() tail · ce052544
      Al Viro authored
      Now that link_path_walk() is called without LOOKUP_PARENT
      only from do_follow_link(), we can simplify the checks in
      last component handling.  First of all, checking if we'd
      arrived to a directory is not needed - the caller will check
      it anyway.  And LOOKUP_FOLLOW is guaranteed to be there,
      since we only get to that place with nd->depth > 0.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      ce052544
    • Al Viro's avatar
      Make trailing symlink resolution in path_lookupat() iterative · bd92d7fe
      Al Viro authored
      Now the only caller of link_path_walk() that does *not* pass
      LOOKUP_PARENT is do_follow_link()
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      bd92d7fe
    • Al Viro's avatar
      update nd->inode in __do_follow_link() instead of after do_follow_link() · b21041d0
      Al Viro authored
      ... and note that we only need to do it for LAST_BIND symlinks
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      b21041d0
    • Al Viro's avatar
      pull handling of one pathname component into a helper · ce57dfc1
      Al Viro authored
      new helper: walk_component().  Handles everything except symlinks;
      returns negative on error, 0 on success and 1 on symlinks we decided
      to follow.  Drops out of RCU mode on such symlinks.
      
      link_path_walk() and do_last() switched to using that.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      ce57dfc1
    • Aneesh Kumar K.V's avatar
      fs: allow AT_EMPTY_PATH in linkat(), limit that to CAP_DAC_READ_SEARCH · 11a7b371
      Aneesh Kumar K.V authored
      We don't want to allow creation of private hardlinks by different application
      using the fd passed to them via SCM_RIGHTS. So limit the null relative name
      usage in linkat syscall to CAP_DAC_READ_SEARCH
      Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      11a7b371
    • Ingo Molnar's avatar
      perf probe: Clean up probe_point_lazy_walker() return value · 5e814dd5
      Ingo Molnar authored
      Newer compilers (gcc 4.6) complains about:
      
              return ret < 0 ?: 0;
      
      For the following reason:
      
        util/probe-finder.c: In function ‘probe_point_lazy_walker’:
        util/probe-finder.c:1331:18: error: the omitted middle operand in ?: will always be ‘true’, suggest explicit middle operand [-Werror=parentheses]
      
      And indeed the return value is a somewhat obscure (but correct) value
      of 'true', so return 'ret' instead - this is cleaner and unconfuses
      GCC as well.
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      5e814dd5
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm · 76ca0783
      Linus Torvalds authored
      * 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
        xen: suspend: remove xen_hvm_suspend
        xen: suspend: pull pre/post suspend hooks out into suspend_info
        xen: suspend: move arch specific pre/post suspend hooks into generic hooks
        xen: suspend: refactor non-arch specific pre/post suspend hooks
        xen: suspend: add "arch" to pre/post suspend hooks
        xen: suspend: pass extra hypercall argument via suspend_info struct
        xen: suspend: refactor cancellation flag into a structure
        xen: suspend: use HYPERVISOR_suspend for PVHVM case instead of open coding
        xen: switch to new schedop hypercall by default.
        xen: use new schedop interface for suspend
        xen: do not respond to unknown xenstore control requests
        xen: fix compile issue if XEN is enabled but XEN_PVHVM is disabled
        xen: PV on HVM: support PV spinlocks and IPIs
        xen: make the ballon driver work for hvm domains
        xen-blkfront: handle Xen major numbers other than XENVBD
        xen: do not use xen_info on HVM, set pv_info name to "Xen HVM"
        xen: no need to delay xen_setup_shutdown_event for hvm guests anymore
      76ca0783
    • Linus Torvalds's avatar
      Merge branches 'stable/ia64', 'stable/blkfront-cleanup' and 'stable/cleanup'... · 27d2a8b9
      Linus Torvalds authored
      Merge branches 'stable/ia64', 'stable/blkfront-cleanup' and 'stable/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      * 'stable/ia64' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen: ia64 build broken due to "xen: switch to new schedop hypercall by default."
      
      * 'stable/blkfront-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen: Union the blkif_request request specific fields
      
      * 'stable/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen: annotate functions which only call into __init at start of day
        xen p2m: annotate variable which appears unused
        xen: events: mark cpu_evtchn_mask_p as __refdata
      27d2a8b9
    • Linus Torvalds's avatar
      Merge branch 'stable/irq.cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen · 010b8f4e
      Linus Torvalds authored
      * 'stable/irq.cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen: events: remove dom0 specific xen_create_msi_irq
        xen: events: use xen_bind_pirq_msi_to_irq from xen_create_msi_irq
        xen: events: push set_irq_msi down into xen_create_msi_irq
        xen: events: update pirq_to_irq in xen_create_msi_irq
        xen: events: refactor xen_create_msi_irq slightly
        xen: events: separate MSI PIRQ allocation from PIRQ binding to IRQ
        xen: events: assume PHYSDEVOP_get_free_pirq exists
        xen: pci: collapse apic_register_gsi_xen_hvm and xen_hvm_register_pirq
        xen: events: return irq from xen_allocate_pirq_msi
        xen: events: drop XEN_ALLOC_IRQ flag to xen_allocate_pirq_msi
        xen: events: do not leak IRQ from xen_allocate_pirq_msi when no pirq available.
        xen: pci: only define xen_initdom_setup_msi_irqs if CONFIG_XEN_DOM0
      010b8f4e
    • Linus Torvalds's avatar
      Merge branches 'stable/irq.rework' and 'stable/pcifront-fixes' of... · 397fae08
      Linus Torvalds authored
      Merge branches 'stable/irq.rework' and 'stable/pcifront-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      * 'stable/irq.rework' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/irq: Cleanup up the pirq_to_irq for DomU PV PCI passthrough guests as well.
        xen: Use IRQF_FORCE_RESUME
        xen/timer: Missing IRQF_NO_SUSPEND in timer code broke suspend.
        xen: Fix compile error introduced by "switch to new irq_chip functions"
        xen: Switch to new irq_chip functions
        xen: Remove stale irq_chip.end
        xen: events: do not free legacy IRQs
        xen: events: allocate GSIs and dynamic IRQs from separate IRQ ranges.
        xen: events: add xen_allocate_irq_{dynamic, gsi} and xen_free_irq
        xen:events: move find_unbound_irq inside CONFIG_PCI_MSI
        xen: handled remapped IRQs when enabling a pcifront PCI device.
        genirq: Add IRQF_FORCE_RESUME
      
      * 'stable/pcifront-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        pci/xen: When free-ing MSI-X/MSI irq->desc also use generic code.
        pci/xen: Cleanup: convert int** to int[]
        pci/xen: Use xen_allocate_pirq_msi instead of xen_allocate_pirq
        xen-pcifront: Sanity check the MSI/MSI-X values
        xen-pcifront: don't use flush_scheduled_work()
      397fae08
    • Linus Torvalds's avatar
      Merge branches 'stable/p2m-identity.v4.9.1' and 'stable/e820' of... · c7146dd0
      Linus Torvalds authored
      Merge branches 'stable/p2m-identity.v4.9.1' and 'stable/e820' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      * 'stable/p2m-identity.v4.9.1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/m2p: Check whether the MFN has IDENTITY_FRAME bit set..
        xen/m2p: No need to catch exceptions when we know that there is no RAM
        xen/debug: WARN_ON when identity PFN has no _PAGE_IOMAP flag set.
        xen/debugfs: Add 'p2m' file for printing out the P2M layout.
        xen/setup: Set identity mapping for non-RAM E820 and E820 gaps.
        xen/mmu: WARN_ON when racing to swap middle leaf.
        xen/mmu: Set _PAGE_IOMAP if PFN is an identity PFN.
        xen/mmu: Add the notion of identity (1-1) mapping.
        xen: Mark all initial reserved pages for the balloon as INVALID_P2M_ENTRY.
      
      * 'stable/e820' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/e820: Don't mark balloon memory as E820_UNUSABLE when running as guest and fix overflow.
        xen/setup: Inhibit resource API from using System RAM E820 gaps as PCI mem gaps.
      c7146dd0
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: New command to list the names of events present in a perf.data file · 43adec95
      Arnaldo Carvalho de Melo authored
      [root@emilia ~]# perf record -a -e sched:* -e timer:timer* sleep 5
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.172 MB perf.data (~7530 samples) ]
      [root@emilia ~]# perf evlist
      sched:sched_kthread_stop
      sched:sched_kthread_stop_ret
      sched:sched_wakeup
      sched:sched_wakeup_new
      sched:sched_switch
      sched:sched_migrate_task
      sched:sched_process_free
      sched:sched_process_exit
      sched:sched_wait_task
      sched:sched_process_wait
      sched:sched_process_fork
      sched:sched_stat_wait
      sched:sched_stat_sleep
      sched:sched_stat_iowait
      sched:sched_stat_runtime
      sched:sched_pi_setprio
      timer:timer_init
      timer:timer_start
      timer:timer_expire_entry
      timer:timer_expire_exit
      timer:timer_cancel
      [root@emilia ~]#
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      43adec95
    • Xiao Guangrong's avatar
      x86, tlb, UV: Do small micro-optimization for native_flush_tlb_others() · 25542c64
      Xiao Guangrong authored
      native_flush_tlb_others() is called from:
      
       flush_tlb_current_task()
       flush_tlb_mm()
       flush_tlb_page()
      
      All these functions disable preemption explicitly, so we can use
      smp_processor_id() instead of get_cpu() and put_cpu().
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Cliff Wickman <cpw@sgi.com>
      LKML-Reference: <4D7EC791.4040003@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      25542c64
    • Ingo Molnar's avatar
      Merge commit 'v2.6.38' into x86/mm · 8460b3e5
      Ingo Molnar authored
      Conflicts:
      	arch/x86/mm/numa_64.c
      
      Merge reason: Resolve the conflict, update the branch to .38.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      8460b3e5
    • Al Viro's avatar
      Allow passing O_PATH descriptors via SCM_RIGHTS datagrams · 326be7b4
      Al Viro authored
      Just need to make sure that AF_UNIX garbage collector won't
      confuse O_PATHed socket on filesystem for real AF_UNIX opened
      socket.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      326be7b4
    • Al Viro's avatar
      readlinkat(), fchownat() and fstatat() with empty relative pathnames · 65cfc672
      Al Viro authored
      For readlinkat() we simply allow empty pathname; it will fail unless
      we have dfd equal to O_PATH-opened symlink, so we are outside of
      POSIX scope here.  For fchownat() and fstatat() we allow AT_EMPTY_PATH;
      let the caller explicitly ask for such behaviour.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      65cfc672
    • Al Viro's avatar
      Allow O_PATH for symlinks · bcda7652
      Al Viro authored
      At that point we can't do almost nothing with them.  They can be opened
      with O_PATH, we can manipulate such descriptors with dup(), etc. and
      we can see them in /proc/*/{fd,fdinfo}/*.
      
      We can't (and won't be able to) follow /proc/*/fd/* symlinks for those;
      there's simply not enough information for pathname resolution to go on
      from such point - to resolve a symlink we need to know which directory
      does it live in.
      
      We will be able to do useful things with them after the next commit, though -
      readlinkat() and fchownat() will be possible to use with dfd being an
      O_PATH-opened symlink and empty relative pathname.  Combined with
      open_by_handle() it'll give us a way to do realink-by-handle and
      lchown-by-handle without messing with more redundant syscalls.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      bcda7652