08 May, 2018

1 commit


04 May, 2018

2 commits

  • Overlapping changes in selftests Makefile.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Remove all eBPF tests involving LD_ABS/LD_IND from test_bpf.ko. Reason
    is that the eBPF tests from test_bpf module do not go via BPF verifier
    and therefore any instruction rewrites from verifier cannot take place.

    Therefore, move them into test_verifier which runs out of user space,
    so that verfier can rewrite LD_ABS/LD_IND internally in upcoming patches.
    It will have the same effect since runtime tests are also performed from
    there. This also allows to finally unexport bpf_skb_vlan_{push,pop}_proto
    and keep it internal to core kernel.

    Additionally, also add further cBPF LD_ABS/LD_IND test coverage into
    test_bpf.ko suite.

    Signed-off-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: Alexei Starovoitov

    Daniel Borkmann
     

02 May, 2018

1 commit

  • The result was printing the warning only when we were explicitly asked
    not to.

    Cc: stable@vger.kernel.org
    Fixes: 0176adb004065d6815a8e67946752df4cd947c5b "swiotlb: refactor
    coherent buffer allocation"
    Signed-off-by: Michel Dänzer
    Reviewed-by: Christian König .
    Signed-off-by: Christoph Hellwig

    Michel Dänzer
     

01 May, 2018

