22 Nov, 2015

1 commit

  • Merge misc fixes from Andrew Morton:
    "A bunch of fixes"

    * emailed patches from Andrew Morton :
    slub: mark the dangling ifdef #else of CONFIG_SLUB_DEBUG
    slub: avoid irqoff/on in bulk allocation
    slub: create new ___slab_alloc function that can be called with irqs disabled
    mm: fix up sparse warning in gfpflags_allow_blocking
    ocfs2: fix umask ignored issue
    PM/OPP: add entry in MAINTAINERS
    kernel/panic.c: turn off locks debug before releasing console lock
    kernel/signal.c: unexport sigsuspend()
    kasan: fix kmemleak false-positive in kasan_module_alloc()
    fat: fix fake_offset handling on error path
    mm/hugetlbfs: fix bugs in fallocate hole punch of areas with holes
    mm/page-writeback.c: initialize m_dirty to avoid compile warning
    various: fix pci_set_dma_mask return value checking
    mm: loosen MADV_NOHUGEPAGE to enable Qemu postcopy on s390
    mm: vmalloc: don't remove inexistent guard hole in remove_vm_area()
    tools/vm/page-types.c: support KPF_IDLE
    ncpfs: don't allow negative timeouts
    configfs: allow dynamic group creation
    MAINTAINERS: add Moritz as reviewer for FPGA Manager Framework
    slab.h: sprinkle __assume_aligned attributes

    Linus Torvalds
     

21 Nov, 2015

