1. 31 Mar, 2016 12 commits
    • Shaohua Li's avatar
      MD: add rdev reference for super write · ed3b98c7
      Shaohua Li authored
      Xiao Ni reported below crash:
      [26396.335146] BUG: unable to handle kernel NULL pointer dereference at 00000000000002a8
      [26396.342990] IP: [<ffffffffa0425b00>] super_written+0x20/0x80 [md_mod]
      [26396.349449] PGD 0
      [26396.351468] Oops: 0002 [#1] SMP
      [26396.354898] Modules linked in: ext4 mbcache jbd2 raid456 async_raid6_recov async_memcpy async_pq async_xor xor async_td
      [26396.408404] CPU: 5 PID: 3261 Comm: loop0 Not tainted 4.5.0 #1
      [26396.414140] Hardware name: Dell Inc. PowerEdge R715/0G2DP3, BIOS 3.2.2 09/15/2014
      [26396.421608] task: ffff8808339be680 ti: ffff8808365f4000 task.ti: ffff8808365f4000
      [26396.429074] RIP: 0010:[<ffffffffa0425b00>]  [<ffffffffa0425b00>] super_written+0x20/0x80 [md_mod]
      [26396.437952] RSP: 0018:ffff8808365f7c38  EFLAGS: 00010046
      [26396.443252] RAX: ffffffffa0425ae0 RBX: ffff8804336a7900 RCX: ffffe8f9f7b41198
      [26396.450371] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8804336a7900
      [26396.457489] RBP: ffff8808365f7c50 R08: 0000000000000005 R09: 00001801e02ce3d7
      [26396.464608] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
      [26396.471728] R13: ffff8808338d9a00 R14: 0000000000000000 R15: ffff880833f9fe00
      [26396.478849] FS:  00007f9e5066d740(0000) GS:ffff880237b40000(0000) knlGS:0000000000000000
      [26396.486922] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [26396.492656] CR2: 00000000000002a8 CR3: 00000000019ea000 CR4: 00000000000006e0
      [26396.499775] Stack:
      [26396.501781]  ffff8804336a7900 0000000000000000 0000000000000000 ffff8808365f7c68
      [26396.509199]  ffffffff81308cd0 ffff8804336a7900 ffff8808365f7ca8 ffffffff81310637
      [26396.516618]  00000000a0233a00 ffff880833f9fe00 0000000000000000 ffff880833fb0000
      [26396.524038] Call Trace:
      [26396.526485]  [<ffffffff81308cd0>] bio_endio+0x40/0x60
      [26396.531529]  [<ffffffff81310637>] blk_update_request+0x87/0x320
      [26396.537439]  [<ffffffff8131a20a>] blk_mq_end_request+0x1a/0x70
      [26396.543261]  [<ffffffff81313889>] blk_flush_complete_seq+0xd9/0x2a0
      [26396.549517]  [<ffffffff81313ccf>] flush_end_io+0x15f/0x240
      [26396.554993]  [<ffffffff8131a22a>] blk_mq_end_request+0x3a/0x70
      [26396.560815]  [<ffffffff8131a314>] __blk_mq_complete_request+0xb4/0xe0
      [26396.567246]  [<ffffffff8131a35c>] blk_mq_complete_request+0x1c/0x20
      [26396.573506]  [<ffffffffa04182df>] loop_queue_work+0x6f/0x72c [loop]
      [26396.579764]  [<ffffffff81697844>] ? __schedule+0x2b4/0x8f0
      [26396.585242]  [<ffffffff810a7812>] kthread_worker_fn+0x52/0x170
      [26396.591065]  [<ffffffff810a77c0>] ? kthread_create_on_node+0x1a0/0x1a0
      [26396.597582]  [<ffffffff810a7238>] kthread+0xd8/0xf0
      [26396.602453]  [<ffffffff810a7160>] ? kthread_park+0x60/0x60
      [26396.607929]  [<ffffffff8169bdcf>] ret_from_fork+0x3f/0x70
      [26396.613319]  [<ffffffff810a7160>] ? kthread_park+0x60/0x60
      
      md_super_write() and corresponding md_super_wait() generally are called
      with reconfig_mutex locked, which prevents disk disappears. There is one
      case this rule is broken. write_sb_page of bitmap.c doesn't hold the
      mutex. next_active_rdev does increase rdev reference, but it decreases
      the reference too early (eg, before IO finish). disk can disappear at
      the window. We unconditionally increase rdev reference in
      md_super_write() to avoid the race.
      Reported-and-tested-by: default avatarXiao Ni <xni@redhat.com>
      Reviewed-by: default avatarNeil Brown <neilb@suse.de>
      Signed-off-by: default avatarShaohua Li <shli@fb.com>
      ed3b98c7
    • Wei Fang's avatar
      md: fix a trivial typo in comments · 466ad292
      Wei Fang authored
      Fix a trivial typo in md_ioctl().
      Signed-off-by: default avatarWei Fang <fangwei1@huawei.com>
      Signed-off-by: default avatarShaohua Li <shli@fb.com>
      466ad292
    • Wei Fang's avatar
      md:raid1: fix a dead loop when read from a WriteMostly disk · 816b0acf
      Wei Fang authored
      If first_bad == this_sector when we get the WriteMostly disk
      in read_balance(), valid disk will be returned with zero
      max_sectors. It'll lead to a dead loop in make_request(), and
      OOM will happen because of endless allocation of struct bio.
      
      Since we can't get data from this disk in this case, so
      continue for another disk.
      Signed-off-by: default avatarWei Fang <fangwei1@huawei.com>
      Signed-off-by: default avatarShaohua Li <shli@fb.com>
      816b0acf
    • Linus Torvalds's avatar
      Merge branch 'parisc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · c05c2ec9
      Linus Torvalds authored
      Pull parisc fixes from Helge Deller:
       "Fix seccomp filter support and SIGSYS signals on compat kernel.
      
        Both patches are tagged for v4.5 stable kernel"
      
      * 'parisc-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Fix and enable seccomp filter support
        parisc: Fix SIGSYS signals in compat case
      c05c2ec9
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · e9dcfaff
      Linus Torvalds authored
      Pull vfs fix from Al Viro.
      
      Automount handling was broken by commit e3c13928 ("namei: massage
      lookup_slow() to be usable by lookup_one_len_unlocked()") moving the
      test for negative dentry too early.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix the braino in "namei: massage lookup_slow() to be usable by lookup_one_len_unlocked()"
      e9dcfaff
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · ca457204
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "Here are two GPIO fixes for the v4.6 series, both in drivers:
      
         - Prevent NULL dereference in the Xgene driver
         - Fix an uninitialized spinlock in the menz127 driver"
      
      * tag 'gpio-v4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: xgene: Prevent NULL pointer dereference
        gpio: menz127: Drop lock field from struct men_z127_gpio
      ca457204
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · c5bce408
      Linus Torvalds authored
      Pull nvdimm mcsafe_memcpy use from Dan Williams:
       "Now that mcsafe_memcpy() has landed, and the return value was been
        clarified in commit cbf8b5a2 ("x86/mm, x86/mce: Fix return
        type/value for memcpy_mcsafe()"), let's hook up its primary usage in
        the pmem driver.
      
        The compilation problems from the initial posting have been fixed,
        this has appeared in a -next release with no reported issues, and it
        picked up an ack from Ingo.  There is no pressing need to merge this
        in 4.6- rc2.  However, if we wait until 4.7 the new memcpy_mcsafe()
        capability will ship without a user in 4.6-final"
      
      * 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        x86, pmem: use memcpy_mcsafe() for memcpy_from_pmem()
      c5bce408
    • Helge Deller's avatar
      parisc: Fix and enable seccomp filter support · 910cd32e
      Helge Deller authored
      The seccomp filter support requires careful handling of task registers.  This
      includes reloading of the return value (%r28) and proper syscall exit if
      secure_computing() returned -1.
      
      Additionally we need to sign-extend the syscall number from signed 32bit to
      signed 64bit in do_syscall_trace_enter() since the ptrace interface only allows
      storing 32bit values in compat mode.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: stable@vger.kernel.org # v4.5
      910cd32e
    • Helge Deller's avatar
      parisc: Fix SIGSYS signals in compat case · 4f4acc94
      Helge Deller authored
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: stable@vger.kernel.org # v4.5
      4f4acc94
    • Al Viro's avatar
      fix the braino in "namei: massage lookup_slow() to be usable by lookup_one_len_unlocked()" · 7500c38a
      Al Viro authored
      We should try to trigger automount *before* bailing out on negative dentry.
      Reported-by: default avatarJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Reported-by: default avatarJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Reported-by: default avatarArend van Spriel <arend@broadcom.com>
      Tested-by: default avatarArend van Spriel <arend@broadcom.com>
      Tested-by: default avatarJun'ichi Nomura <j-nomura@ce.jp.nec.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      7500c38a
    • Linus Torvalds's avatar
      Merge tag 'nios2-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 · 1e6d88cc
      Linus Torvalds authored
      Pull nios2 fix from Ley Foon Tan:
       "Replace fdt_translate_address with of_flat_dt_translate_address"
      
      Fixes a build failure.
      
      * tag 'nios2-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
        nios2: Replace fdt_translate_address with of_flat_dt_translate_address
      1e6d88cc
    • Guenter Roeck's avatar
      nios2: Replace fdt_translate_address with of_flat_dt_translate_address · 8fe88927
      Guenter Roeck authored
      nios2 builds fail with the following build error.
      
      arch/nios2/kernel/prom.c: In function 'early_init_dt_scan_serial':
      arch/nios2/kernel/prom.c:100:2: error:
      	implicit declaration of function 'fdt_translate_address'
      
      Commit c90fe9c0 ("of: earlycon: Move address translation to
      of_setup_earlycon()") replaced fdt_translate_address() with
      of_flat_dt_translate_address() but missed updating the nios2 code.
      
      Fixes: c90fe9c0 ("of: earlycon: Move address translation to of_setup_earlycon()")
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Rob Herring <robh@kernel.org>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarLey Foon Tan <lftan@altera.com>
      8fe88927
  2. 30 Mar, 2016 5 commits
  3. 29 Mar, 2016 2 commits
  4. 28 Mar, 2016 3 commits
  5. 27 Mar, 2016 1 commit
    • Guenter Roeck's avatar
      hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiated · 3c2e2266
      Guenter Roeck authored
      arm:pxa_defconfig can result in the following crash if the max1111 driver
      is not instantiated.
      
      Unhandled fault: page domain fault (0x01b) at 0x00000000
      pgd = c0004000
      [00000000] *pgd=00000000
      Internal error: : 1b [#1] PREEMPT ARM
      Modules linked in:
      CPU: 0 PID: 300 Comm: kworker/0:1 Not tainted 4.5.0-01301-g1701f680 #10
      Hardware name: SHARP Akita
      Workqueue: events sharpsl_charge_toggle
      task: c390a000 ti: c391e000 task.ti: c391e000
      PC is at max1111_read_channel+0x20/0x30
      LR is at sharpsl_pm_pxa_read_max1111+0x2c/0x3c
      pc : [<c03aaab0>]    lr : [<c0024b50>]    psr: 20000013
      ...
      [<c03aaab0>] (max1111_read_channel) from [<c0024b50>]
      					(sharpsl_pm_pxa_read_max1111+0x2c/0x3c)
      [<c0024b50>] (sharpsl_pm_pxa_read_max1111) from [<c00262e0>]
      					(spitzpm_read_devdata+0x5c/0xc4)
      [<c00262e0>] (spitzpm_read_devdata) from [<c0024094>]
      					(sharpsl_check_battery_temp+0x78/0x110)
      [<c0024094>] (sharpsl_check_battery_temp) from [<c0024f9c>]
      					(sharpsl_charge_toggle+0x48/0x110)
      [<c0024f9c>] (sharpsl_charge_toggle) from [<c004429c>]
      					(process_one_work+0x14c/0x48c)
      [<c004429c>] (process_one_work) from [<c0044618>] (worker_thread+0x3c/0x5d4)
      [<c0044618>] (worker_thread) from [<c004a238>] (kthread+0xd0/0xec)
      [<c004a238>] (kthread) from [<c000a670>] (ret_from_fork+0x14/0x24)
      
      This can occur because the SPI controller driver (SPI_PXA2XX) is built as
      module and thus not necessarily loaded. While building SPI_PXA2XX into the
      kernel would make the problem disappear, it appears prudent to ensure that
      the driver is instantiated before accessing its data structures.
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      3c2e2266
  6. 26 Mar, 2016 15 commits
    • Linus Torvalds's avatar
      Linux 4.6-rc1 · f55532a0
      Linus Torvalds authored
      f55532a0
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · d5a38f6e
      Linus Torvalds authored
      Pull Ceph updates from Sage Weil:
       "There is quite a bit here, including some overdue refactoring and
        cleanup on the mon_client and osd_client code from Ilya, scattered
        writeback support for CephFS and a pile of bug fixes from Zheng, and a
        few random cleanups and fixes from others"
      
      [ I already decided not to pull this because of it having been rebased
        recently, but ended up changing my mind after all.  Next time I'll
        really hold people to it.  Oh well.   - Linus ]
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (34 commits)
        libceph: use KMEM_CACHE macro
        ceph: use kmem_cache_zalloc
        rbd: use KMEM_CACHE macro
        ceph: use lookup request to revalidate dentry
        ceph: kill ceph_get_dentry_parent_inode()
        ceph: fix security xattr deadlock
        ceph: don't request vxattrs from MDS
        ceph: fix mounting same fs multiple times
        ceph: remove unnecessary NULL check
        ceph: avoid updating directory inode's i_size accidentally
        ceph: fix race during filling readdir cache
        libceph: use sizeof_footer() more
        ceph: kill ceph_empty_snapc
        ceph: fix a wrong comparison
        ceph: replace CURRENT_TIME by current_fs_time()
        ceph: scattered page writeback
        libceph: add helper that duplicates last extent operation
        libceph: enable large, variable-sized OSD requests
        libceph: osdc->req_mempool should be backed by a slab pool
        libceph: make r_request msg_size calculation clearer
        ...
      d5a38f6e
    • Linus Torvalds's avatar
      Merge tag 'ofs-pull-tag-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux · 698f415c
      Linus Torvalds authored
      Pull orangefs filesystem from Mike Marshall.
      
      This finally merges the long-pending orangefs filesystem, which has been
      much cleaned up with input from Al Viro over the last six months.  From
      the documentation file:
      
       "OrangeFS is an LGPL userspace scale-out parallel storage system.  It
        is ideal for large storage problems faced by HPC, BigData, Streaming
        Video, Genomics, Bioinformatics.
      
        Orangefs, originally called PVFS, was first developed in 1993 by Walt
        Ligon and Eric Blumer as a parallel file system for Parallel Virtual
        Machine (PVM) as part of a NASA grant to study the I/O patterns of
        parallel programs.
      
        Orangefs features include:
      
          - Distributes file data among multiple file servers
          - Supports simultaneous access by multiple clients
          - Stores file data and metadata on servers using local file system
            and access methods
          - Userspace implementation is easy to install and maintain
          - Direct MPI support
          - Stateless"
      
      see Documentation/filesystems/orangefs.txt for more in-depth details.
      
      * tag 'ofs-pull-tag-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: (174 commits)
        orangefs: fix orangefs_superblock locking
        orangefs: fix do_readv_writev() handling of error halfway through
        orangefs: have ->kill_sb() evict the VFS side of things first
        orangefs: sanitize ->llseek()
        orangefs-bufmap.h: trim unused junk
        orangefs: saner calling conventions for getting a slot
        orangefs_copy_{to,from}_bufmap(): don't pass bufmap pointer
        orangefs: get rid of readdir_handle_s
        ornagefs: ensure that truncate has an up to date inode size
        orangefs: move code which sets i_link to orangefs_inode_getattr
        orangefs: remove needless wrapper around GFP_KERNEL
        orangefs: remove wrapper around mutex_lock(&inode->i_mutex)
        orangefs: refactor inode type or link_target change detection
        orangefs: use new getattr for revalidate and remove old getattr
        orangefs: use new getattr in inode getattr and permission
        orangefs: use new orangefs_inode_getattr to get size in write and llseek
        orangefs: use new orangefs_inode_getattr to create new inodes
        orangefs: rename orangefs_inode_getattr to orangefs_inode_old_getattr
        orangefs: remove inode->i_lock wrapper
        orangefs: put register_chrdev immediately before register_filesystem
        ...
      698f415c
    • Linus Torvalds's avatar
      Merge tag 'ntb-4.6' of git://github.com/jonmason/ntb · b4cec5f6
      Linus Torvalds authored
      Pull NTB bug fixes from Jon Mason:
       "NTB bug fixes for tasklet from spinning forever, link errors,
        translation window setup, NULL ptr dereference, and ntb-perf errors.
      
        Also, a modification to the driver API that makes _addr functions
        optional"
      
      * tag 'ntb-4.6' of git://github.com/jonmason/ntb:
        NTB: Remove _addr functions from ntb_hw_amd
        NTB: Make _addr functions optional in the API
        NTB: Fix incorrect clean up routine in ntb_perf
        NTB: Fix incorrect return check in ntb_perf
        ntb: fix possible NULL dereference
        ntb: add missing setup of translation window
        ntb: stop link work when we do not have memory
        ntb: stop tasklet from spinning forever during shutdown.
        ntb: perf test: fix address space confusion
      b4cec5f6
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 895a1067
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "The only new stuff which missed the first pull request is an update to
        the UFS driver.
      
        The rest is an assortment of bug fixes and minor tweaks which appeared
        recently (some are fixes for recent code and some are stuff spotted
        recently by the checkers or the new gcc-6 compiler [most of Arnd's
        stuff])"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits)
        scsi_common: do not clobber fixed sense information
        scsi: ufs: select CONFIG_NLS
        scsi: fc: use get/put_unaligned64 for wwn access
        fnic: move printk()s outside of the critical code section.
        qla2xxx: avoid maybe_uninitialized warning
        megaraid_sas: add missing curly braces in ioctl handler
        lpfc: fix misleading indentation
        scsi_transport_sas: add 'scsi_target_id' sysfs attribute
        scsi_dh_alua: uninitialized variable in alua_check_vpd()
        scsi: ufs-qcom: add printouts of testbus debug registers
        scsi: ufs-qcom: enable/disable the device ref clock
        scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup
        scsi: ufs: add device quirk delay before putting UFS rails in LPM
        scsi: ufs: fix leakage during link off state
        scsi: ufs: tune UniPro parameters to optimize hibern8 exit time
        scsi: ufs: handle non spec compliant bkops behaviour by device
        scsi: ufs: add retry for query descriptors
        scsi: ufs: add error recovery after DL NAC error
        scsi: ufs: make error handling bit faster
        scsi: ufs: disable vccq if it's not needed by UFS device
        ...
      895a1067
    • Linus Torvalds's avatar
      f2fs/crypto: fix xts_tweak initialization · 02fc59a0
      Linus Torvalds authored
      Commit 0b81d077 ("fs crypto: move per-file encryption from f2fs
      tree to fs/crypto") moved the f2fs crypto files to fs/crypto/ and
      renamed the symbol prefixes from "f2fs_" to "fscrypt_" (and from "F2FS_"
      to just "FS" for preprocessor symbols).
      
      Because of the symbol renaming, it's a bit hard to see it as a file
      move: use
      
          git show -M30 0b81d077
      
      to lower the rename detection to just 30% similarity and make git show
      the files as renamed (the header file won't be shown as a rename even
      then - since all it contains is symbol definitions, it looks almost
      completely different).
      
      Even with the renames showing as renames, the diffs are not all that
      easy to read, since so much is just the renames.  But Eric Biggers
      noticed that it's not just all renames: the initialization of the
      xts_tweak had been broken too, using the inode number rather than the
      page offset.
      
      That's not right - it makes the xfs_tweak the same for all pages of each
      inode.  It _might_ make sense to make the xfs_tweak contain both the
      offset _and_ the inode number, but not just the inode number.
      Reported-by: default avatarEric Biggers <ebiggers3@gmail.com>
      Cc: Jaegeuk Kim <jaegeuk@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      02fc59a0
    • Allen Hubbe's avatar
      NTB: Remove _addr functions from ntb_hw_amd · 4f1b50c3
      Allen Hubbe authored
      Kernel zero day testing warned about address space confusion.  A virtual
      iomem address was used where a physical address is expected.  The
      offending functions implement an optional part of the api, so they are
      removed.  They can be added later, after testing.
      
      Fixes: a1b36958Signed-off-by: default avatarAllen Hubbe <Allen.Hubbe@emc.com>
      Acked-by: default avatarXiangliang Yu <Xiangliang.Yu@amd.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      4f1b50c3
    • Al Viro's avatar
      orangefs: fix orangefs_superblock locking · 45996492
      Al Viro authored
      * switch orangefs_remount() to taking ORANGEFS_SB(sb) instead of sb
      * remove from the list _before_ orangefs_unmount() - request_mutex
      in the latter will make sure that nothing observed in the loop in
      ORANGEFS_DEV_REMOUNT_ALL handling will get freed until the end
      of loop
      * on removal, keep the forward pointer and zero the back one.  That
      way we can drop and regain the spinlock in the loop body (again,
      ORANGEFS_DEV_REMOUNT_ALL one) and still be able to get to the
      rest of the list.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
      45996492
    • Al Viro's avatar
      orangefs: fix do_readv_writev() handling of error halfway through · 6d4c1a30
      Al Viro authored
      Error should only be returned if nothing had been read/written.
      Otherwise we need to report a short read/write instead.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
      6d4c1a30
    • Al Viro's avatar
    • Al Viro's avatar
      orangefs: sanitize ->llseek() · 177f8fc4
      Al Viro authored
      a) open files can't have NULL inodes
      b) it's SEEK_END, not ORANGEFS_SEEK_END; no need to get cute.
      c) make_bad_inode() on lseek()?
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
      177f8fc4
    • Al Viro's avatar
      orangefs-bufmap.h: trim unused junk · 7df240d7
      Al Viro authored
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
      7df240d7
    • Al Viro's avatar
      orangefs: saner calling conventions for getting a slot · b8a99a8f
      Al Viro authored
      just have it return the slot number or -E... - the caller checks
      the sign anyway
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
      b8a99a8f
    • Al Viro's avatar
      orangefs_copy_{to,from}_bufmap(): don't pass bufmap pointer · bf6bf606
      Al Viro authored
      it's always __orangefs_bufmap
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
      bf6bf606
    • Al Viro's avatar
      orangefs: get rid of readdir_handle_s · 9f5e2f7f
      Al Viro authored
      no point, really - we couldn't keep those across the calls of
      getdents(); it would be too easy to DoS, having all slots exhausted.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
      9f5e2f7f
  7. 25 Mar, 2016 2 commits
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 606c61a0
      Linus Torvalds authored
      Merge fourth patch-bomb from Andrew Morton:
       "A lot more stuff than expected, sorry.  A bunch of ocfs2 reviewing was
        finished off.
      
         - mhocko's oom-reaper out-of-memory-handler changes
      
         - ocfs2 fixes and features
      
         - KASAN feature work
      
         - various fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (42 commits)
        thp: fix typo in khugepaged_scan_pmd()
        MAINTAINERS: fill entries for KASAN
        mm/filemap: generic_file_read_iter(): check for zero reads unconditionally
        kasan: test fix: warn if the UAF could not be detected in kmalloc_uaf2
        mm, kasan: stackdepot implementation. Enable stackdepot for SLAB
        arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections
        mm, kasan: add GFP flags to KASAN API
        mm, kasan: SLAB support
        kasan: modify kmalloc_large_oob_right(), add kmalloc_pagealloc_oob_right()
        include/linux/oom.h: remove undefined oom_kills_count()/note_oom_kill()
        mm/page_alloc: prevent merging between isolated and other pageblocks
        drivers/memstick/host/r592.c: avoid gcc-6 warning
        ocfs2: extend enough credits for freeing one truncate record while replaying truncate records
        ocfs2: extend transaction for ocfs2_remove_rightmost_path() and ocfs2_update_edge_lengths() before to avoid inconsistency between inode and et
        ocfs2/dlm: move lock to the tail of grant queue while doing in-place convert
        ocfs2: solve a problem of crossing the boundary in updating backups
        ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local
        ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list
        ocfs2/dlm: fix race between convert and recovery
        ocfs2: fix a deadlock issue in ocfs2_dio_end_io_write()
        ...
      606c61a0
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 15dbc136
      Linus Torvalds authored
      Pull power management fixlet from Rafael Wysocki:
       "One of commits in my previous pull request changed the permissions of
        drivers/power/avs/rockchip-io-domain.c to executable by mistake"
      
      * tag 'pm+acpi-4.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        Fix permissions of drivers/power/avs/rockchip-io-domain.c
      15dbc136