3 commits

  • commit 07e98962fa77 ("kobject: Send hotplug events in all network namespaces")

    enabled sending hotplug events into all network namespaces back in 2010.
    Over time the set of uevents that get sent into all network namespaces has
    shrunk. We have now reached the point where hotplug events for all devices
    that carry a namespace tag are filtered according to that namespace.
    Specifically, they are filtered whenever the namespace tag of the kobject
    does not match the namespace tag of the netlink socket.
    Currently, only network devices carry namespace tags (i.e. network
    namespace tags). Hence, uevents for network devices only show up in the
    network namespace such devices are created in or moved to.

    However, any uevent for a kobject that does not have a namespace tag
    associated with it will not be filtered and we will broadcast it into all
    network namespaces. This behavior stopped making sense when user namespaces
    were introduced.

    This patch simplifies and fixes couple of things:
    - Split codepath for sending uevents by kobject namespace tags:
    1. Untagged kobjects - uevent_net_broadcast_untagged():
    Untagged kobjects will be broadcast into all uevent sockets recorded
    in uevent_sock_list, i.e. into all network namespacs owned by the
    intial user namespace.
    2. Tagged kobjects - uevent_net_broadcast_tagged():
    Tagged kobjects will only be broadcast into the network namespace they
    were tagged with.
    Handling of tagged kobjects in 2. does not cause any semantic changes.
    This is just splitting out the filtering logic that was handled by
    kobj_bcast_filter() before.
    Handling of untagged kobjects in 1. will cause a semantic change. The
    reasons why this is needed and ok have been discussed in [1]. Here is a
    short summary:
    - Userspace ignores uevents from network namespaces that are not owned by
    the intial user namespace:
    Uevents are filtered by userspace in a user namespace because the
    received uid != 0. Instead the uid associated with the event will be
    65534 == "nobody" because the global root uid is not mapped.
    This means we can safely and without introducing regressions modify the
    kernel to not send uevents into all network namespaces whose owning
    user namespace is not the initial user namespace because we know that
    userspace will ignore the message because of the uid anyway.
    I have a) verified that is is true for every udev implementation out
    there b) that this behavior has been present in all udev
    implementations from the very beginning.
    - Thundering herd:
    Broadcasting uevents into all network namespaces introduces significant
    overhead.
    All processes that listen to uevents running in non-initial user
    namespaces will end up responding to uevents that will be meaningless
    to them. Mainly, because non-initial user namespaces cannot easily
    manage devices unless they have a privileged host-process helping them
    out. This means that there will be a thundering herd of activity when
    there shouldn't be any.
    - Removing needless overhead/Increasing performance:
    Currently, the uevent socket for each network namespace is added to the
    global variable uevent_sock_list. The list itself needs to be protected
    by a mutex. So everytime a uevent is generated the mutex is taken on
    the list. The mutex is held *from the creation of the uevent (memory
    allocation, string creation etc. until all uevent sockets have been
    handled*. This is aggravated by the fact that for each uevent socket
    that has listeners the mc_list must be walked as well which means we're
    talking O(n^2) here. Given that a standard Linux workload usually has
    quite a lot of network namespaces and - in the face of containers - a
    lot of user namespaces this quickly becomes a performance problem (see
    "Thundering herd" above). By just recording uevent sockets of network
    namespaces that are owned by the initial user namespace we
    significantly increase performance in this codepath.
    - Injecting uevents:
    There's a valid argument that containers might be interested in
    receiving device events especially if they are delegated to them by a
    privileged userspace process. One prime example are SR-IOV enabled
    devices that are explicitly designed to be handed of to other users
    such as VMs or containers.
    This use-case can now be correctly handled since
    commit 692ec06d7c92 ("netns: send uevent messages"). This commit
    introduced the ability to send uevents from userspace. As such we can
    let a sufficiently privileged (CAP_SYS_ADMIN in the owning user
    namespace of the network namespace of the netlink socket) userspace
    process make a decision what uevents should be sent. This removes the
    need to blindly broadcast uevents into all user namespaces and provides
    a performant and safe solution to this problem.
    - Filtering logic:
    This patch filters by *owning user namespace of the network namespace a
    given task resides in* and not by user namespace of the task per se.
    This means if the user namespace of a given task is unshared but the
    network namespace is kept and is owned by the initial user namespace a
    listener that is opening the uevent socket in that network namespace
    can still listen to uevents.
    - Fix permission for tagged kobjects:
    Network devices that are created or moved into a network namespace that
    is owned by a non-initial user namespace currently are send with
    INVALID_{G,U}ID in their credentials. This means that all current udev
    implementations in userspace will ignore the uevent they receive for
    them. This has lead to weird bugs whereby new devices showing up in such
    network namespaces were not recognized and did not get IPs assigned etc.
    This patch adjusts the permission to the appropriate {g,u}id in the
    respective user namespace. This way udevd is able to correctly handle
    such devices.
    - Simplify filtering logic:
    do_one_broadcast() already ensures that only listeners in mc_list receive
    uevents that have the same network namespace as the uevent socket itself.
    So the filtering logic in kobj_bcast_filter is not needed (see [3]). This
    patch therefore removes kobj_bcast_filter() and replaces
    netlink_broadcast_filtered() with the simpler netlink_broadcast()
    everywhere.

    [1]: https://lkml.org/lkml/2018/4/4/739
    [2]: https://lkml.org/lkml/2018/4/26/767
    [3]: https://lkml.org/lkml/2018/4/26/738
    Signed-off-by: Christian Brauner
    Signed-off-by: David S. Miller

    Christian Brauner
     
  • This patch adds alloc_uevent_skb() in preparation for follow up patches.

    Signed-off-by: Christian Brauner
    Signed-off-by: David S. Miller

    Christian Brauner
     
  • Pull errseq infrastructure fix from Jeff Layton:
    "The PostgreSQL developers recently had a spirited discussion about the
    writeback error handling in Linux, and reached out to us about a
    behavoir change to the code that bit them when the errseq_t changes
    were merged.

    When we changed to using errseq_t for tracking writeback errors, we
    lost the ability for an application to see a writeback error that
    occurred before the open on which the fsync was issued. This was
    problematic for PostgreSQL which offloads fsync calls to a completely
    separate process from the DB writers.

    This patch restores that ability. If the errseq_t value in the inode
    does not have the SEEN flag set, then we just return 0 for the sample.
    That ensures that any recorded error is always delivered at least
    once.

    Note that we might still lose the error if the inode gets evicted from
    the cache before anything can reopen it, but that was the case before
    errseq_t was merged. At LSF/MM we had some discussion about keeping
    inodes with unreported writeback errors around in the cache for longer
    (possibly indefinitely), but that's really a separate problem"

    * tag 'errseq-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
    errseq: Always report a writeback error once

    Linus Torvalds
     

28 Apr, 2018

1 commit

  • Pull driver core fixes from Greg Kroah-Hartman:
    "Here are some small driver core and firmware fixes for 4.17-rc3

    There's a kobject WARN() removal to make syzkaller a lot happier about
    some "normal" error paths that it keeps hitting, which should reduce
    the number of false-positives we have been getting recently.

    There's also some fimware test and documentation fixes, and the
    coredump() function signature change that needed to happen after -rc1
    before drivers started to take advantage of it.

    All of these have been in linux-next with no reported issues"

    * tag 'driver-core-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    firmware: some documentation fixes
    selftests:firmware: fixes a call to a wrong function name
    kobject: don't use WARN for registration failures
    firmware: Fix firmware documentation for recent file renames
    test_firmware: fix setting old custom fw path back on exit, second try
    test_firmware: Install all scripts
    drivers: change struct device_driver::coredump() return type to void

    Linus Torvalds
     

27 Apr, 2018

1 commit

  • The errseq_t infrastructure assumes that errors which occurred before
    the file descriptor was opened are of no interest to the application.
    This turns out to be a regression for some applications, notably Postgres.

    Before errseq_t, a writeback error would be reported exactly once (as
    long as the inode remained in memory), so Postgres could open a file,
    call fsync() and find out whether there had been a writeback error on
    that file from another process.

    This patch changes the errseq infrastructure to report errors to all
    file descriptors which are opened after the error occurred, but before
    it was reported to any file descriptor. This restores the user-visible
    behaviour.

    Cc: stable@vger.kernel.org
    Fixes: 5660e13d2fd6 ("fs: new infrastructure for writeback error handling and reporting")
    Signed-off-by: Matthew Wilcox
    Reviewed-by: Jeff Layton
    Signed-off-by: Jeff Layton

    Matthew Wilcox
     

25 Apr, 2018

3 commits

  • When a walk of an rhashtable is interrupted with rhastable_walk_stop()
    and then rhashtable_walk_start(), the location to restart from is based
    on a 'skip' count in the current hash chain, and this can be incorrect
    if insertions or deletions have happened. This does not happen when
    the walk is not stopped and started as iter->p is a placeholder which
    is safe to use while holding the RCU read lock.

    In rhashtable_walk_start() we can revalidate that 'p' is still in the
    same hash chain. If it isn't then the current method is still used.

    With this patch, if a rhashtable walker ensures that the current
    object remains in the table over a stop/start period (possibly by
    elevating the reference count if that is sufficient), it can be sure
    that a walk will not miss objects that were in the hashtable for the
    whole time of the walk.

    rhashtable_walk_start() may not find the object even though it is
    still in the hashtable if a rehash has moved it to a new table. In
    this case it will (eventually) get -EAGAIN and will need to proceed
    through the whole table again to be sure to see everything at least
    once.

    Acked-by: Herbert Xu
    Signed-off-by: NeilBrown
    Signed-off-by: David S. Miller

    NeilBrown
     
  • The documentation claims that when rhashtable_walk_start_check()
    detects a resize event, it will rewind back to the beginning
    of the table. This is not true. We need to set ->slot and
    ->skip to be zero for it to be true.

    Acked-by: Herbert Xu
    Signed-off-by: NeilBrown
    Signed-off-by: David S. Miller

    NeilBrown
     
  • Neither rhashtable_walk_enter() or rhltable_walk_enter() sleep, though
    they do take a spinlock without irq protection.
    So revise the comments to accurately state the contexts in which
    these functions can be called.

    Acked-by: Herbert Xu
    Signed-off-by: NeilBrown
    Signed-off-by: David S. Miller

    NeilBrown
     

23 Apr, 2018

2 commits

  • When an allocation with lower dma_coherent mask fails, dma_direct_alloc()
    retries the allocation with GFP_DMA. But, this is useless for
    architectures that hav no ZONE_DMA.

    Fix it by adding the check of CONFIG_ZONE_DMA before retrying the
    allocation.

    Fixes: 95f183916d4b ("dma-direct: retry allocations using GFP_DMA for small masks")
    Signed-off-by: Takashi Iwai
    Signed-off-by: Christoph Hellwig

    Takashi Iwai
     
  • This WARNING proved to be noisy. The function still returns an error
    and callers should handle it. That's how most of kernel code works.
    Downgrade the WARNING to pr_err() and leave WARNINGs for kernel bugs.

    Signed-off-by: Dmitry Vyukov
    Reported-by: syzbot+209c0f67f99fec8eb14b@syzkaller.appspotmail.com
    Reported-by: syzbot+7fb6d9525a4528104e05@syzkaller.appspotmail.com
    Reported-by: syzbot+2e63711063e2d8f9ea27@syzkaller.appspotmail.com
    Reported-by: syzbot+de73361ee4971b6e6f75@syzkaller.appspotmail.com
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Vyukov
     

21 Apr, 2018

1 commit

  • Pull networking fixes from David Miller:

    1) Unbalanced refcounting in TIPC, from Jon Maloy.

    2) Only allow TCP_MD5SIG to be set on sockets in close or listen state.
    Once the connection is established it makes no sense to change this.
    From Eric Dumazet.

    3) Missing attribute validation in neigh_dump_table(), also from Eric
    Dumazet.

    4) Fix address comparisons in SCTP, from Xin Long.

    5) Neigh proxy table clearing can deadlock, from Wolfgang Bumiller.

    6) Fix tunnel refcounting in l2tp, from Guillaume Nault.

    7) Fix double list insert in team driver, from Paolo Abeni.

    8) af_vsock.ko module was accidently made unremovable, from Stefan
    Hajnoczi.

    9) Fix reference to freed llc_sap object in llc stack, from Cong Wang.

    10) Don't assume netdevice struct is DMA'able memory in virtio_net
    driver, from Michael S. Tsirkin.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (62 commits)
    net/smc: fix shutdown in state SMC_LISTEN
    bnxt_en: Fix memory fault in bnxt_ethtool_init()
    virtio_net: sparse annotation fix
    virtio_net: fix adding vids on big-endian
    virtio_net: split out ctrl buffer
    net: hns: Avoid action name truncation
    docs: ip-sysctl.txt: fix name of some ipv6 variables
    vmxnet3: fix incorrect dereference when rxvlan is disabled
    llc: hold llc_sap before release_sock()
    MAINTAINERS: Direct networking documentation changes to netdev
    atm: iphase: fix spelling mistake: "Tansmit" -> "Transmit"
    net: qmi_wwan: add Wistron Neweb D19Q1
    net: caif: fix spelling mistake "UKNOWN" -> "UNKNOWN"
    net: stmmac: Disable ACS Feature for GMAC >= 4
    net: mvpp2: Fix DMA address mask size
    net: change the comment of dev_mc_init
    net: qualcomm: rmnet: Fix warning seen with fill_info
    tun: fix vlan packet truncation
    tipc: fix infinite loop when dumping link monitor summary
    tipc: fix use-after-free in tipc_nametbl_stop
    ...

    Linus Torvalds
     