6 commits

  • New created file's mode is not masked with umask, and this makes umask not
    work for ocfs2 volume.

    Fixes: 702e5bc ("ocfs2: use generic posix ACL infrastructure")
    Signed-off-by: Junxiao Bi
    Cc: Gang He
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Junxiao Bi
     
  • For the root directory, . and .. are faked (using dir_emit_dots()) and
    ctx->pos is reset from 2 to 0.

    A corrupted root directory could cause fat_get_entry() to fail, but
    ->iterate() (fat_readdir()) reports progress to the VFS (with ctx->pos
    rewound to 0), so any following calls to ->iterate() continue to return
    the same entries again and again.

    The result is that userspace will never see the end of the directory,
    causing e.g. 'ls' to hang in a getdents() loop.

    [hirofumi@mail.parknet.co.jp: cleanup and make sure to correct fake_offset]
    Reported-by: Vegard Nossum
    Tested-by: Vegard Nossum
    Signed-off-by: Richard Weinberger
    Signed-off-by: OGAWA Hirofumi
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    OGAWA Hirofumi
     
  • Hugh Dickins pointed out problems with the new hugetlbfs fallocate hole
    punch code. These problems are in the routine remove_inode_hugepages and
    mostly occur in the case where there are holes in the range of pages to be
    removed. These holes could be the result of a previous hole punch or
    simply sparse allocation. The current code could access pages outside the
    specified range.

    remove_inode_hugepages handles both hole punch and truncate operations.
    Page index handling was fixed/cleaned up so that the loop index always
    matches the page being processed. The code now only makes a single pass
    through the range of pages as it was determined page faults could not race
    with truncate. A cond_resched() was added after removing up to
    PAGEVEC_SIZE pages.

    Some totally unnecessary code in hugetlbfs_fallocate() that remained from
    early development was also removed.

    Tested with fallocate tests submitted here:
    http://librelist.com/browser//libhugetlbfs/2015/6/25/patch-tests-add-tests-for-fallocate-system-call/
    And, some ftruncate tests under development

    Fixes: b5cec28d36f5 ("hugetlbfs: truncate_hugepages() takes a range of pages")
    Signed-off-by: Mike Kravetz
    Acked-by: Hugh Dickins
    Cc: Dave Hansen
    Cc: Naoya Horiguchi
    Cc: Davidlohr Bueso
    Cc: "Hillf Danton"
    Cc: [4.3]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Kravetz
     
  • This code causes a static checker warning because it's a user controlled
    variable where we cap the upper bound but not the lower bound. Let's
    return an -EINVAL for negative timeouts.

    [akpm@linux-foundation.org: remove unneeded `else']
    Signed-off-by: Dan Carpenter
    Reviewed-by: Jan Kara
    Cc: Petr Vandrovec
    Cc: David Howells
    Cc: Jan Kara
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • This patchset introduces IIO software triggers, offers a way of configuring
    them via configfs and adds the IIO hrtimer based interrupt source to be used
    with software triggers.

    The architecture is now split in 3 parts, to remove all IIO trigger specific
    parts from IIO configfs core:

    (1) IIO configfs - creates the root of the IIO configfs subsys.
    (2) IIO software triggers - software trigger implementation, dynamically
    creating /config/iio/triggers group.
    (3) IIO hrtimer trigger - is the first interrupt source for software triggers
    (with syfs to follow). Each trigger type can implement its own set of
    attributes.

    Lockdep seems to be happy with the locking in configfs patch.

    This patch (of 5):

    We don't want to hardcode default groups at subsystem
    creation time. We export:
    * configfs_register_group
    * configfs_unregister_group
    to allow drivers to programatically create/destroy groups
    later, after module init time.

    This is needed for IIO configfs support.

    (akpm: the other 4 patches to be merged via the IIO tree)

    Signed-off-by: Daniel Baluta
    Suggested-by: Lars-Peter Clausen
    Reviewed-by: Christoph Hellwig
    Acked-by: Joel Becker
    Cc: Hartmut Knaack
    Cc: Octavian Purdila
    Cc: Paul Bolle
    Cc: Adriana Reus
    Cc: Cristina Opriceana
    Cc: Peter Meerwald
    Cc: Alexander Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Baluta
     
  • Pull libnvdimm fixes from Dan Williams:

    - A collection of crash and deadlock fixes for DAX that are also tagged
    for -stable. We will look to re-enable DAX pmd mappings in 4.5, but
    for now 4.4 and -stable should disable it by default.

    - A fixup to ext2 and ext4 to mirror the same warning emitted by XFS
    when mounting with "-o dax"

    * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
    block: protect rw_page against device teardown
    mm, dax: fix DAX deadlocks (COW fault)
    dax: disable pmd mappings
    ext2, ext4: warn when mounting with dax enabled

    Linus Torvalds
     

20 Nov, 2015

1 commit

  • Fix use after free crashes like the following:

    general protection fault: 0000 [#1] SMP
    Call Trace:
    [] ? pmem_do_bvec.isra.12+0xa6/0xf0 [nd_pmem]
    [] pmem_rw_page+0x42/0x80 [nd_pmem]
    [] bdev_read_page+0x50/0x60
    [] do_mpage_readpage+0x510/0x770
    [] ? I_BDEV+0x20/0x20
    [] ? lru_cache_add+0x1c/0x50
    [] mpage_readpages+0x107/0x170
    [] ? I_BDEV+0x20/0x20
    [] ? I_BDEV+0x20/0x20
    [] blkdev_readpages+0x1d/0x20
    [] __do_page_cache_readahead+0x28f/0x310
    [] ? __do_page_cache_readahead+0x169/0x310
    [] ? pagecache_get_page+0x2d/0x1d0
    [] filemap_fault+0x396/0x530
    [] __do_fault+0x4e/0xf0
    [] handle_mm_fault+0x11bd/0x1b50

    Cc:
    Cc: Jens Axboe
    Cc: Alexander Viro
    Reported-by: kbuild test robot
    Acked-by: Matthew Wilcox
    [willy: symmetry fixups]
    Signed-off-by: Dan Williams

    Dan Williams
     

17 Nov, 2015

3 commits

  • While dax pmd mappings are functional in the nominal path they trigger
    kernel crashes in the following paths:

    BUG: unable to handle kernel paging request at ffffea0004098000
    IP: [] follow_trans_huge_pmd+0x117/0x3b0
    [..]
    Call Trace:
    [] follow_page_mask+0x2d3/0x380
    [] __get_user_pages+0xe8/0x6f0
    [] get_user_pages_unlocked+0x165/0x1e0
    [] get_user_pages_fast+0xa1/0x1b0

    kernel BUG at arch/x86/mm/gup.c:131!
    [..]
    Call Trace:
    [] gup_pud_range+0x1bc/0x220
    [] get_user_pages_fast+0x124/0x1b0

    BUG: unable to handle kernel paging request at ffffea0004088000
    IP: [] copy_huge_pmd+0x159/0x350
    [..]
    Call Trace:
    [] copy_page_range+0x34c/0x9f0
    [] copy_process+0x1b7f/0x1e10
    [] _do_fork+0x91/0x590

    All of these paths are interpreting a dax pmd mapping as a transparent
    huge page and making the assumption that the pfn is covered by the
    memmap, i.e. that the pfn has an associated struct page. PTE mappings
    do not suffer the same fate since they have the _PAGE_SPECIAL flag to
    cause the gup path to fault. We can do something similar for the PMD
    path, or otherwise defer pmd support for cases where a struct page is
    available. For now, 4.4-rc and -stable need to disable dax pmd support
    by default.

    For development the "depends on BROKEN" line can be removed from
    CONFIG_FS_DAX_PMD.

    Cc:
    Cc: Jan Kara
    Cc: Dave Chinner
    Cc: Matthew Wilcox
    Cc: Kirill A. Shutemov
    Reported-by: Ross Zwisler
    Signed-off-by: Dan Williams

    Dan Williams
     
  • fs/cachefiles/rdwr.c: In function ‘cachefiles_write_page’:
    fs/cachefiles/rdwr.c:882: warning: ‘ret’ may be used uninitialized in
    this function

    If the jump to label "error" is taken, "ret" will indeed be
    uninitialized, and random stack data may be printed by the debug code.

    Fixes: 102f4d900c9c8f5e ("FS-Cache: Handle a write to the page immediately beyond the EOF marker")
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: David Howells
    Signed-off-by: Al Viro

    Geert Uytterhoeven
     
  • Similar to XFS warn when mounting DAX while it is still considered under
    development. Also, aspects of the DAX implementation, for example
    synchronization against multiple faults and faults causing block
    allocation, depend on the correct implementation in the filesystem. The
    maturity of a given DAX implementation is filesystem specific.

    Cc:
    Cc: "Theodore Ts'o"
    Cc: Matthew Wilcox
    Cc: linux-ext4@vger.kernel.org
    Cc: Kirill A. Shutemov
    Reported-by: Dave Chinner
    Acked-by: Jan Kara
    Signed-off-by: Dan Williams

    Dan Williams
     

14 Nov, 2015

16 commits

  • …/olof/chrome-platform

    Pull chrome platform updates from Olof Johansson:
    "Here's the branch of chrome platform changes for v4.4. Some have been
    queued up for the full 4.3 release cycle since I forgot to send them
    in for that round (rebased early on to deal with fixes conflicts).

    Most of these enable EC communication stuff -- Pixel 2015 support,
    enabling building for ARM64 platforms, and a few fixes for memory
    leaks.

    There's also a patch in here to allow reading/writing the verified
    boot context, which depends on a sysfs patch acked by Greg"

    * tag 'chrome-platform-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform:
    platform/chrome: Fix i2c-designware adapter name
    platform/chrome: Support reading/writing the vboot context
    sysfs: Support is_visible() on binary attributes
    platform/chrome: cros_ec: Fix possible leak in led_rgb_store()
    platform/chrome: cros_ec: Fix leak in sequence_store()
    platform/chrome: Enable Chrome platforms on 64-bit ARM
    platform/chrome: cros_ec_dev - Add a platform device ID table
    platform/chrome: cros_ec_lpc - Add support for Google Pixel 2
    platform/chrome: cros_ec_lpc - Use existing function to check EC result
    platform/chrome: Make depends on MFD_CROS_EC instead CROS_EC_PROTO
    Revert "platform/chrome: Don't make CHROME_PLATFORMS depends on X86 || ARM"

    Linus Torvalds
     
  • Pull SCSI target updates from Nicholas Bellinger:
    "This series contains HCH's changes to absorb configfs attribute
    ->show() + ->store() function pointer usage from it's original
    tree-wide consumers, into common configfs code.

    It includes usb-gadget, target w/ drivers, netconsole and ocfs2
    changes to realize the improved simplicity, that now renders the
    original include/target/configfs_macros.h CPP magic for fabric drivers
    and others, unnecessary and obsolete.

    And with common code in place, new configfs attributes can be added
    easier than ever before.

    Note, there are further improvements in-flight from other folks for
    v4.5 code in configfs land, plus number of target fixes for post -rc1
    code"

    In the meantime, a new user of the now-removed old configfs API came in
    through the char/misc tree in commit 7bd1d4093c2f ("stm class: Introduce
    an abstraction for System Trace Module devices").

    This merge resolution comes from Alexander Shishkin, who updated his stm
    class tracing abstraction to account for the removal of the old
    show_attribute and store_attribute methods in commit 517982229f78
    ("configfs: remove old API") from this pull. As Alexander says about
    that patch:

    "There's no need to keep an extra wrapper structure per item and the
    awkward show_attribute/store_attribute item ops are no longer needed.

    This patch converts policy code to the new api, all the while making
    the code quite a bit smaller and easier on the eyes.

    Signed-off-by: Alexander Shishkin "

    That patch was folded into the merge so that the tree should be fully
    bisectable.

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (23 commits)
    configfs: remove old API
    ocfs2/cluster: use per-attribute show and store methods
    ocfs2/cluster: move locking into attribute store methods
    netconsole: use per-attribute show and store methods
    target: use per-attribute show and store methods
    spear13xx_pcie_gadget: use per-attribute show and store methods
    dlm: use per-attribute show and store methods
    usb-gadget/f_serial: use per-attribute show and store methods
    usb-gadget/f_phonet: use per-attribute show and store methods
    usb-gadget/f_obex: use per-attribute show and store methods
    usb-gadget/f_uac2: use per-attribute show and store methods
    usb-gadget/f_uac1: use per-attribute show and store methods
    usb-gadget/f_mass_storage: use per-attribute show and store methods
    usb-gadget/f_sourcesink: use per-attribute show and store methods
    usb-gadget/f_printer: use per-attribute show and store methods
    usb-gadget/f_midi: use per-attribute show and store methods
    usb-gadget/f_loopback: use per-attribute show and store methods
    usb-gadget/ether: use per-attribute show and store methods
    usb-gadget/f_acm: use per-attribute show and store methods
    usb-gadget/f_hid: use per-attribute show and store methods
    ...

    Linus Torvalds
     
  • Pull vfs xattr cleanups from Al Viro.

    * 'for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    f2fs: xattr simplifications
    squashfs: xattr simplifications
    9p: xattr simplifications
    xattr handlers: Pass handler to operations instead of flags
    jffs2: Add missing capability check for listing trusted xattrs
    hfsplus: Remove unused xattr handler list operations
    ubifs: Remove unused security xattr handler
    vfs: Fix the posix_acl_xattr_list return value
    vfs: Check attribute names in posix acl xattr handers

    Linus Torvalds
     
  • Pull libnvdimm fixes from Dan Williams:

    - three fixes tagged for -stable including a crash fix, simple
    performance tweak, and an invalid i/o error.

    - build regression fix for the nvdimm unit tests

    - nvdimm documentation update

    * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
    dax: fix __dax_pmd_fault crash
    libnvdimm: documentation clarifications
    libnvdimm, pmem: fix size trim in pmem_direct_access()
    libnvdimm, e820: fix numa node for e820-type-12 pmem ranges
    tools/testing/nvdimm, acpica: fix flag rename build breakage

    Linus Torvalds
     
  • Now that the xattr handler is passed to the xattr handler operations, we
    have access to the attribute name prefix, so simplify
    f2fs_xattr_generic_list.

    Also, f2fs_xattr_advise_list is only ever called for
    f2fs_xattr_advise_handler; there is no need to double check for that.

    Signed-off-by: Andreas Gruenbacher
    Cc: Jaegeuk Kim
    Cc: Changman Lee
    Cc: Chao Yu
    Cc: linux-f2fs-devel@lists.sourceforge.net
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • Now that the xattr handler is passed to the xattr handler operations, we
    have access to the attribute name prefix, so simplify the squashfs xattr
    handlers a bit.

    Signed-off-by: Andreas Gruenbacher
    Cc: Phillip Lougher
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • Now that the xattr handler is passed to the xattr handler operations, we
    can use the same get and set operations for the user, trusted, and security
    xattr namespaces. In those namespaces, we can access the full attribute
    name by "reattaching" the name prefix the vfs has skipped for us. Add a
    xattr_full_name helper to make this obvious in the code.

    For the "system.posix_acl_access" and "system.posix_acl_default"
    attributes, handler->prefix is the full attribute name; the suffix is the
    empty string.

    Signed-off-by: Andreas Gruenbacher
    Cc: Eric Van Hensbergen
    Cc: Ron Minnich
    Cc: Latchesar Ionkov
    Cc: v9fs-developer@lists.sourceforge.net
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • The xattr_handler operations are currently all passed a file system
    specific flags value which the operations can use to disambiguate between
    different handlers; some file systems use that to distinguish the xattr
    namespace, for example. In some oprations, it would be useful to also have
    access to the handler prefix. To allow that, pass a pointer to the handler
    to operations instead of the flags value alone.

    Signed-off-by: Andreas Gruenbacher
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • The vfs checks if a task has the appropriate access for get and set
    operations, but it cannot do that for the list operation; the file system
    must check for that itself.

    Signed-off-by: Andreas Gruenbacher
    Reviewed-by: Christoph Hellwig
    Cc: David Woodhouse
    Cc: linux-mtd@lists.infradead.org
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • The list operations can never be called; they are even documented to be
    unused.

    Signed-off-by: Andreas Gruenbacher
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • Ubifs installs a security xattr handler in sb->s_xattr but doesn't use the
    generic_{get,set,list,remove}xattr inode operations needed for processing
    this list of attribute handlers; the handler is never called. Instead,
    ubifs uses its own xattr handlers which also process security xattrs.

    Remove the dead code.

    Signed-off-by: Andreas Gruenbacher
    Reviewed-by: Richard Weinberger
    Cc: Artem Bityutskiy
    Cc: Adrian Hunter
    Cc: linux-mtd@lists.infradead.org
    Cc: Subodh Nijsure
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • When a filesystem that contains POSIX ACLs is mounted without ACL support
    (-o noacl), the appropriate behavior is not to list any existing POSIX ACL
    xattrs. The return value for list xattr handlers in this case is 0, not an
    error code: several filesystems that use the POSIX ACL xattr handlers do
    not expect the list operation to fail.

    Symlinks cannot have ACLs, so posix_acl_xattr_list will never be called for
    symlinks in the first place.

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • The get and set operations of the POSIX ACL xattr handlers failed to check
    the attribute names, so all names with "system.posix_acl_access" or
    "system.posix_acl_default" as a prefix were accepted. Reject invalid names
    from now on.

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Al Viro

    Andreas Gruenbacher
     
  • Pull SMB3 updates from Steve French:
    "A collection of SMB3 patches adding some reliability features
    (persistent and resilient handles) and improving SMB3 copy offload.

    I will have some additional patches for SMB3 encryption and SMB3.1.1
    signing (important security features), and also for improving SMB3
    persistent handle reconnection (setting ChannelSequence number e.g.)
    that I am still working on but wanted to get this set in since they
    can stand alone"

    * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
    Allow copy offload (CopyChunk) across shares
    Add resilienthandles mount parm
    [SMB3] Send durable handle v2 contexts when use of persistent handles required
    [SMB3] Display persistenthandles in /proc/mounts for SMB3 shares if enabled
    [SMB3] Enable checking for continuous availability and persistent handle support
    [SMB3] Add parsing for new mount option controlling persistent handles
    Allow duplicate extents in SMB3 not just SMB3.1.1

    Linus Torvalds
     
  • Pull btrfs fixes and cleanups from Chris Mason:
    "Some of this got cherry-picked from a github repo this week, but I
    verified the patches.

    We have three small scrub cleanups and a collection of fixes"

    * 'for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    btrfs: Use fs_info directly in btrfs_delete_unused_bgs
    btrfs: Fix lost-data-profile caused by balance bg
    btrfs: Fix lost-data-profile caused by auto removing bg
    btrfs: Remove len argument from scrub_find_csum
    btrfs: Reduce unnecessary arguments in scrub_recheck_block
    btrfs: Use scrub_checksum_data and scrub_checksum_tree_block for scrub_recheck_block_checksum
    btrfs: Reset sblock->xxx_error stats before calling scrub_recheck_block_checksum
    btrfs: scrub: setup all fields for sblock_to_check
    btrfs: scrub: set error stats when tree block spanning stripes
    Btrfs: fix race when listing an inode's xattrs
    Btrfs: fix race leading to BUG_ON when running delalloc for nodatacow
    Btrfs: fix race leading to incorrect item deletion when dropping extents
    Btrfs: fix sleeping inside atomic context in qgroup rescan worker
    Btrfs: fix race waiting for qgroup rescan worker
    btrfs: qgroup: exit the rescan worker during umount
    Btrfs: fix extent accounting for partial direct IO writes

    Linus Torvalds
     
  • Pull Ceph updates from Sage Weil:
    "There are several patches from Ilya fixing RBD allocation lifecycle
    issues, a series adding a nocephx_sign_messages option (and associated
    bug fixes/cleanups), several patches from Zheng improving the
    (directory) fsync behavior, a big improvement in IO for direct-io
    requests when striping is enabled from Caifeng, and several other
    small fixes and cleanups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
    libceph: clear msg->con in ceph_msg_release() only
    libceph: add nocephx_sign_messages option
    libceph: stop duplicating client fields in messenger
    libceph: drop authorizer check from cephx msg signing routines
    libceph: msg signing callouts don't need con argument
    libceph: evaluate osd_req_op_data() arguments only once
    ceph: make fsync() wait unsafe requests that created/modified inode
    ceph: add request to i_unsafe_dirops when getting unsafe reply
    libceph: introduce ceph_x_authorizer_cleanup()
    ceph: don't invalidate page cache when inode is no longer used
    rbd: remove duplicate calls to rbd_dev_mapping_clear()
    rbd: set device_type::release instead of device::release
    rbd: don't free rbd_dev outside of the release callback
    rbd: return -ENOMEM instead of pool id if rbd_dev_create() fails
    libceph: use local variable cursor instead of &msg->cursor
    libceph: remove con argument in handle_reply()
    ceph: combine as many iovec as possile into one OSD request
    ceph: fix message length computation
    ceph: fix a comment typo
    rbd: drop null test before destroy functions

    Linus Torvalds
     

13 Nov, 2015

2 commits

  • Since 4.3 introduced devm_memremap_pages() the pfns handled by DAX may
    optionally have a struct page backing. When a mapped pfn reaches
    vmf_insert_pfn_pmd() it fails with a crash signature like the following:

    kernel BUG at mm/huge_memory.c:905!
    [..]
    Call Trace:
    [] __dax_pmd_fault+0x2ea/0x5b0
    [] xfs_filemap_pmd_fault+0x92/0x150 [xfs]
    [] handle_mm_fault+0x312/0x1b50

    Fix this by falling back to 4K mappings in the pfn_valid() case. Longer
    term, vmf_insert_pfn_pmd() needs to grow support for architectures that
    can provide a 'pmd_special' capability.

    Cc:
    Cc: Andrew Morton
    Reported-by: Ross Zwisler
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Pull misc block fixes from Jens Axboe:
    "Stuff that got collected after the merge window opened. This
    contains:

    - NVMe:
    - Fix for non-striped transfer size setting for NVMe from
    Sathyavathi.
    - (Some) support for the weird Apple nvme controller in the
    macbooks. From Stephan Günther.

    - The error value leak for dax from Al.

    - A few minor blk-mq tweaks from me.

    - Add the new linux-block@vger.kernel.org mailing list to the
    MAINTAINERS file.

    - Discard fix for brd, from Jan.

    - A kerneldoc warning for block core from Randy.

    - An older fix from Vivek, converting a WARN_ON() to a rate limited
    printk when a device is hot removed with dirty inodes"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    block: don't hardcode blk_qc_t -> tag mask
    dax_io(): don't let non-error value escape via retval instead of EFAULT
    block: fix blk-core.c kernel-doc warning
    fs/block_dev.c: Remove WARN_ON() when inode writeback fails
    NVMe: add support for Apple NVMe controller
    NVMe: use split lo_hi_{read,write}q
    blk-mq: mark __blk_mq_complete_request() static
    MAINTAINERS: add reference to new linux-block list
    NVMe: Increase the max transfer size when mdts is 0
    brd: Refuse improperly aligned discard requests

    Linus Torvalds
     

12 Nov, 2015

5 commits

  • Pull xfs updates from Dave Chinner:
    "There is nothing really major here - the only significant addition is
    the per-mount operation statistics infrastructure. Otherwises there's
    various ACL, xattr, DAX, AIO and logging fixes, and a smattering of
    small cleanups and fixes elsewhere.

    Summary:

    - per-mount operational statistics in sysfs
    - fixes for concurrent aio append write submission
    - various logging fixes
    - detection of zeroed logs and invalid log sequence numbers on v5 filesystems
    - memory allocation failure message improvements
    - a bunch of xattr/ACL fixes
    - fdatasync optimisation
    - miscellaneous other fixes and cleanups"

    * tag 'xfs-for-linus-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (39 commits)
    xfs: give all workqueues rescuer threads
    xfs: fix log recovery op header validation assert
    xfs: Fix error path in xfs_get_acl
    xfs: optimise away log forces on timestamp updates for fdatasync
    xfs: don't leak uuid table on rmmod
    xfs: invalidate cached acl if set via ioctl
    xfs: Plug memory leak in xfs_attrmulti_attr_set
    xfs: Validate the length of on-disk ACLs
    xfs: invalidate cached acl if set directly via xattr
    xfs: xfs_filemap_pmd_fault treats read faults as write faults
    xfs: add ->pfn_mkwrite support for DAX
    xfs: DAX does not use IO completion callbacks
    xfs: Don't use unwritten extents for DAX
    xfs: introduce BMAPI_ZERO for allocating zeroed extents
    xfs: fix inode size update overflow in xfs_map_direct()
    xfs: clear PF_NOFREEZE for xfsaild kthread
    xfs: fix an error code in xfs_fs_fill_super()
    xfs: stats are no longer dependent on CONFIG_PROC_FS
    xfs: simplify /proc teardown & error handling
    xfs: per-filesystem stats counter implementation
    ...

    Linus Torvalds
     
  • Pull nfsd updates from Bruce Fields:
    "Apologies for coming a little late in the merge window. Fortunately
    this is another fairly quiet one:

    Mainly smaller bugfixes and cleanup. We're still finding some bugs
    from the breakup of the big NFSv4 state lock in 3.17 -- thanks
    especially to Andrew Elble and Jeff Layton for tracking down some of
    the remaining races"

    * tag 'nfsd-4.4' of git://linux-nfs.org/~bfields/linux:
    svcrpc: document lack of some memory barriers
    nfsd: fix race with open / open upgrade stateids
    nfsd: eliminate sending duplicate and repeated delegations
    nfsd: remove recurring workqueue job to clean DRC
    SUNRPC: drop stale comment in svc_setup_socket()
    nfsd: ensure that seqid morphing operations are atomic wrt to copies
    nfsd: serialize layout stateid morphing operations
    nfsd: improve client_has_state to check for unused openowners
    nfsd: fix clid_inuse on mount with security change
    sunrpc/cache: make cache flushing more reliable.
    nfsd: move include of state.h from trace.c to trace.h
    sunrpc: avoid warning in gss_key_timeout
    lockd: get rid of reference-counted NSM RPC clients
    SUNRPC: Use MSG_SENDPAGE_NOTLAST when calling sendpage()
    lockd: create NSM handles per net namespace
    nfsd: switch unsigned char flags in svc_fh to bools
    nfsd: move svc_fh->fh_maxsize to just after fh_handle
    nfsd: drop null test before destroy functions
    nfsd: serialize state seqid morphing operations

    Linus Torvalds
     
  • Pull vfs update from Al Viro:

    - misc stable fixes

    - trivial kernel-doc and comment fixups

    - remove never-used block_page_mkwrite() wrapper function, and rename
    the function that is _actually_ used to not have double underscores.

    * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    fs: 9p: cache.h: Add #define of include guard
    vfs: remove stale comment in inode_operations
    vfs: remove unused wrapper block_page_mkwrite()
    binfmt_elf: Correct `arch_check_elf's description
    fs: fix writeback.c kernel-doc warnings
    fs: fix inode.c kernel-doc warning
    fs/pipe.c: return error code rather than 0 in pipe_write()
    fs/pipe.c: preserve alloc_file() error code
    binfmt_elf: Don't clobber passed executable's file header
    FS-Cache: Handle a write to the page immediately beyond the EOF marker
    cachefiles: perform test on s_blocksize when opening cache file.
    FS-Cache: Don't override netfs's primary_index if registering failed
    FS-Cache: Increase reference of parent after registering, netfs success
    debugfs: fix refcount imbalance in start_creating

    Linus Torvalds
     
  • Signed-off-by: Al Viro
    Reported-by: Sasha Levin
    Cc: stable@vger.kernel.org # 4.0+
    Signed-off-by: Jens Axboe

    Al Viro
     
  • If a block device is hot removed and later last reference to device
    is put, we try to writeback the dirty inode. But device is gone and
    that writeback fails.

    Currently we do a WARN_ON() which does not seem to be the right thing.
    Convert it to a ratelimited kernel warning.

    Reported-by: Andi Kleen
    Signed-off-by: Vivek Goyal
    Acked-by: Tejun Heo
    [jmoyer@redhat.com: get rid of unnecessary name initialization, 80 cols]
    Signed-off-by: Jeff Moyer
    Signed-off-by: Jens Axboe

    Vivek Goyal
     

11 Nov, 2015

6 commits

  • The include file was intended to have an include guard, but the #define
    part is missing.

    Signed-off-by: Tzvetelin Katchov
    Signed-off-by: Al Viro

    Tzvetelin Katchov
     
  • The function currently called "__block_page_mkwrite()" used to be called
    "block_page_mkwrite()" until a wrapper for this function was added by:

    commit 24da4fab5a61 ("vfs: Create __block_page_mkwrite() helper passing
    error values back")

    This wrapper, the current "block_page_mkwrite()", is currently unused.
    __block_page_mkwrite() is used directly by ext4, nilfs2 and xfs.

    Remove the unused wrapper, rename __block_page_mkwrite() back to
    block_page_mkwrite() and update the comment above block_page_mkwrite().

    Signed-off-by: Ross Zwisler
    Reviewed-by: Jan Kara
    Cc: Jan Kara
    Cc: Christoph Hellwig
    Cc: Al Viro
    Signed-off-by: Al Viro

    Ross Zwisler
     
  • Correct `arch_check_elf's description, mistakenly copied and pasted from
    `arch_elf_pt_proc'.

    Signed-off-by: Maciej W. Rozycki
    Signed-off-by: Al Viro

    Maciej W. Rozycki
     
  • Fix kernel-doc warnings in fs/fs-writeback.c by moving a #define macro
    to after the function's opening brace. Also #undef this macro at the
    end of the function.

    ..//fs/fs-writeback.c:1984: warning: Excess function parameter 'inode' description in 'I_DIRTY_INODE'
    ..//fs/fs-writeback.c:1984: warning: Excess function parameter 'flags' description in 'I_DIRTY_INODE'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Al Viro

    Randy Dunlap
     
  • Fix kernel-doc warning in fs/inode.c:

    ..//fs/inode.c:1606: warning: No description found for parameter 'inode'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Al Viro

    Randy Dunlap
     
  • pipe_write() would return 0 if it failed to merge the beginning of the
    data to write with the last, partially filled pipe buffer. It should
    return an error code instead. Userspace programs could be confused by
    write() returning 0 when called with a nonzero 'count'.

    The EFAULT error case was a regression from f0d1bec9d5 ("new helper:
    copy_page_from_iter()"), while the ops->confirm() error case was a much
    older bug.

    Test program:

    #include
    #include
    #include

    int main(void)
    {
    int fd[2];
    char data[1] = {0};

    assert(0 == pipe(fd));
    assert(1 == write(fd[1], data, 1));

    /* prior to this patch, write() returned 0 here */
    assert(-1 == write(fd[1], NULL, 1));
    assert(errno == EFAULT);
    }

    Cc: stable@vger.kernel.org # at least v3.15+
    Signed-off-by: Eric Biggers
    Signed-off-by: Al Viro

    Eric Biggers