1. 18 Dec, 2012 40 commits
    • Linus Torvalds's avatar
      Merge tag 'disintegrate-alpha-20121217' of git://git.infradead.org/users/dhowells/linux-headers · 3d9de190
      Linus Torvalds authored
      Pull UAPI disintegration for Alpha from David Howells:
       "I've been asked to send the Alpha UAPI disintegration to you directly.
        The acks I have been given have been added into the patch."
      
      * tag 'disintegrate-alpha-20121217' of git://git.infradead.org/users/dhowells/linux-headers:
        UAPI: (Scripted) Disintegrate arch/alpha/include/asm
      3d9de190
    • Linus Torvalds's avatar
      Merge tag 'for-3.8' of git://openrisc.net/~jonas/linux · 9a8a5702
      Linus Torvalds authored
      Pull OpenRISC update from Jonas Bonn:
       "Trivial cleanups for OpenRISC."
      
      * tag 'for-3.8' of git://openrisc.net/~jonas/linux:
        openrisc: use kbuild.h instead of defining macros in asm-offset.c
        openrisc: Use Kbuild infrastructure for kvm_para.h
      9a8a5702
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 7b077868
      Linus Torvalds authored
      Pull s390 update #2 from Martin Schwidefsky:
       "The main patch is the function measurement blocks extension for PCI to
        do performance statistics and help with debugging.  The other patch is
        a small cleanup in ccwdev.h."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/ccwdev: Include asm/schid.h.
        s390/pci: performance statistics and debug infrastructure
      7b077868
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 16e024f3
      Linus Torvalds authored
      Pull powerpc update from Benjamin Herrenschmidt:
       "The main highlight is probably some base POWER8 support.  There's more
        to come such as transactional memory support but that will wait for
        the next one.
      
        Overall it's pretty quiet, or rather I've been pretty poor at picking
        things up from patchwork and reviewing them this time around and Kumar
        no better on the FSL side it seems..."
      
      * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (73 commits)
        powerpc+of: Rename and fix OF reconfig notifier error inject module
        powerpc: mpc5200: Add a3m071 board support
        powerpc/512x: don't compile any platform DIU code if the DIU is not enabled
        powerpc/mpc52xx: use module_platform_driver macro
        powerpc+of: Export of_reconfig_notifier_[register,unregister]
        powerpc/dma/raidengine: add raidengine device
        powerpc/iommu/fsl: Add PAMU bypass enable register to ccsr_guts struct
        powerpc/mpc85xx: Change spin table to cached memory
        powerpc/fsl-pci: Add PCI controller ATMU PM support
        powerpc/86xx: fsl_pcibios_fixup_bus requires CONFIG_PCI
        drivers/virt: the Freescale hypervisor driver doesn't need to check MSR[GS]
        powerpc/85xx: p1022ds: Use NULL instead of 0 for pointers
        powerpc: Disable relocation on exceptions when kexecing
        powerpc: Enable relocation on during exceptions at boot
        powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function
        powerpc: Add wrappers to enable/disable relocation on exceptions
        powerpc: Add set_mode hcall
        powerpc: Setup relocation on exceptions for bare metal systems
        powerpc: Move initial mfspr LPCR out of __init_LPCR
        powerpc: Add relocation on exception vector handlers
        ...
      16e024f3
    • David Rientjes's avatar
      x86, paravirt: fix build error when thp is disabled · c36e0501
      David Rientjes authored
      With CONFIG_PARAVIRT=y and CONFIG_TRANSPARENT_HUGEPAGE=n, the build breaks
      because set_pmd_at() is undeclared:
      
        mm/memory.c: In function 'do_pmd_numa_page':
        mm/memory.c:3520: error: implicit declaration of function 'set_pmd_at'
        mm/mprotect.c: In function 'change_pmd_protnuma':
        mm/mprotect.c:120: error: implicit declaration of function 'set_pmd_at'
      
      This is because paravirt defines set_pmd_at() only when
      CONFIG_TRANSPARENT_HUGEPAGE=y and such a restriction is unneeded.  The
      fix is to define it for all CONFIG_PARAVIRT configurations.
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c36e0501
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.open-osd.org/linux-open-osd · ea77d73c
      Linus Torvalds authored
      Pull exofs changes from Boaz Harrosh:
       "These are just 3 patches, the last two are bug fixes on the error
        paths in exofs.
      
        The important patch is the one to osd_uld which adds sysfs info to osd
        devices for use by user-mode clustering discovery software.  I'm
        already sitting on this patch since before February this year, It is
        important for some of the big installation cluster systems, who's been
        compiling their own kernel just for that patch."
      
      Ugh.  The osd_uld patch already went through the SCSI tree, so this was
      kind of pointless.  But at least it has the two small error-path fixes..
      
      * 'for-linus' of git://git.open-osd.org/linux-open-osd:
        exofs: don't leak io_state and pages on read error
        exofs: clean up the correct page collection on write error
        osduld: Add osdname & systemid sysfs at scsi_osd class
      ea77d73c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · a22180d2
      Linus Torvalds authored
      Pull btrfs update from Chris Mason:
       "A big set of fixes and features.
      
        In terms of line count, most of the code comes from Stefan, who added
        the ability to replace a single drive in place.  This is different
        from how btrfs normally replaces drives, and is much much much faster.
      
        Josef is plowing through our synchronous write performance.  This pull
        request does not include the DIO_OWN_WAITING patch that was discussed
        on the list, but it has a number of other improvements to cut down our
        latencies and CPU time during fsync/O_DIRECT writes.
      
        Miao Xie has a big series of fixes and is spreading out ordered
        operations over more CPUs.  This improves performance and reduces
        contention.
      
        I've put in fixes for error handling around hash collisions.  These
        are going back to individual stable kernels as I test against them.
      
        Otherwise we have a lot of fixes and cleanups, thanks everyone!
        raid5/6 is being rebased against the device replacement code.  I'll
        have it posted this Friday along with a nice series of benchmarks."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (115 commits)
        Btrfs: fix a bug of per-file nocow
        Btrfs: fix hash overflow handling
        Btrfs: don't take inode delalloc mutex if we're a free space inode
        Btrfs: fix autodefrag and umount lockup
        Btrfs: fix permissions of empty files not affected by umask
        Btrfs: put raid properties into global table
        Btrfs: fix BUG() in scrub when first superblock reading gives EIO
        Btrfs: do not call file_update_time in aio_write
        Btrfs: only unlock and relock if we have to
        Btrfs: use tokens where we can in the tree log
        Btrfs: optimize leaf_space_used
        Btrfs: don't memset new tokens
        Btrfs: only clear dirty on the buffer if it is marked as dirty
        Btrfs: move checks in set_page_dirty under DEBUG
        Btrfs: log changed inodes based on the extent map tree
        Btrfs: add path->really_keep_locks
        Btrfs: do not mark ems as prealloc if we are writing to them
        Btrfs: keep track of the extents original block length
        Btrfs: inline csums if we're fsyncing
        Btrfs: don't bother copying if we're only logging the inode
        ...
      a22180d2
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.8-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 2d4dce00
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Features include:
      
         - Full audit of BUG_ON asserts in the NFS, SUNRPC and lockd client
           code.  Remove altogether where possible, and replace with
           WARN_ON_ONCE and appropriate error returns where not.
         - NFSv4.1 client adds session dynamic slot table management.  There
           is matching server side code that has been submitted to Bruce for
           consideration.
      
           Together, this code allows the server to dynamically manage the
           amount of memory it allocates to the duplicate request cache for
           each client.  It will constantly resize those caches to reserve
           more memory for clients that are hot while shrinking caches for
           those that are quiescent.
      
        In addition, there are assorted bugfixes for the generic NFS write
        code, fixes to deal with the drop_nlink() warnings, and yet another
        fix for NFSv4 getacl."
      
      * tag 'nfs-for-3.8-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (106 commits)
        SUNRPC: continue run over clients list on PipeFS event instead of break
        NFS: Don't use SetPageError in the NFS writeback code
        SUNRPC: variable 'svsk' is unused in function bc_send_request
        SUNRPC: Handle ECONNREFUSED in xs_local_setup_socket
        NFSv4.1: Deal effectively with interrupted RPC calls.
        NFSv4.1: Move the RPC timestamp out of the slot.
        NFSv4.1: Try to deal with NFS4ERR_SEQ_MISORDERED.
        NFS: nfs_lookup_revalidate should not trust an inode with i_nlink == 0
        NFS: Fix calls to drop_nlink()
        NFS: Ensure that we always drop inodes that have been marked as stale
        nfs: Remove unused list nfs4_clientid_list
        nfs: Remove duplicate function declaration in internal.h
        NFS: avoid NULL dereference in nfs_destroy_server
        SUNRPC handle EKEYEXPIRED in call_refreshresult
        SUNRPC set gss gc_expiry to full lifetime
        nfs: fix page dirtying in NFS DIO read codepath
        nfs: don't zero out the rest of the page if we hit the EOF on a DIO READ
        NFSv4.1: Be conservative about the client highest slotid
        NFSv4.1: Handle NFS4ERR_BADSLOT errors correctly
        nfs: don't extend writes to cover entire page if pagecache is invalid
        ...
      2d4dce00
    • Linus Torvalds's avatar
      Merge tag 'md-3.8' of git://neil.brown.name/md · ea88eeac
      Linus Torvalds authored
      Pull md update from Neil Brown:
       "Mostly just little fixes.  Probably biggest part is AVX accelerated
        RAID6 calculations."
      
      * tag 'md-3.8' of git://neil.brown.name/md:
        md/raid5: add blktrace calls
        md/raid5: use async_tx_quiesce() instead of open-coding it.
        md: Use ->curr_resync as last completed request when cleanly aborting resync.
        lib/raid6: build proper files on corresponding arch
        lib/raid6: Add AVX2 optimized gen_syndrome functions
        lib/raid6: Add AVX2 optimized recovery functions
        md: Update checkpoint of resync/recovery based on time.
        md:Add place to update ->recovery_cp.
        md.c: re-indent various 'switch' statements.
        md: close race between removing and adding a device.
        md: removed unused variable in calc_sb_1_csm.
      ea88eeac
    • Linus Torvalds's avatar
      Merge branch 'akpm' (Andrew's patch-bomb) · 848b8141
      Linus Torvalds authored
      Merge misc patches from Andrew Morton:
       "Incoming:
      
         - lots of misc stuff
      
         - backlight tree updates
      
         - lib/ updates
      
         - Oleg's percpu-rwsem changes
      
         - checkpatch
      
         - rtc
      
         - aoe
      
         - more checkpoint/restart support
      
        I still have a pile of MM stuff pending - Pekka should be merging
        later today after which that is good to go.  A number of other things
        are twiddling thumbs awaiting maintainer merges."
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (180 commits)
        scatterlist: don't BUG when we can trivially return a proper error.
        docs: update documentation about /proc/<pid>/fdinfo/<fd> fanotify output
        fs, fanotify: add @mflags field to fanotify output
        docs: add documentation about /proc/<pid>/fdinfo/<fd> output
        fs, notify: add procfs fdinfo helper
        fs, exportfs: add exportfs_encode_inode_fh() helper
        fs, exportfs: escape nil dereference if no s_export_op present
        fs, epoll: add procfs fdinfo helper
        fs, eventfd: add procfs fdinfo helper
        procfs: add ability to plug in auxiliary fdinfo providers
        tools/testing/selftests/kcmp/kcmp_test.c: print reason for failure in kcmp_test
        breakpoint selftests: print failure status instead of cause make error
        kcmp selftests: print fail status instead of cause make error
        kcmp selftests: make run_tests fix
        mem-hotplug selftests: print failure status instead of cause make error
        cpu-hotplug selftests: print failure status instead of cause make error
        mqueue selftests: print failure status instead of cause make error
        vm selftests: print failure status instead of cause make error
        ubifs: use prandom_bytes
        mtd: nandsim: use prandom_bytes
        ...
      848b8141
    • Eric W. Biederman's avatar
      efi: Fix the build with user namespaces enabled. · 99295618
      Eric W. Biederman authored
      When compiling efivars.c the build fails with:
      
         CC      drivers/firmware/efivars.o
        drivers/firmware/efivars.c: In function ‘efivarfs_get_inode’:
        drivers/firmware/efivars.c:886:31: error: incompatible types when assigning to type ‘kgid_t’ from type ‘int’
        make[2]: *** [drivers/firmware/efivars.o] Error 1
        make[1]: *** [drivers/firmware/efivars.o] Error 2
      
      Fix the build error by removing the duplicate initialization of i_uid and
      i_gid inode_init_always has already initialized them to 0.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      99295618
    • Stephen Rothwell's avatar
      mm,numa: fix update_mmu_cache_pmd call · ce4a9cc5
      Stephen Rothwell authored
      This build error is currently hidden by the fact that the x86
      implementation of 'update_mmu_cache_pmd()' is a macro that doesn't use
      its last argument, but commit b32967ff ("mm: numa: Add THP migration
      for the NUMA working set scanning fault case") introduced a call with
      the wrong third argument.
      
      In the akpm tree, it causes this build error:
      
        mm/migrate.c: In function 'migrate_misplaced_transhuge_page_put':
        mm/migrate.c:1666:2: error: incompatible type for argument 3 of 'update_mmu_cache_pmd'
        arch/x86/include/asm/pgtable.h:792:20: note: expected 'struct pmd_t *' but argument is of type 'pmd_t'
      
      Fix it.
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ce4a9cc5
    • Nick Bowler's avatar
      scatterlist: don't BUG when we can trivially return a proper error. · 6fd59a83
      Nick Bowler authored
      There is absolutely no reason to crash the kernel when we have a
      perfectly good return value already available to use for conveying
      failure status.
      
      Let's return an error code instead of crashing the kernel: that sounds
      like a much better plan.
      
      [akpm@linux-foundation.org: s/E2BIG/EINVAL/]
      Signed-off-by: default avatarNick Bowler <nbowler@elliptictech.com>
      Cc: Maxim Levitsky <maximlevitsky@gmail.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6fd59a83
    • Cyrill Gorcunov's avatar
      docs: update documentation about /proc/<pid>/fdinfo/<fd> fanotify output · e71ec593
      Cyrill Gorcunov authored
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Matthew Helsley <matt.helsley@gmail.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e71ec593
    • Cyrill Gorcunov's avatar
      fs, fanotify: add @mflags field to fanotify output · e6dbcafb
      Cyrill Gorcunov authored
      The kernel keeps FAN_MARK_IGNORED_SURV_MODIFY bit separately from
      fsnotify_mark::mask|ignored_mask thus put it in @mflags (mark flags)
      field so the user-space reader will be able to detect if such bit were
      used on mark creation procedure.
      
       | pos:	0
       | flags:	04002
       | fanotify flags:10 event-flags:0
       | fanotify mnt_id:12 mflags:40 mask:38 ignored_mask:40000003
       | fanotify ino:4f969 sdev:800013 mflags:0 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type:1 f_handle:69f90400c275b5b4
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Matthew Helsley <matt.helsley@gmail.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e6dbcafb
    • Cyrill Gorcunov's avatar
      docs: add documentation about /proc/<pid>/fdinfo/<fd> output · f1d8c162
      Cyrill Gorcunov authored
      [akpm@linux-foundation.org: tweak documentation]
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Cc: Pavel Emelyanov <xemul@parallels.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Matthew Helsley <matt.helsley@gmail.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f1d8c162
    • Cyrill Gorcunov's avatar
      fs, notify: add procfs fdinfo helper · be77196b
      Cyrill Gorcunov authored
      This allow us to print out fsnotify details such as watchee inode, device,
      mask and optionally a file handle.
      
      For inotify objects if kernel compiled with exportfs support the output
      will be
      
       | pos:	0
       | flags:	02000000
       | inotify wd:3 ino:9e7e sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:7e9e0000640d1b6d
       | inotify wd:2 ino:a111 sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:11a1000020542153
       | inotify wd:1 ino:6b149 sdev:800013 mask:800afce ignored_mask:0 fhandle-bytes:8 fhandle-type:1 f_handle:49b1060023552153
      
      If kernel compiled without exportfs support, the file handle
      won't be provided but inode and device only.
      
       | pos:	0
       | flags:	02000000
       | inotify wd:3 ino:9e7e sdev:800013 mask:800afce ignored_mask:0
       | inotify wd:2 ino:a111 sdev:800013 mask:800afce ignored_mask:0
       | inotify wd:1 ino:6b149 sdev:800013 mask:800afce ignored_mask:0
      
      For fanotify the output is like
      
       | pos:	0
       | flags:	04002
       | fanotify flags:10 event-flags:0
       | fanotify mnt_id:12 mask:3b ignored_mask:0
       | fanotify ino:50205 sdev:800013 mask:3b ignored_mask:40000000 fhandle-bytes:8 fhandle-type:1 f_handle:05020500fb1d47e7
      
      To minimize impact on general fsnotify code the new functionality
      is gathered in fs/notify/fdinfo.c file.
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Acked-by: default avatarPavel Emelyanov <xemul@parallels.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Matthew Helsley <matt.helsley@gmail.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      be77196b
    • Cyrill Gorcunov's avatar
      fs, exportfs: add exportfs_encode_inode_fh() helper · 711c7bf9
      Cyrill Gorcunov authored
      We will need this helper in the next patch to provide a file handle for
      inotify marks in /proc/pid/fdinfo output.
      
      The patch is rather providing the way to use inodes directly when dentry
      is not available (like in case of inotify system).
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Acked-by: default avatarPavel Emelyanov <xemul@parallels.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Matthew Helsley <matt.helsley@gmail.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      711c7bf9
    • Cyrill Gorcunov's avatar
      fs, exportfs: escape nil dereference if no s_export_op present · ab49bdec
      Cyrill Gorcunov authored
      This routine will be used to generate a file handle in fdinfo output for
      inotify subsystem, where if no s_export_op present the general
      export_encode_fh should be used.  Thus add a test if s_export_op present
      inside exportfs_encode_fh itself.
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Acked-by: default avatarPavel Emelyanov <xemul@parallels.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Matthew Helsley <matt.helsley@gmail.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ab49bdec
    • Cyrill Gorcunov's avatar
      fs, epoll: add procfs fdinfo helper · 138d22b5
      Cyrill Gorcunov authored
      This allows us to print out eventpoll target file descriptor, events and
      data, the /proc/pid/fdinfo/fd consists of
      
       | pos:	0
       | flags:	02
       | tfd:        5 events:       1d data: ffffffffffffffff enabled: 1
      
      [avagin@: fix for unitialized ret variable]
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Acked-by: default avatarPavel Emelyanov <xemul@parallels.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Matthew Helsley <matt.helsley@gmail.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      138d22b5
    • Cyrill Gorcunov's avatar
      fs, eventfd: add procfs fdinfo helper · cbac5542
      Cyrill Gorcunov authored
      This allows us to print out raw counter value.  The /proc/pid/fdinfo/fd
      output is
      
       | pos:	0
       | flags:	04002
       | eventfd-count:               5a
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Acked-by: default avatarPavel Emelyanov <xemul@parallels.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Matthew Helsley <matt.helsley@gmail.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cbac5542
    • Cyrill Gorcunov's avatar
      procfs: add ability to plug in auxiliary fdinfo providers · 55985dd7
      Cyrill Gorcunov authored
      This patch brings ability to print out auxiliary data associated with
      file in procfs interface /proc/pid/fdinfo/fd.
      
      In particular further patches make eventfd, evenpoll, signalfd and
      fsnotify to print additional information complete enough to restore
      these objects after checkpoint.
      
      To simplify the code we add show_fdinfo callback inside struct
      file_operations (as Al and Pavel are proposing).
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Acked-by: default avatarPavel Emelyanov <xemul@parallels.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Matthew Helsley <matt.helsley@gmail.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      55985dd7
    • Dave Jones's avatar
      tools/testing/selftests/kcmp/kcmp_test.c: print reason for failure in kcmp_test · 2bf1cbf1
      Dave Jones authored
      I was curious why sys_kcmp wasn't working, which led me to the testcase.
      It turned out I hadn't enabled CHECKPOINT_RESTORE in the kernel I was
      testing.  Add a decoding of errno to the testcase to make that obvious.
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Acked-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2bf1cbf1
    • Dave Young's avatar
      breakpoint selftests: print failure status instead of cause make error · 5a55f8bb
      Dave Young authored
      In case breakpoint test exit non zero value it will cause make error.
      Better way is just print the test failure status.
      Signed-off-by: default avatarDave Young <dyoung@redhat.com>
      Reviewed-by: default avatarPekka Enberg <penberg@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5a55f8bb
    • Dave Young's avatar
      kcmp selftests: print fail status instead of cause make error · ed8ad10c
      Dave Young authored
      In case kcmp_test exit non zero value it will cause make error.
      Better way is just print the test failure status.
      Signed-off-by: default avatarDave Young <dyoung@redhat.com>
      Reviewed-by: default avatarPekka Enberg <penberg@kernel.org>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ed8ad10c
    • Dave Young's avatar
      kcmp selftests: make run_tests fix · 63d23367
      Dave Young authored
      make run_tests need the target is run_tests instead of run-tests
      Also gcc output should be kcmp_test. Fix these two issues.
      Signed-off-by: default avatarDave Young <dyoung@redhat.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      63d23367
    • Dave Young's avatar
      mem-hotplug selftests: print failure status instead of cause make error · aabccae6
      Dave Young authored
      Original behavior:
        bash-4.1$ make -C memory-hotplug run_tests
        make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'
        ./on-off-test.sh
        make: execvp: ./on-off-test.sh: Permission denied
        make: *** [run_tests] Error 127
        make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'
      
      After applying the patch:
        bash-4.1$ make -C memory-hotplug run_tests
        make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'
        /bin/sh: ./on-off-test.sh: Permission denied
        memory-hotplug selftests: [FAIL]
        make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/memory-hotplug'
      Signed-off-by: default avatarDave Young <dyoung@redhat.com>
      Reviewed-by: default avatarPekka Enberg <penberg@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      aabccae6
    • Dave Young's avatar
      cpu-hotplug selftests: print failure status instead of cause make error · a58130dd
      Dave Young authored
      Original behavior:
        bash-4.1$ make -C cpu-hotplug run_tests
        make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'
        ./on-off-test.sh
        make: execvp: ./on-off-test.sh: Permission denied
        make: *** [run_tests] Error 127
        make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'
      
      After applying the patch:
        bash-4.1$ make -C cpu-hotplug run_tests
        make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'
        /bin/sh: ./on-off-test.sh: Permission denied
        cpu-hotplug selftests: [FAIL]
        make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/cpu-hotplug'
      Signed-off-by: default avatarDave Young <dyoung@redhat.com>
      Reviewed-by: default avatarPekka Enberg <penberg@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a58130dd
    • Dave Young's avatar
      mqueue selftests: print failure status instead of cause make error · 9ed1d90e
      Dave Young authored
      Original behavior:
        bash-4.1$ make -C mqueue run_tests
        make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
        ./mq_open_tests /test1
        Not running as root, but almost all tests require root in order to modify
        system settings.  Exiting.
        make: *** [run_tests] Error 1
        make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
      
      After applying the patch:
        bash-4.1$ make -C mqueue run_tests
        make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
        Not running as root, but almost all tests require root in order to modify
        system settings.  Exiting.
        mq_open_tests: [FAIL]
        Not running as root, but almost all tests require root in order to modify
        system settings.  Exiting.
        mq_perf_tests: [FAIL]
        make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/mqueue'
      Signed-off-by: default avatarDave Young <dyoung@redhat.com>
      Reviewed-by: default avatarPekka Enberg <penberg@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9ed1d90e
    • Dave Young's avatar
      vm selftests: print failure status instead of cause make error · 000e06b0
      Dave Young authored
      Original behavior:
        bash-4.1$ make -C vm run_tests
        make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'
        /bin/sh ./run_vmtests
        ./run_vmtests: line 24: /proc/sys/vm/nr_hugepages: Permission denied
        Please run this test as root
        make: *** [run_tests] Error 1
        make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'
      
      After applying the patch:
        bash-4.1$ make -C vm run_tests
        make: Entering directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'
        ./run_vmtests: line 24: /proc/sys/vm/nr_hugepages: Permission denied
        Please run this test as root
        vmtests: [FAIL]
        make: Leaving directory `/home/dave/git/linux-2.6/tools/testing/selftests/vm'
      Signed-off-by: default avatarDave Young <dyoung@redhat.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      000e06b0
    • Akinobu Mita's avatar
      ubifs: use prandom_bytes · cdd9fa8d
      Akinobu Mita authored
      This also converts filling memory loop to use memset.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Artem Bityutskiy <dedekind1@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: David Laight <david.laight@aculab.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Eilon Greenstein <eilong@broadcom.com>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Robert Love <robert.w.love@intel.com>
      Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cdd9fa8d
    • Akinobu Mita's avatar
      mtd: nandsim: use prandom_bytes · 7e45bf83
      Akinobu Mita authored
      This also removes unnecessary memset call which is immediately overwritten
      with random bytes.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Artem Bityutskiy <dedekind1@gmail.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Laight <david.laight@aculab.com>
      Cc: Eilon Greenstein <eilong@broadcom.com>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Robert Love <robert.w.love@intel.com>
      Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7e45bf83
    • Akinobu Mita's avatar
      bnx2x: use prandom_bytes() · 8376d0bc
      Akinobu Mita authored
      Use prandom_bytes() to fill rss key with pseudo-random bytes.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Eilon Greenstein <eilong@broadcom.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Artem Bityutskiy <dedekind1@gmail.com>
      Cc: David Laight <david.laight@aculab.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Robert Love <robert.w.love@intel.com>
      Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8376d0bc
    • Akinobu Mita's avatar
      prandom: introduce prandom_bytes() and prandom_bytes_state() · 6582c665
      Akinobu Mita authored
      Add functions to get the requested number of pseudo-random bytes.
      
      The difference from get_random_bytes() is that it generates pseudo-random
      numbers by prandom_u32().  It doesn't consume the entropy pool, and the
      sequence is reproducible if the same rnd_state is used.  So it is suitable
      for generating random bytes for testing.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Artem Bityutskiy <dedekind1@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Eilon Greenstein <eilong@broadcom.com>
      Cc: David Laight <david.laight@aculab.com>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Robert Love <robert.w.love@intel.com>
      Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6582c665
    • Akinobu Mita's avatar
      random32: rename random32 to prandom · 496f2f93
      Akinobu Mita authored
      This renames all random32 functions to have 'prandom_' prefix as follows:
      
        void prandom_seed(u32 seed);	/* rename from srandom32() */
        u32 prandom_u32(void);		/* rename from random32() */
        void prandom_seed_state(struct rnd_state *state, u64 seed);
        				/* rename from prandom32_seed() */
        u32 prandom_u32_state(struct rnd_state *state);
        				/* rename from prandom32() */
      
      The purpose of this renaming is to prevent some kernel developers from
      assuming that prandom32() and random32() might imply that only
      prandom32() was the one using a pseudo-random number generator by
      prandom32's "p", and the result may be a very embarassing security
      exposure.  This concern was expressed by Theodore Ts'o.
      
      And furthermore, I'm going to introduce new functions for getting the
      requested number of pseudo-random bytes.  If I continue to use both
      prandom32 and random32 prefixes for these functions, the confusion
      is getting worse.
      
      As a result of this renaming, "prandom_" is the common prefix for
      pseudo-random number library.
      
      Currently, srandom32() and random32() are preserved because it is
      difficult to rename too many users at once.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Robert Love <robert.w.love@intel.com>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
      Cc: David Laight <david.laight@aculab.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Artem Bityutskiy <dedekind1@gmail.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Eilon Greenstein <eilong@broadcom.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      496f2f93
    • Dan Carpenter's avatar
      aoe: fix use after free in aoedev_by_aoeaddr() · 31279b14
      Dan Carpenter authored
      We should return NULL on failure instead of returning a freed pointer.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: Ed Cashin <ecashin@coraid.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      31279b14
    • Ed Cashin's avatar
      aoe: update internal version number to 81 · 2b37c7d8
      Ed Cashin authored
      This version number is printed to the console on module initialization
      and is available in sysfs, which is where the userland aoe-version tool
      looks for it.
      Signed-off-by: default avatarEd Cashin <ecashin@coraid.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2b37c7d8
    • Ed Cashin's avatar
      aoe: identify source of runt AoE packets · bf29754a
      Ed Cashin authored
      This change only affects experimental AoE storage networks.
      
      It modifies the console message about runt packets detected so that the
      AoE major and minor addresses of the AoE target that generated the runt
      are mentioned.
      Signed-off-by: default avatarEd Cashin <ecashin@coraid.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bf29754a
    • Ed Cashin's avatar
      aoe: allow comma separator in aoe_iflist value · 4a6c9ee9
      Ed Cashin authored
      By default, the aoe driver uses any ethernet interface for AoE, but the
      aoe_iflist module parameter provides a convenient way to limit AoE
      traffic to a specific list of local network interfaces.
      
      This change allows a list to be specified using the comma character as a
      separator.  For example,
      
        modprobe aoe aoe_iflist=eth2,eth3
      
      Before, it was inconvenient to get the quoting right in shell scripts
      when setting aoe_iflist to have more than one network interface.
      Signed-off-by: default avatarEd Cashin <ecashin@coraid.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4a6c9ee9
    • Ed Cashin's avatar
      aoe: allow user to disable target failure timeout · c450ba0f
      Ed Cashin authored
      With this change, the aoe driver treats the value zero as special for
      the aoe_deadsecs module parameter.  Normally, this value specifies the
      number of seconds during which the driver will continue to attempt
      retransmits to an unresponsive AoE target.  After aoe_deadsecs has
      elapsed, the aoe driver marks the aoe device as "down" and fails all
      I/O.
      
      The new meaning of an aoe_deadsecs of zero is for the driver to
      retransmit commands indefinitely.
      Signed-off-by: default avatarEd Cashin <ecashin@coraid.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c450ba0f