17 Apr, 2018

1 commit

  • Make lib/textsearch.c usable as kernel-doc.
    Add textsearch() function family to kernel-api documentation.
    Fix kernel-doc warnings in :
    ../include/linux/textsearch.h:65: warning: Incorrect use of kernel-doc format:
    * get_next_block - fetch next block of data
    ../include/linux/textsearch.h:82: warning: Incorrect use of kernel-doc format:
    * finish - finalize/clean a series of get_next_block() calls

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     

16 Apr, 2018

1 commit

  • Pull x86 fixes from Thomas Gleixner:
    "A set of fixes and updates for x86:

    - Address a swiotlb regression which was caused by the recent DMA
    rework and made driver fail because dma_direct_supported() returned
    false

    - Fix a signedness bug in the APIC ID validation which caused invalid
    APIC IDs to be detected as valid thereby bloating the CPU possible
    space.

    - Fix inconsisten config dependcy/select magic for the MFD_CS5535
    driver.

    - Fix a corruption of the physical address space bits when encryption
    has reduced the address space and late cpuinfo updates overwrite
    the reduced bit information with the original value.

    - Dominiks syscall rework which consolidates the architecture
    specific syscall functions so all syscalls can be wrapped with the
    same macros. This allows to switch x86/64 to struct pt_regs based
    syscalls. Extend the clearing of user space controlled registers in
    the entry patch to the lower registers"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/apic: Fix signedness bug in APIC ID validity checks
    x86/cpu: Prevent cpuinfo_x86::x86_phys_bits adjustment corruption
    x86/olpc: Fix inconsistent MFD_CS5535 configuration
    swiotlb: Use dma_direct_supported() for swiotlb_ops
    syscalls/x86: Adapt syscall_wrapper.h to the new syscall stub naming convention
    syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*()
    syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention
    syscalls/core, syscalls/x86: Clean up syscall stub naming convention
    syscalls/x86: Extend register clearing on syscall entry to lower registers
    syscalls/x86: Unconditionally enable 'struct pt_regs' based syscalls on x86_64
    syscalls/x86: Use 'struct pt_regs' based syscall calling for IA32_EMULATION and x32
    syscalls/core: Prepare CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y for compat syscalls
    syscalls/x86: Use 'struct pt_regs' based syscall calling convention for 64-bit syscalls
    syscalls/core: Introduce CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y
    x86/syscalls: Don't pointlessly reload the system call number
    x86/mm: Fix documentation of module mapping range with 4-level paging
    x86/cpuid: Switch to 'static const' specifier

    Linus Torvalds
     

14 Apr, 2018

1 commit

  • The code to verify the new kernels sha digest is applicable for all
    architectures. Move it to common code.

    One problem is the string.c implementation on x86. Currently sha256
    includes x86/boot/string.h which defines memcpy and memset to be gcc
    builtins. By moving the sha256 implementation to common code and
    changing the include to linux/string.h both functions are no longer
    defined. Thus definitions have to be provided in x86/purgatory/string.c

    Link: http://lkml.kernel.org/r/20180321112751.22196-12-prudo@linux.vnet.ibm.com
    Signed-off-by: Philipp Rudo
    Acked-by: Dave Young
    Cc: AKASHI Takahiro
    Cc: Eric Biederman
    Cc: Heiko Carstens
    Cc: Ingo Molnar
    Cc: Martin Schwidefsky
    Cc: Michael Ellerman
    Cc: Thiago Jung Bauermann
    Cc: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Philipp Rudo
     

13 Apr, 2018

3 commits

  • Pull more gfs2 updates from Bob Peterson:
    "We decided to request the latest three patches to be merged into this
    merge window while it's still open.

    - The first patch adds a new function to lockref:
    lockref_put_not_zero

    - The second patch fixes GFS2's glock dump code so it uses the new
    lockref function. This fixes a problem whereby lock dumps could
    miss glocks.

    - I made a minor patch to update some comments and fix the lock
    ordering text in our gfs2-glocks.txt Documentation file"

    * tag 'gfs2-4.17.fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
    GFS2: Minor improvements to comments and documentation
    gfs2: Stop using rhashtable_walk_peek
    lockref: Add lockref_put_not_zero

    Linus Torvalds
     
  • Pull dma-mapping fix from Christoph Hellwig:
    "Fix for one swiotlb regression in 2.16 from Takashi"

    * tag 'dma-mapping-4.17-2' of git://git.infradead.org/users/hch/dma-mapping:
    swiotlb: fix unexpected swiotlb_alloc_coherent failures

    Linus Torvalds
     
  • Put a lockref unless the lockref is dead or its count would become zero.
    This is the same as lockref_put_or_lock except that the lock is never
    left held.

    Signed-off-by: Andreas Gruenbacher
    Signed-off-by: Bob Peterson

    Andreas Gruenbacher
     

12 Apr, 2018

10 commits

  • Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Patch series "XArray", v9. (First part thereof).

    This patchset is, I believe, appropriate for merging for 4.17. It
    contains the XArray implementation, to eventually replace the radix
    tree, and converts the page cache to use it.

    This conversion keeps the radix tree and XArray data structures in sync
    at all times. That allows us to convert the page cache one function at
    a time and should allow for easier bisection. Other than renaming some
    elements of the structures, the data structures are fundamentally
    unchanged; a radix tree walk and an XArray walk will touch the same
    number of cachelines. I have changes planned to the XArray data
    structure, but those will happen in future patches.

    Improvements the XArray has over the radix tree:

    - The radix tree provides operations like other trees do; 'insert' and
    'delete'. But what most users really want is an automatically
    resizing array, and so it makes more sense to give users an API that
    is like an array -- 'load' and 'store'. We still have an 'insert'
    operation for users that really want that semantic.

    - The XArray considers locking as part of its API. This simplifies a
    lot of users who formerly had to manage their own locking just for
    the radix tree. It also improves code generation as we can now tell
    RCU that we're holding a lock and it doesn't need to generate as much
    fencing code. The other advantage is that tree nodes can be moved
    (not yet implemented).

    - GFP flags are now parameters to calls which may need to allocate
    memory. The radix tree forced users to decide what the allocation
    flags would be at creation time. It's much clearer to specify them at
    allocation time.

    - Memory is not preloaded; we don't tie up dozens of pages on the off
    chance that the slab allocator fails. Instead, we drop the lock,
    allocate a new node and retry the operation. We have to convert all
    the radix tree, IDA and IDR preload users before we can realise this
    benefit, but I have not yet found a user which cannot be converted.

    - The XArray provides a cmpxchg operation. The radix tree forces users
    to roll their own (and at least four have).

    - Iterators take a 'max' parameter. That simplifies many users and will
    reduce the amount of iteration done.

    - Iteration can proceed backwards. We only have one user for this, but
    since it's called as part of the pagefault readahead algorithm, that
    seemed worth mentioning.

    - RCU-protected pointers are not exposed as part of the API. There are
    some fun bugs where the page cache forgets to use rcu_dereference()
    in the current codebase.

    - Value entries gain an extra bit compared to radix tree exceptional
    entries. That gives us the extra bit we need to put huge page swap
    entries in the page cache.

    - Some iterators now take a 'filter' argument instead of having
    separate iterators for tagged/untagged iterations.

    The page cache is improved by this:

    - Shorter, easier to read code

    - More efficient iterations

    - Reduction in size of struct address_space

    - Fewer walks from the top of the data structure; the XArray API
    encourages staying at the leaf node and conducting operations there.

    This patch (of 8):

    None of these bits may be used for slab allocations, so we can use them
    as radix tree flags as long as we mask them off before passing them to
    the slab allocator. Move the IDR flag from the high bits to the
    GFP_ZONEMASK bits.

    Link: http://lkml.kernel.org/r/20180313132639.17387-3-willy@infradead.org
    Signed-off-by: Matthew Wilcox
    Acked-by: Jeff Layton
    Cc: Darrick J. Wong
    Cc: Dave Chinner
    Cc: Ryusuke Konishi
    Cc: Will Deacon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     
  • The entire point of printing the pointers in list_debug is to see if
    there's any useful information in them (eg poison values, ASCII, etc);
    obscuring them to see if they compare equal makes them much less useful.
    If an attacker can force this message to be printed, we've already lost.

    Link: http://lkml.kernel.org/r/20180401223237.GV13332@bombadil.infradead.org
    Signed-off-by: Matthew Wilcox
    Reviewed-by: Tobin C. Harding
    Reviewed-by: Andrew Morton
    Cc: Eric Biggers
    Cc: Kees Cook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Wilcox
     
  • test_ubsan_misaligned_access() is local to the source and does not need
    to be in global scope, so make it static.

    Cleans up sparse warning:

    lib/test_ubsan.c:91:6: warning: symbol 'test_ubsan_misaligned_access' was not declared. Should it be static?

    Link: http://lkml.kernel.org/r/20180313103048.28513-1-colin.king@canonical.com
    Signed-off-by: Colin Ian King
    Cc: Jinbum Park
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Cc: Kees Cook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Colin Ian King
     
  • This is a test module for UBSAN. It triggers all undefined behaviors
    that linux supports now, and detect them.

    All test-cases have passed by compiling with gcc-5.5.0.

    If use gcc-4.9.x, misaligned, out-of-bounds, object-size-mismatch will not
    be detected. Because gcc-4.9.x doesn't support them.

    Link: http://lkml.kernel.org/r/20180309102247.GA2944@pjb1027-Latitude-E5410
    Signed-off-by: Jinbum Park
    Cc: Andrey Ryabinin
    Cc: Dmitry Vyukov
    Cc: Kees Cook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jinbum Park
     
  • This avoids an accidental stack VLA (since the compiler thinks the value
    of "len" can change, even when marked "const"). This just replaces it
    with a #define so it will DTRT.

    Seen with -Wvla. Fixed as part of the directive to remove all VLAs from
    the kernel: https://lkml.org/lkml/2018/3/7/621

    Link: http://lkml.kernel.org/r/20180307212555.GA17927@beast
    Signed-off-by: Kees Cook
    Reviewed-by: Andrew Morton
    Cc: Yury Norov
    Cc: Andy Shevchenko
    Cc: Matthew Wilcox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     
  • Keep all of the SOFTLOCKUP kconfig symbols together (instead of
    injecting the HARDLOCKUP symbols in the midst of them) so that the
    config tools display them with their dependencies.

    Tested with 'make {menuconfig/nconfig/gconfig/xconfig}'.

    Link: http://lkml.kernel.org/r/6be2d9ed-4656-5b94-460d-7f051e2c7570@infradead.org
    Fixes: 05a4a9527931 ("kernel/watchdog: split up config options")
    Signed-off-by: Randy Dunlap
    Cc: Nicholas Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • seq_put_decimal_ull_w(m, str, val, width) prints a decimal number with a
    specified minimal field width.

    It is equivalent of seq_printf(m, "%s%*d", str, width, val), but it
    works much faster.

    == test_smaps.py
    num = 0
    with open("/proc/1/smaps") as f:
    for x in xrange(10000):
    data = f.read()
    f.seek(0, 0)
    ==

    == Before patch ==
    $ time python test_smaps.py
    real 0m4.593s
    user 0m0.398s
    sys 0m4.158s

    == After patch ==
    $ time python test_smaps.py
    real 0m3.828s
    user 0m0.413s
    sys 0m3.408s

    $ perf -g record python test_smaps.py
    == Before patch ==
    - 79.01% 3.36% python [kernel.kallsyms] [k] show_smap.isra.33
    - 75.65% show_smap.isra.33
    + 48.85% seq_printf
    + 15.75% __walk_page_range
    + 9.70% show_map_vma.isra.23
    0.61% seq_puts

    == After patch ==
    - 75.51% 4.62% python [kernel.kallsyms] [k] show_smap.isra.33
    - 70.88% show_smap.isra.33
    + 24.82% seq_put_decimal_ull_w
    + 19.78% __walk_page_range
    + 12.74% seq_printf
    + 11.08% show_map_vma.isra.23
    + 1.68% seq_puts

    [akpm@linux-foundation.org: fix drivers/of/unittest.c build]
    Link: http://lkml.kernel.org/r/20180212074931.7227-1-avagin@openvz.org
    Signed-off-by: Andrei Vagin
    Cc: Alexey Dobriyan
    Cc: KAMEZAWA Hiroyuki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrei Vagin
     
  • A compiler can optimize away memset calls by replacing them with mov
    instructions. There are KASAN tests that specifically test that KASAN
    correctly handles memset calls so we don't want this optimization to
    happen.

    The solution is to add -fno-builtin flag to test_kasan.ko

    Link: http://lkml.kernel.org/r/105ec9a308b2abedb1a0d1fdced0c22d765e4732.1519924383.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Acked-by: Andrey Ryabinin
    Cc: Alexander Potapenko
    Cc: Dmitry Vyukov
    Cc: Geert Uytterhoeven
    Cc: Nick Terrell
    Cc: Chris Mason
    Cc: Yury Norov
    Cc: Al Viro
    Cc: "Luis R . Rodriguez"
    Cc: Palmer Dabbelt
    Cc: "Paul E . McKenney"
    Cc: Jeff Layton
    Cc: "Jason A . Donenfeld"
    Cc: Kostya Serebryany
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     
  • When an invalid-free is triggered by one of the KASAN tests, the object
    doesn't actually get freed. This later leads to a BUG failure in
    kmem_cache_destroy that checks that there are no allocated objects in
    the cache that is being destroyed.

    Fix this by calling kmem_cache_free with the proper object address after
    the call that triggers invalid-free.

    Link: http://lkml.kernel.org/r/286eaefc0a6c3fa9b83b87e7d6dc0fbb5b5c9926.1519924383.git.andreyknvl@google.com
    Signed-off-by: Andrey Konovalov
    Acked-by: Andrey Ryabinin
    Cc: Alexander Potapenko
    Cc: Dmitry Vyukov
    Cc: Geert Uytterhoeven
    Cc: Nick Terrell
    Cc: Chris Mason
    Cc: Yury Norov
    Cc: Al Viro
    Cc: "Luis R . Rodriguez"
    Cc: Palmer Dabbelt
    Cc: "Paul E . McKenney"
    Cc: Jeff Layton
    Cc: "Jason A . Donenfeld"
    Cc: Kostya Serebryany
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     

11 Apr, 2018

2 commits

  • The code refactoring by commit 0176adb00406 ("swiotlb: refactor coherent
    buffer allocation") made swiotlb_alloc_buffer almost always failing due
    to a thinko: namely, the function evaluates the dma_coherent_ok call
    incorrectly and dealing as if it's invalid. This ends up with weird
    errors like iwlwifi probe failure or amdgpu screen flickering.

    This patch corrects the logic error.

    Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1088658
    Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1088902
    Fixes: 0176adb00406 ("swiotlb: refactor coherent buffer allocation")
    Cc: # v4.16+
    Signed-off-by: Takashi Iwai
    Signed-off-by: Christoph Hellwig

    Takashi Iwai
     
  • Pull tracing updates from Steven Rostedt:
    "New features:

    - Tom Zanussi's extended histogram work.

    This adds the synthetic events to have histograms from multiple
    event data Adds triggers "onmatch" and "onmax" to call the
    synthetic events Several updates to the histogram code from this

    - Allow way to nest ring buffer calls in the same context

    - Allow absolute time stamps in ring buffer

    - Rewrite of filter code parsing based on Al Viro's suggestions

    - Setting of trace_clock to global if TSC is unstable (on boot)

    - Better OOM handling when allocating large ring buffers

    - Added initcall tracepoints (consolidated initcall_debug code with
    them)

    And other various fixes and clean ups"

    * tag 'trace-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (68 commits)
    init: Have initcall_debug still work without CONFIG_TRACEPOINTS
    init, tracing: Have printk come through the trace events for initcall_debug
    init, tracing: instrument security and console initcall trace events
    init, tracing: Add initcall trace events
    tracing: Add rcu dereference annotation for test func that touches filter->prog
    tracing: Add rcu dereference annotation for filter->prog
    tracing: Fixup logic inversion on setting trace_global_clock defaults
    tracing: Hide global trace clock from lockdep
    ring-buffer: Add set/clear_current_oom_origin() during allocations
    ring-buffer: Check if memory is available before allocation
    lockdep: Add print_irqtrace_events() to __warn
    vsprintf: Do not preprocess non-dereferenced pointers for bprintf (%px and %pK)
    tracing: Uninitialized variable in create_tracing_map_fields()
    tracing: Make sure variable string fields are NULL-terminated
    tracing: Add action comparisons when testing matching hist triggers
    tracing: Don't add flag strings when displaying variable references
    tracing: Fix display of hist trigger expressions containing timestamps
    ftrace: Drop a VLA in module_exists()
    tracing: Mention trace_clock=global when warning about unstable clocks
    tracing: Default to using trace_global_clock if sched_clock is unstable
    ...

    Linus Torvalds
     

10 Apr, 2018

1 commit

  • swiotlb_alloc() calls dma_direct_alloc(), which can satisfy lower than 32-bit
    DMA mask requests using GFP_DMA if the architecture supports it. Various
    x86 drivers rely on that, so we need to support that. At the same time
    the whole kernel expects a 32-bit DMA mask to just work, so the other magic
    in swiotlb_dma_supported() isn't actually needed either.

    Reported-by: Dominik Brodowski
    Signed-off-by: Christoph Hellwig
    Cc: Konrad Rzeszutek Wilk
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: iommu@lists.linux-foundation.org
    Fixes: 6e4bf5867783 ("x86/dma: Use generic swiotlb_ops")
    Link: http://lkml.kernel.org/r/20180409091517.6619-2-hch@lst.de
    Signed-off-by: Ingo Molnar

    Christoph Hellwig
     

08 Apr, 2018

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Notable changes:

    - Support for 4PB user address space on 64-bit, opt-in via mmap().

    - Removal of POWER4 support, which was accidentally broken in 2016
    and no one noticed, and blocked use of some modern instructions.

    - Workarounds so that the hypervisor can enable Transactional Memory
    on Power9.

    - A series to disable the DAWR (Data Address Watchpoint Register) on
    Power9.

    - More information displayed in the meltdown/spectre_v1/v2 sysfs
    files.

    - A vpermxor (Power8 Altivec) implementation for the raid6 Q
    Syndrome.

    - A big series to make the allocation of our pacas (per cpu area),
    kernel page tables, and per-cpu stacks NUMA aware when using the
    Radix MMU on Power9.

    And as usual many fixes, reworks and cleanups.

    Thanks to: Aaro Koskinen, Alexandre Belloni, Alexey Kardashevskiy,
    Alistair Popple, Andy Shevchenko, Aneesh Kumar K.V, Anshuman Khandual,
    Balbir Singh, Benjamin Herrenschmidt, Christophe Leroy, Christophe
    Lombard, Cyril Bur, Daniel Axtens, Dave Young, Finn Thain, Frederic
    Barrat, Gustavo Romero, Horia Geantă, Jonathan Neuschäfer, Kees Cook,
    Larry Finger, Laurent Dufour, Laurent Vivier, Logan Gunthorpe,
    Madhavan Srinivasan, Mark Greer, Mark Hairgrove, Markus Elfring,
    Mathieu Malaterre, Matt Brown, Matt Evans, Mauricio Faria de Oliveira,
    Michael Neuling, Naveen N. Rao, Nicholas Piggin, Paul Mackerras,
    Philippe Bergheaud, Ram Pai, Rob Herring, Sam Bobroff, Segher
    Boessenkool, Simon Guo, Simon Horman, Stewart Smith, Sukadev
    Bhattiprolu, Suraj Jitindar Singh, Thiago Jung Bauermann, Vaibhav
    Jain, Vaidyanathan Srinivasan, Vasant Hegde, Wei Yongjun"

    * tag 'powerpc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (207 commits)
    powerpc/64s/idle: Fix restore of AMOR on POWER9 after deep sleep
    powerpc/64s: Fix POWER9 DD2.2 and above in cputable features
    powerpc/64s: Fix pkey support in dt_cpu_ftrs, add CPU_FTR_PKEY bit
    powerpc/64s: Fix dt_cpu_ftrs to have restore_cpu clear unwanted LPCR bits
    Revert "powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead"
    powerpc: iomap.c: introduce io{read|write}64_{lo_hi|hi_lo}
    powerpc: io.h: move iomap.h include so that it can use readq/writeq defs
    cxl: Fix possible deadlock when processing page faults from cxllib
    powerpc/hw_breakpoint: Only disable hw breakpoint if cpu supports it
    powerpc/mm/radix: Update command line parsing for disable_radix
    powerpc/mm/radix: Parse disable_radix commandline correctly.
    powerpc/mm/hugetlb: initialize the pagetable cache correctly for hugetlb
    powerpc/mm/radix: Update pte fragment count from 16 to 256 on radix
    powerpc/mm/keys: Update documentation and remove unnecessary check
    powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead
    powerpc/64s/idle: Consolidate power9_offline_stop()/power9_idle_stop()
    powerpc/powernv: Always stop secondaries before reboot/shutdown
    powerpc: hard disable irqs in smp_send_stop loop
    powerpc: use NMI IPI for smp_send_stop
    powerpc/powernv: Fix SMT4 forcing idle code
    ...

    Linus Torvalds
     

07 Apr, 2018

2 commits

  • Pull PCI updates from Bjorn Helgaas:

    - move pci_uevent_ers() out of pci.h (Michael Ellerman)

    - skip ASPM common clock warning if BIOS already configured it (Sinan
    Kaya)

    - fix ASPM Coverity warning about threshold_ns (Gustavo A. R. Silva)

    - remove last user of pci_get_bus_and_slot() and the function itself
    (Sinan Kaya)

    - add decoding for 16 GT/s link speed (Jay Fang)

    - add interfaces to get max link speed and width (Tal Gilboa)

    - add pcie_bandwidth_capable() to compute max supported link bandwidth
    (Tal Gilboa)

    - add pcie_bandwidth_available() to compute bandwidth available to
    device (Tal Gilboa)

    - add pcie_print_link_status() to log link speed and whether it's
    limited (Tal Gilboa)

    - use PCI core interfaces to report when device performance may be
    limited by its slot instead of doing it in each driver (Tal Gilboa)

    - fix possible cpqphp NULL pointer dereference (Shawn Lin)

    - rescan more of the hierarchy on ACPI hotplug to fix Thunderbolt/xHCI
    hotplug (Mika Westerberg)

    - add support for PCI I/O port space that's neither directly accessible
    via CPU in/out instructions nor directly mapped into CPU physical
    memory space. This is fairly intrusive and includes minor changes to
    interfaces used for I/O space on most platforms (Zhichang Yuan, John
    Garry)

    - add support for HiSilicon Hip06/Hip07 LPC I/O space (Zhichang Yuan,
    John Garry)

    - use PCI_EXP_DEVCTL2_COMP_TIMEOUT in rapidio/tsi721 (Bjorn Helgaas)

    - remove possible NULL pointer dereference in of_pci_bus_find_domain_nr()
    (Shawn Lin)

    - report quirk timings with dev_info (Bjorn Helgaas)

    - report quirks that take longer than 10ms (Bjorn Helgaas)

    - add and use Altera Vendor ID (Johannes Thumshirn)

    - tidy Makefiles and comments (Bjorn Helgaas)

    - don't set up INTx if MSI or MSI-X is enabled to align cris, frv,
    ia64, and mn10300 with x86 (Bjorn Helgaas)

    - move pcieport_if.h to drivers/pci/pcie/ to encapsulate it (Frederick
    Lawler)

    - merge pcieport_if.h into portdrv.h (Bjorn Helgaas)

    - move workaround for BIOS PME issue from portdrv to PCI core (Bjorn
    Helgaas)

    - completely disable portdrv with "pcie_ports=compat" (Bjorn Helgaas)

    - remove portdrv link order dependency (Bjorn Helgaas)

    - remove support for unused VC portdrv service (Bjorn Helgaas)

    - simplify portdrv feature permission checking (Bjorn Helgaas)

    - remove "pcie_hp=nomsi" parameter (use "pci=nomsi" instead) (Bjorn
    Helgaas)

    - remove unnecessary "pcie_ports=auto" parameter (Bjorn Helgaas)

    - use cached AER capability offset (Frederick Lawler)

    - don't enable DPC if BIOS hasn't granted AER control (Mika Westerberg)

    - rename pcie-dpc.c to dpc.c (Bjorn Helgaas)

    - use generic pci_mmap_resource_range() instead of powerpc and xtensa
    arch-specific versions (David Woodhouse)

    - support arbitrary PCI host bridge offsets on sparc (Yinghai Lu)

    - remove System and Video ROM reservations on sparc (Bjorn Helgaas)

    - probe for device reset support during enumeration instead of runtime
    (Bjorn Helgaas)

    - add ACS quirk for Ampere (née APM) root ports (Feng Kan)

    - add function 1 DMA alias quirk for Marvell 88SE9220 (Thomas
    Vincent-Cross)

    - protect device restore with device lock (Sinan Kaya)

    - handle failure of FLR gracefully (Sinan Kaya)

    - handle CRS (config retry status) after device resets (Sinan Kaya)

    - skip various config reads for SR-IOV VFs as an optimization
    (KarimAllah Ahmed)

    - consolidate VPD code in vpd.c (Bjorn Helgaas)

    - add Tegra dependency on PCI_MSI_IRQ_DOMAIN (Arnd Bergmann)

    - add DT support for R-Car r8a7743 (Biju Das)

    - fix a PCI_EJECT vs PCI_BUS_RELATIONS race condition in Hyper-V host
    bridge driver that causes a general protection fault (Dexuan Cui)

    - fix Hyper-V host bridge hang in MSI setup on 1-vCPU VMs with SR-IOV
    (Dexuan Cui)

    - fix Hyper-V host bridge hang when ejecting a VF before setting up MSI
    (Dexuan Cui)

    - make several structures static (Fengguang Wu)

    - increase number of MSI IRQs supported by Synopsys DesignWare bridges
    from 32 to 256 (Gustavo Pimentel)

    - implemented multiplexed IRQ domain API and remove obsolete MSI IRQ
    API from DesignWare drivers (Gustavo Pimentel)

    - add Tegra power management support (Manikanta Maddireddy)

    - add Tegra loadable module support (Manikanta Maddireddy)

    - handle 64-bit BARs correctly in endpoint support (Niklas Cassel)

    - support optional regulator for HiSilicon STB (Shawn Guo)

    - use regulator bulk API for Qualcomm apq8064 (Srinivas Kandagatla)

    - support power supplies for Qualcomm msm8996 (Srinivas Kandagatla)

    * tag 'pci-v4.17-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (123 commits)
    MAINTAINERS: Add John Garry as maintainer for HiSilicon LPC driver
    HISI LPC: Add ACPI support
    ACPI / scan: Do not enumerate Indirect IO host children
    ACPI / scan: Rename acpi_is_serial_bus_slave() for more general use
    HISI LPC: Support the LPC host on Hip06/Hip07 with DT bindings
    of: Add missing I/O range exception for indirect-IO devices
    PCI: Apply the new generic I/O management on PCI IO hosts
    PCI: Add fwnode handler as input param of pci_register_io_range()
    PCI: Remove __weak tag from pci_register_io_range()
    MAINTAINERS: Add missing /drivers/pci/cadence directory entry
    fm10k: Report PCIe link properties with pcie_print_link_status()
    net/mlx5e: Use pcie_bandwidth_available() to compute bandwidth
    net/mlx5: Report PCIe link properties with pcie_print_link_status()
    net/mlx4_core: Report PCIe link properties with pcie_print_link_status()
    PCI: Add pcie_print_link_status() to log link speed and whether it's limited
    PCI: Add pcie_bandwidth_available() to compute bandwidth available to device
    misc: pci_endpoint_test: Handle 64-bit BARs properly
    PCI: designware-ep: Make dw_pcie_ep_reset_bar() handle 64-bit BARs properly
    PCI: endpoint: Make sure that BAR_5 does not have 64-bit flag set when clearing
    PCI: endpoint: Make epc->ops->clear_bar()/pci_epc_clear_bar() take struct *epf_bar
    ...

    Linus Torvalds
     
  • Merge updates from Andrew Morton:

    - a few misc things

    - ocfs2 updates

    - the v9fs maintainers have been missing for a long time. I've taken
    over v9fs patch slinging.

    - most of MM

    * emailed patches from Andrew Morton : (116 commits)
    mm,oom_reaper: check for MMF_OOM_SKIP before complaining
    mm/ksm: fix interaction with THP
    mm/memblock.c: cast constant ULLONG_MAX to phys_addr_t
    headers: untangle kmemleak.h from mm.h
    include/linux/mmdebug.h: make VM_WARN* non-rvals
    mm/page_isolation.c: make start_isolate_page_range() fail if already isolated
    mm: change return type to vm_fault_t
    mm, oom: remove 3% bonus for CAP_SYS_ADMIN processes
    mm, page_alloc: wakeup kcompactd even if kswapd cannot free more memory
    kernel/fork.c: detect early free of a live mm
    mm: make counting of list_lru_one::nr_items lockless
    mm/swap_state.c: make bool enable_vma_readahead and swap_vma_readahead() static
    block_invalidatepage(): only release page if the full page was invalidated
    mm: kernel-doc: add missing parameter descriptions
    mm/swap.c: remove @cold parameter description for release_pages()
    mm/nommu: remove description of alloc_vm_area
    zram: drop max_zpage_size and use zs_huge_class_size()
    zsmalloc: introduce zs_huge_class_size()
    mm: fix races between swapoff and flush dcache
    fs/direct-io.c: minor cleanups in do_blockdev_direct_IO
    ...

    Linus Torvalds
     

06 Apr, 2018

3 commits

  • Commit 841a915d20c7b2 ("printf: Do not have bprintf dereference pointers")
    would preprocess various pointers that are dereferenced in the bprintf()
    because the recording and printing are done at two different times. Some
    pointers stayed dereferenced in the ring buffer because user space could
    handle them (namely "%pS" and friends). Pointers that are not dereferenced
    should not be processed immediately but instead just saved directly.

    Cc: stable@vger.kernel.org
    Fixes: 841a915d20c7b2 ("printf: Do not have bprintf dereference pointers")
    Signed-off-by: Steven Rostedt (VMware)

    Steven Rostedt (VMware)
     
  • Currently #includes for no obvious
    reason. It looks like it's only a convenience, so remove kmemleak.h
    from slab.h and add to any users of kmemleak_* that
    don't already #include it. Also remove from source
    files that do not use it.

    This is tested on i386 allmodconfig and x86_64 allmodconfig. It would
    be good to run it through the 0day bot for other $ARCHes. I have
    neither the horsepower nor the storage space for the other $ARCHes.

    Update: This patch has been extensively build-tested by both the 0day
    bot & kisskb/ozlabs build farms. Both of them reported 2 build failures
    for which patches are included here (in v2).

    [ slab.h is the second most used header file after module.h; kernel.h is
    right there with slab.h. There could be some minor error in the
    counting due to some #includes having comments after them and I didn't
    combine all of those. ]

    [akpm@linux-foundation.org: security/keys/big_key.c needs vmalloc.h, per sfr]
    Link: http://lkml.kernel.org/r/e4309f98-3749-93e1-4bb7-d9501a39d015@infradead.org
    Link: http://kisskb.ellerman.id.au/kisskb/head/13396/
    Signed-off-by: Randy Dunlap
    Reviewed-by: Ingo Molnar
    Reported-by: Michael Ellerman [2 build failures]
    Reported-by: Fengguang Wu [2 build failures]
    Reviewed-by: Andrew Morton
    Cc: Wei Yongjun
    Cc: Luis R. Rodriguez
    Cc: Greg Kroah-Hartman
    Cc: Mimi Zohar
    Cc: John Johansen
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • syzbot is catching stalls at __bitmap_parselist()
    (https://syzkaller.appspot.com/bug?id=ad7e0351fbc90535558514a71cd3edc11681997a).
    The trigger is

    unsigned long v = 0;
    bitmap_parselist("7:,", &v, BITS_PER_LONG);

    which results in hitting infinite loop at

    while (a
    Reported-by: Tetsuo Handa
    Reported-by: syzbot
    Cc: Noam Camus
    Cc: Rasmus Villemoes
    Cc: Matthew Wilcox
    Cc: Mauro Carvalho Chehab
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yury Norov