01 Apr, 2020

40 commits

  • commit d795a90e2ba024dbf2f22107ae89c210b98b08b8 upstream.

    claim_swapfile() currently keeps the inode locked when it is successful,
    or the file is already swapfile (with -EBUSY). And, on the other error
    cases, it does not lock the inode.

    This inconsistency of the lock state and return value is quite confusing
    and actually causing a bad unlock balance as below in the "bad_swap"
    section of __do_sys_swapon().

    This commit fixes this issue by moving the inode_lock() and IS_SWAPFILE
    check out of claim_swapfile(). The inode is unlocked in
    "bad_swap_unlock_inode" section, so that the inode is ensured to be
    unlocked at "bad_swap". Thus, error handling codes after the locking now
    jumps to "bad_swap_unlock_inode" instead of "bad_swap".

    =====================================
    WARNING: bad unlock balance detected!
    5.5.0-rc7+ #176 Not tainted
    -------------------------------------
    swapon/4294 is trying to release lock (&sb->s_type->i_mutex_key) at: __do_sys_swapon+0x94b/0x3550
    but there are no more locks to release!

    other info that might help us debug this:
    no locks held by swapon/4294.

    stack backtrace:
    CPU: 5 PID: 4294 Comm: swapon Not tainted 5.5.0-rc7-BTRFS-ZNS+ #176
    Hardware name: ASUS All Series/H87-PRO, BIOS 2102 07/29/2014
    Call Trace:
    dump_stack+0xa1/0xea
    print_unlock_imbalance_bug.cold+0x114/0x123
    lock_release+0x562/0xed0
    up_write+0x2d/0x490
    __do_sys_swapon+0x94b/0x3550
    __x64_sys_swapon+0x54/0x80
    do_syscall_64+0xa4/0x4b0
    entry_SYSCALL_64_after_hwframe+0x49/0xbe
    RIP: 0033:0x7f15da0a0dc7

    Fixes: 1638045c3677 ("mm: set S_SWAPFILE on blockdev swap devices")
    Signed-off-by: Naohiro Aota
    Signed-off-by: Andrew Morton
    Tested-by: Qais Youef
    Reviewed-by: Andrew Morton
    Reviewed-by: Darrick J. Wong
    Cc: Christoph Hellwig
    Cc:
    Link: http://lkml.kernel.org/r/20200206090132.154869-1-naohiro.aota@wdc.com
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Naohiro Aota
     
  • commit b16798f5b907733966fd1a558fca823b3c67e4a1 upstream.

    If a station is still marked as authorized, mark it as no longer
    so before removing its keys. This allows frames transmitted to it
    to be rejected, providing additional protection against leaking
    plain text data during the disconnection flow.

    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200326155133.ccb4fb0bb356.If48f0f0504efdcf16b8921f48c6d3bb2cb763c99@changeid
    Signed-off-by: Johannes Berg
    Signed-off-by: Greg Kroah-Hartman

    Johannes Berg
     
  • commit a0761a301746ec2d92d7fcb82af69c0a6a4339aa upstream.

    If we know that we have an encrypted link (based on having had
    a key configured for TX in the past) then drop all data frames
    in the key selection handler if there's no key anymore.

    This fixes an issue with mac80211 internal TXQs - there we can
    buffer frames for an encrypted link, but then if the key is no
    longer there when they're dequeued, the frames are sent without
    encryption. This happens if a station is disconnected while the
    frames are still on the TXQ.

    Detecting that a link should be encrypted based on a first key
    having been configured for TX is fine as there are no use cases
    for a connection going from with encryption to no encryption.
    With extended key IDs, however, there is a case of having a key
    configured for only decryption, so we can't just trigger this
    behaviour on a key being configured.

    Cc: stable@vger.kernel.org
    Reported-by: Jouni Malinen
    Signed-off-by: Johannes Berg
    Signed-off-by: Luca Coelho
    Link: https://lore.kernel.org/r/iwlwifi.20200326150855.6865c7f28a14.I9fb1d911b064262d33e33dfba730cdeef83926ca@changeid
    Signed-off-by: Johannes Berg
    Signed-off-by: Greg Kroah-Hartman

    Johannes Berg
     
  • commit 0016d3201753b59f3ae84b868fe66c86ad256f19 upstream.

    The new opmode notification used this attribute with a u8, when
    it's documented as a u32 and indeed used in userspace as such,
    it just happens to work on little-endian systems since userspace
    isn't doing any strict size validation, and the u8 goes into the
    lower byte. Fix this.

    Cc: stable@vger.kernel.org
    Fixes: 466b9936bf93 ("cfg80211: Add support to notify station's opmode change to userspace")
    Signed-off-by: Johannes Berg
    Link: https://lore.kernel.org/r/20200325090531.be124f0a11c7.Iedbf4e197a85471ebd729b186d5365c0343bf7a8@changeid
    Signed-off-by: Johannes Berg
    Signed-off-by: Greg Kroah-Hartman

    Johannes Berg
     
  • commit ea697a8bf5a4161e59806fab14f6e4a46dc7dcb0 upstream.

    Some USB bridge devices will return a default set of characteristics during
    initialization. And then, once an attached drive has spun up, substitute
    the actual parameters reported by the drive. According to the SCSI spec,
    the device should return a UNIT ATTENTION in case any reported parameters
    change. But in this case the change is made silently after a small window
    where default values are reported.

    Commit a83da8a4509d ("scsi: sd: Optimal I/O size should be a multiple of
    physical block size") validated the reported optimal I/O size against the
    physical block size to overcome problems with devices reporting nonsensical
    transfer sizes. However, this validation did not account for the fact that
    aforementioned devices will return default values during a brief window
    during spin-up. The subsequent change in reported characteristics would
    invalidate the checking that had previously been performed.

    Unset a previously configured optimal I/O size should the sanity checking
    fail on subsequent revalidate attempts.

    Link: https://lore.kernel.org/r/33fb522e-4f61-1b76-914f-c9e6a3553c9b@gmail.com
    Cc: Bryan Gurney
    Cc:
    Reported-by: Bernhard Sulzer
    Tested-by: Bernhard Sulzer
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Greg Kroah-Hartman

    Martin K. Petersen
     
  • commit e33a814e772cdc36436c8c188d8c42d019fda639 upstream.

    gcc 10 will default to -fno-common, which causes this error at link
    time:

    (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here

    This is because both dtc-lexer as well as dtc-parser define the same
    global symbol yyloc. Before with -fcommon those were merged into one
    defintion. The proper solution would be to to mark this as "extern",
    however that leads to:

    dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls]
    26 | extern YYLTYPE yylloc;
    | ^~~~~~
    In file included from dtc-lexer.l:24:
    dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here
    127 | extern YYLTYPE yylloc;
    | ^~~~~~
    cc1: all warnings being treated as errors

    which means the declaration is completely redundant and can just be
    dropped.

    Signed-off-by: Dirk Mueller
    Signed-off-by: David Gibson
    [robh: cherry-pick from upstream]
    Cc: stable@vger.kernel.org
    Signed-off-by: Rob Herring
    Signed-off-by: Greg Kroah-Hartman

    Dirk Mueller
     
  • commit be40920fbf1003c38ccdc02b571e01a75d890c82 upstream.

    When I tried to compile tools/perf from the top directory with the -C
    option, the O= option didn't work correctly if I passed a relative path:

    $ make O=BUILD -C tools/perf/
    make: Entering directory '/home/mhiramat/ksrc/linux/tools/perf'
    BUILD: Doing 'make -j8' parallel build
    ../scripts/Makefile.include:4: *** O=/home/mhiramat/ksrc/linux/tools/perf/BUILD does not exist. Stop.
    make: *** [Makefile:70: all] Error 2
    make: Leaving directory '/home/mhiramat/ksrc/linux/tools/perf'

    The O= directory existence check failed because the check script ran in
    the build target directory instead of the directory where I ran the make
    command.

    To fix that, once change directory to $(PWD) and check O= directory,
    since the PWD is set to where the make command runs.

    Fixes: c883122acc0d ("perf tools: Let O= makes handle relative paths")
    Reported-by: Randy Dunlap
    Signed-off-by: Masami Hiramatsu
    Cc: Andrew Morton
    Cc: Borislav Petkov
    Cc: Geert Uytterhoeven
    Cc: Jiri Olsa
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: Peter Zijlstra
    Cc: Sasha Levin
    Cc: Steven Rostedt (VMware)
    Cc: stable@vger.kernel.org
    Link: http://lore.kernel.org/lkml/158351957799.3363.15269768530697526765.stgit@devnote2
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Greg Kroah-Hartman

    Masami Hiramatsu
     
  • commit c80b18cbb04b7b101af9bd14550f13d9866c646a upstream.

    For some unexplained reason, commit d1d1a96bdb44 ("rtlwifi: rtl8188ee:
    Remove local configuration variable") broke at least one system. As
    the only net effect of the change was to remove 2 bytes from the start
    of struct phy_status_rpt, this patch adds 2 bytes of padding at the
    beginning of the struct.

    Fixes: d1d1a96bdb44 ("rtlwifi: rtl8188ee: Remove local configuration variable")
    Cc: Stable # V5.4+
    Reported-by: Ashish
    Tested-by: Ashish
    Signed-off-by: Larry Finger
    Signed-off-by: Kalle Valo
    Signed-off-by: Greg Kroah-Hartman

    Larry Finger
     
  • commit 1efde2754275dbd9d11c6e0132a4f09facf297ab upstream.

    Do not depend on dwfl_module_addrsym() because it can fail on user-space
    shared libraries.

    Actually, same bug was fixed by commit 664fee3dc379 ("perf probe: Do not
    use dwfl_module_addrsym if dwarf_diename finds symbol name"), but commit
    07d369857808 ("perf probe: Fix wrong address verification) reverted to
    get actual symbol address from symtab.

    This fixes it again by getting symbol address from DIE, and only if the
    DIE has only address range, it uses dwfl_module_addrsym().

    Fixes: 07d369857808 ("perf probe: Fix wrong address verification)
    Reported-by: Alexandre Ghiti
    Signed-off-by: Masami Hiramatsu
    Tested-by: Alexandre Ghiti
    Cc: Alexander Shishkin
    Cc: Greg Kroah-Hartman
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Sasha Levin
    Link: http://lore.kernel.org/lkml/158281812176.476.14164573830975116234.stgit@devnote2
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Greg Kroah-Hartman

    Masami Hiramatsu
     
  • commit 6b8d68f1ce9266b05a55e93c62923ff51daae4c1 upstream.

    When we put an event with multiple probes, perf-probe fails to delete
    with filters. This comes from a failure to list up the event name
    because of overwrapping its name.

    To fix this issue, skip to list up the event which has same name.

    Without this patch:

    # perf probe -l \*
    probe_perf:map__map_ip (on perf_sample__fprintf_brstackoff:21@
    probe_perf:map__map_ip (on perf_sample__fprintf_brstackoff:25@
    probe_perf:map__map_ip (on append_inlines:12@util/machine.c in
    probe_perf:map__map_ip (on unwind_entry:19@util/machine.c in /
    probe_perf:map__map_ip (on map__map_ip@util/map.h in /home/mhi
    probe_perf:map__map_ip (on map__map_ip@util/map.h in /home/mhi
    # perf probe -d \*
    "*" does not hit any event.
    Error: Failed to delete events. Reason: No such file or directory (Code: -2)

    With it:

    # perf probe -d \*
    Removed event: probe_perf:map__map_ip
    #

    Fixes: 72363540c009 ("perf probe: Support multiprobe event")
    Reported-by: Arnaldo Carvalho de Melo
    Reported-by: He Zhe
    Signed-off-by: Masami Hiramatsu
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: stable@vger.kernel.org
    Link: http://lore.kernel.org/lkml/158287666197.16697.7514373548551863562.stgit@devnote2
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Greg Kroah-Hartman

    Masami Hiramatsu
     
  • commit 870b4333a62e45b0b2000d14b301b7b8b8cad9da upstream.

    In order to use efi_mem_type(), one needs CONFIG_EFI enabled. Otherwise
    that function is undefined. Use IS_ENABLED() to check and avoid the
    ifdeffery as the compiler optimizes away the following unreachable code
    then.

    Fixes: 985e537a4082 ("x86/ioremap: Map EFI runtime services data as encrypted for SEV")
    Reported-by: Randy Dunlap
    Signed-off-by: Borislav Petkov
    Tested-by: Randy Dunlap
    Cc: Tom Lendacky
    Cc:
    Link: https://lkml.kernel.org/r/7561e981-0d9b-d62c-0ef2-ce6007aff1ab@infradead.org
    Signed-off-by: Greg Kroah-Hartman

    Borislav Petkov
     
  • commit dfa7ea303f56a3a8b1ed3b91ef35af2da67ca4ee upstream.

    The L3 interconnect's memory map is from 0x0 to
    0xffffffff. Out of this, System memory (SDRAM) can be
    accessed from 0x80000000 to 0xffffffff (2GB)

    OMAP5 does support 4GB of SDRAM but upper 2GB can only be
    accessed by the MPU subsystem.

    Add the dma-ranges property to reflect the physical address limit
    of the L3 bus.

    Cc: stable@kernel.org
    Signed-off-by: Roger Quadros
    Signed-off-by: Tony Lindgren
    Signed-off-by: Greg Kroah-Hartman

    Roger Quadros
     
  • commit cfb5d65f25959f724081bae8445a0241db606af6 upstream.

    The L3 interconnect's memory map is from 0x0 to
    0xffffffff. Out of this, System memory (SDRAM) can be
    accessed from 0x80000000 to 0xffffffff (2GB)

    DRA7 does support 4GB of SDRAM but upper 2GB can only be
    accessed by the MPU subsystem.

    Add the dma-ranges property to reflect the physical address limit
    of the L3 bus.

    Issues ere observed only with SATA on DRA7-EVM with 4GB RAM
    and CONFIG_ARM_LPAE enabled. This is because the controller
    supports 64-bit DMA and its driver sets the dma_mask to 64-bit
    thus resulting in DMA accesses beyond L3 limit of 2G.

    Setting the correct bus_dma_limit fixes the issue.

    Signed-off-by: Roger Quadros
    Cc: stable@kernel.org
    Signed-off-by: Tony Lindgren
    Signed-off-by: Greg Kroah-Hartman

    Roger Quadros
     
  • commit c8d6ee01449cd0d2f30410681cccb616a88f50b1 upstream.

    kmemleak reports the following memory leak:

    unreferenced object 0xffff88821feac8a0 (size 96):
    comm "kworker/1:0", pid 17, jiffies 4294896362 (age 20.512s)
    hex dump (first 32 bytes):
    a0 c8 ea 1f 82 88 ff ff 00 c9 ea 1f 82 88 ff ff ................
    00 00 00 00 00 00 00 00 00 01 00 00 00 00 ad de ................
    backtrace:
    [] ceph_get_snapid_map+0x75/0x2a0
    [] fill_inode+0xb26/0x1010
    [] ceph_readdir_prepopulate+0x389/0xc40
    [] dispatch+0x11ab/0x1521
    [] ceph_con_workfn+0xf3d/0x3240
    [] process_one_work+0x24d/0x590
    [] worker_thread+0x4a/0x3d0
    [] kthread+0xfb/0x130
    [] ret_from_fork+0x3a/0x50

    A kfree is missing while looping the 'to_free' list of ceph_snapid_map
    objects.

    Cc: stable@vger.kernel.org
    Fixes: 75c9627efb72 ("ceph: map snapid to anonymous bdev ID")
    Signed-off-by: Luis Henriques
    Reviewed-by: Jeff Layton
    Signed-off-by: Ilya Dryomov
    Signed-off-by: Greg Kroah-Hartman

    Luis Henriques
     
  • commit 7614209736fbc4927584d4387faade4f31444fce upstream.

    CEPH_OSDMAP_FULL/NEARFULL aren't set since mimic, so we need to consult
    per-pool flags as well. Unfortunately the backwards compatibility here
    is lacking:

    - the change that deprecated OSDMAP_FULL/NEARFULL went into mimic, but
    was guarded by require_osd_release >= RELEASE_LUMINOUS
    - it was subsequently backported to luminous in v12.2.2, but that makes
    no difference to clients that only check OSDMAP_FULL/NEARFULL because
    require_osd_release is not client-facing -- it is for OSDs

    Since all kernels are affected, the best we can do here is just start
    checking both map flags and pool flags and send that to stable.

    These checks are best effort, so take osdc->lock and look up pool flags
    just once. Remove the FIXME, since filesystem quotas are checked above
    and RADOS quotas are reflected in POOL_FLAG_FULL: when the pool reaches
    its quota, both POOL_FLAG_FULL and POOL_FLAG_FULL_QUOTA are set.

    Cc: stable@vger.kernel.org
    Reported-by: Yanhu Cao
    Signed-off-by: Ilya Dryomov
    Reviewed-by: Jeff Layton
    Acked-by: Sage Weil
    Signed-off-by: Greg Kroah-Hartman

    Ilya Dryomov
     
  • commit 5bdfa854013ce4193de0d097931fd841382c76a7 upstream.

    Non-IB devices do not have a umad interface and the client_data will be
    left set to NULL. In this case calling get_nl_info() will try to kref a
    NULL cdev causing a crash:

    general protection fault, probably for non-canonical address 0xdffffc00000000ba: 0000 [#1] PREEMPT SMP KASAN
    KASAN: null-ptr-deref in range [0x00000000000005d0-0x00000000000005d7]
    CPU: 0 PID: 20851 Comm: syz-executor.0 Not tainted 5.6.0-rc2-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    RIP: 0010:kobject_get+0x35/0x150 lib/kobject.c:640
    Code: 53 e8 3f b0 8b f9 4d 85 e4 0f 84 a2 00 00 00 e8 31 b0 8b f9 49 8d 7c 24 3c 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03
    Signed-off-by: Jason Gunthorpe
    Signed-off-by: Greg Kroah-Hartman

    Jason Gunthorpe
     
  • commit 7aefa6237cfe4a6fcf06a8656eee988b36f8fefc upstream.

    Empty device names cannot be added to sysfs and crash with:

    kobject: (00000000f9de3792): attempted to be registered with empty name!
    WARNING: CPU: 1 PID: 10856 at lib/kobject.c:234 kobject_add_internal+0x7ac/0x9a0 lib/kobject.c:234
    Kernel panic - not syncing: panic_on_warn set ...
    CPU: 1 PID: 10856 Comm: syz-executor459 Not tainted 5.6.0-rc3-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    Call Trace:
    __dump_stack lib/dump_stack.c:77 [inline]
    dump_stack+0x197/0x210 lib/dump_stack.c:118
    panic+0x2e3/0x75c kernel/panic.c:221
    __warn.cold+0x2f/0x3e kernel/panic.c:582
    report_bug+0x289/0x300 lib/bug.c:195
    fixup_bug arch/x86/kernel/traps.c:174 [inline]
    fixup_bug arch/x86/kernel/traps.c:169 [inline]
    do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:267
    do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:286
    invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027
    RIP: 0010:kobject_add_internal+0x7ac/0x9a0 lib/kobject.c:234
    Code: 7a ca ca f9 e9 f0 f8 ff ff 4c 89 f7 e8 cd ca ca f9 e9 95 f9 ff ff e8 13 25 8c f9 4c 89 e6 48 c7 c7 a0 08 1a 89 e8 a3 76 5c f9 0b 41 bd ea ff ff ff e9 52 ff ff ff e8 f2 24 8c f9 0f 0b e8 eb
    RSP: 0018:ffffc90002006eb0 EFLAGS: 00010286
    RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
    RDX: 0000000000000000 RSI: ffffffff815eae46 RDI: fffff52000400dc8
    RBP: ffffc90002006f08 R08: ffff8880972ac500 R09: ffffed1015d26659
    R10: ffffed1015d26658 R11: ffff8880ae9332c7 R12: ffff888093034668
    R13: 0000000000000000 R14: ffff8880a69d7600 R15: 0000000000000001
    kobject_add_varg lib/kobject.c:390 [inline]
    kobject_add+0x150/0x1c0 lib/kobject.c:442
    device_add+0x3be/0x1d00 drivers/base/core.c:2412
    ib_register_device drivers/infiniband/core/device.c:1371 [inline]
    ib_register_device+0x93e/0xe40 drivers/infiniband/core/device.c:1343
    rxe_register_device+0x52e/0x655 drivers/infiniband/sw/rxe/rxe_verbs.c:1231
    rxe_add+0x122b/0x1661 drivers/infiniband/sw/rxe/rxe.c:302
    rxe_net_add+0x91/0xf0 drivers/infiniband/sw/rxe/rxe_net.c:539
    rxe_newlink+0x39/0x90 drivers/infiniband/sw/rxe/rxe.c:318
    nldev_newlink+0x28a/0x430 drivers/infiniband/core/nldev.c:1538
    rdma_nl_rcv_msg drivers/infiniband/core/netlink.c:195 [inline]
    rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline]
    rdma_nl_rcv+0x5d9/0x980 drivers/infiniband/core/netlink.c:259
    netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
    netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1329
    netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1918
    sock_sendmsg_nosec net/socket.c:652 [inline]
    sock_sendmsg+0xd7/0x130 net/socket.c:672
    ____sys_sendmsg+0x753/0x880 net/socket.c:2343
    ___sys_sendmsg+0x100/0x170 net/socket.c:2397
    __sys_sendmsg+0x105/0x1d0 net/socket.c:2430
    __do_sys_sendmsg net/socket.c:2439 [inline]
    __se_sys_sendmsg net/socket.c:2437 [inline]
    __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437
    do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
    entry_SYSCALL_64_after_hwframe+0x49/0xbe

    Prevent empty names when checking the name provided from userspace during
    newlink and rename.

    Fixes: 3856ec4b93c9 ("RDMA/core: Add RDMA_NLDEV_CMD_NEWLINK/DELLINK support")
    Fixes: 05d940d3a3ec ("RDMA/nldev: Allow IB device rename through RDMA netlink")
    Cc: stable@kernel.org
    Link: https://lore.kernel.org/r/20200309191648.GA30852@ziepe.ca
    Reported-and-tested-by: syzbot+da615ac67d4dbea32cbc@syzkaller.appspotmail.com
    Signed-off-by: Jason Gunthorpe
    Signed-off-by: Greg Kroah-Hartman

    Jason Gunthorpe
     
  • commit 8959b304c7062889b1276092cc8590dc1ba98f65 upstream.

    The implementation if .irq_disable() which kicks in between
    the gpiolib and the driver is not properly mimicking the
    expected semantics of the irqchip core: the irqchip will
    call .irq_disable() if that exists, else it will call
    mask_irq() which first checks if .irq_mask() is defined
    before calling it.

    Since we are calling it unconditionally, we get this bug
    from drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c, as it only
    defines .irq_mask_ack and not .irq_mask:

    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = (ptrval)
    (...)
    PC is at 0x0
    LR is at gpiochip_irq_disable+0x20/0x30

    Fix this by only calling .irq_mask() if it exists.

    Cc: Brian Masney
    Cc: Hans Verkuil
    Cc: stable@vger.kernel.org
    Reviewed-by: Bartosz Golaszewski
    Fixes: 461c1a7d4733 ("gpiolib: override irq_enable/disable")
    Signed-off-by: Linus Walleij
    Link: https://lore.kernel.org/r/20200306132326.1329640-1-linus.walleij@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Linus Walleij
     
  • commit f2f2b3bbf0d9f8d090b9a019679223b2bd1c66c4 upstream.

    If name memory allocation fails the name will be left empty and
    device_add_one() will crash:

    kobject: (0000000004952746): attempted to be registered with empty name!
    WARNING: CPU: 0 PID: 329 at lib/kobject.c:234 kobject_add_internal+0x7ac/0x9a0 lib/kobject.c:234
    Kernel panic - not syncing: panic_on_warn set ...
    CPU: 0 PID: 329 Comm: syz-executor.5 Not tainted 5.6.0-rc2-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    Call Trace:
    __dump_stack lib/dump_stack.c:77 [inline]
    dump_stack+0x197/0x210 lib/dump_stack.c:118
    panic+0x2e3/0x75c kernel/panic.c:221
    __warn.cold+0x2f/0x3e kernel/panic.c:582
    report_bug+0x289/0x300 lib/bug.c:195
    fixup_bug arch/x86/kernel/traps.c:174 [inline]
    fixup_bug arch/x86/kernel/traps.c:169 [inline]
    do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:267
    do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:286
    invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027
    RIP: 0010:kobject_add_internal+0x7ac/0x9a0 lib/kobject.c:234
    Code: 1a 98 ca f9 e9 f0 f8 ff ff 4c 89 f7 e8 6d 98 ca f9 e9 95 f9 ff ff e8 c3 f0 8b f9 4c 89 e6 48 c7 c7 a0 0e 1a 89 e8 e3 41 5c f9 0b 41 bd ea ff ff ff e9 52 ff ff ff e8 a2 f0 8b f9 0f 0b e8 9b
    RSP: 0018:ffffc90005b27908 EFLAGS: 00010286
    RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
    RDX: 0000000000040000 RSI: ffffffff815eae46 RDI: fffff52000b64f13
    RBP: ffffc90005b27960 R08: ffff88805aeba480 R09: ffffed1015d06659
    R10: ffffed1015d06658 R11: ffff8880ae8332c7 R12: ffff8880a37fd000
    R13: 0000000000000000 R14: ffff888096691780 R15: 0000000000000001
    kobject_add_varg lib/kobject.c:390 [inline]
    kobject_add+0x150/0x1c0 lib/kobject.c:442
    device_add+0x3be/0x1d00 drivers/base/core.c:2412
    add_one_compat_dev drivers/infiniband/core/device.c:901 [inline]
    add_one_compat_dev+0x46a/0x7e0 drivers/infiniband/core/device.c:857
    rdma_dev_init_net+0x2eb/0x490 drivers/infiniband/core/device.c:1120
    ops_init+0xb3/0x420 net/core/net_namespace.c:137
    setup_net+0x2d5/0x8b0 net/core/net_namespace.c:327
    copy_net_ns+0x29e/0x5a0 net/core/net_namespace.c:468
    create_new_namespaces+0x403/0xb50 kernel/nsproxy.c:108
    unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:229
    ksys_unshare+0x444/0x980 kernel/fork.c:2955
    __do_sys_unshare kernel/fork.c:3023 [inline]
    __se_sys_unshare kernel/fork.c:3021 [inline]
    __x64_sys_unshare+0x31/0x40 kernel/fork.c:3021
    do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
    entry_SYSCALL_64_after_hwframe+0x49/0xbe

    Link: https://lore.kernel.org/r/20200309193200.GA10633@ziepe.ca
    Cc: stable@kernel.org
    Fixes: 4e0f7b907072 ("RDMA/core: Implement compat device/sysfs tree in net namespace")
    Reported-by: syzbot+ab4dae63f7d310641ded@syzkaller.appspotmail.com
    Signed-off-by: Jason Gunthorpe
    Signed-off-by: Greg Kroah-Hartman

    Jason Gunthorpe
     
  • commit 941224e09483ea3428ffc6402de56a4a2e2cb6da upstream.

    When a kernel ULP requests the rdmavt to create a completion queue, it
    allocated the queue and set cq->kqueue to point to it. However, when the
    completion queue is destroyed, cq->queue is freed instead, leading to a
    memory leak:

    https://lore.kernel.org/r/215235485.15264050.1583334487658.JavaMail.zimbra@redhat.com

    unreferenced object 0xffffc90006639000 (size 12288):
    comm "kworker/u128:0", pid 8, jiffies 4295777598 (age 589.085s)
    hex dump (first 32 bytes):
    4d 00 00 00 4d 00 00 00 00 c0 08 ac 8b 88 ff ff M...M...........
    00 00 00 00 80 00 00 00 00 00 00 00 10 00 00 00 ................
    backtrace:
    [] __vmalloc_node_range+0x361/0x720
    [] __vmalloc_node.constprop.30+0x63/0xb0
    [] rvt_create_cq+0x98a/0xd80 [rdmavt]
    [] __ib_alloc_cq_user+0x281/0x1260 [ib_core]
    [] nvme_rdma_cm_handler+0xdb7/0x1b80 [nvme_rdma]
    [] cma_cm_event_handler+0xb7/0x550 [rdma_cm]
    [] addr_handler+0x195/0x310 [rdma_cm]
    [] process_one_req+0xdd/0x600 [ib_core]
    [] process_one_work+0x920/0x1740
    [] worker_thread+0x87/0xb40
    [] kthread+0x327/0x3f0
    [] ret_from_fork+0x3a/0x50

    This patch fixes the issue by freeing cq->kqueue instead.

    Fixes: 239b0e52d8aa ("IB/hfi1: Move rvt_cq_wc struct into uapi directory")
    Link: https://lore.kernel.org/r/20200313123957.14343.43879.stgit@awfm-01.aw.intel.com
    Cc: # 5.4.x
    Reported-by: Yi Zhang
    Reviewed-by: Mike Marciniszyn
    Reviewed-by: Dennis Dalessandro
    Signed-off-by: Kaike Wan
    Signed-off-by: Dennis Dalessandro
    Signed-off-by: Jason Gunthorpe
    Signed-off-by: Greg Kroah-Hartman

    Kaike Wan
     
  • commit 52afa505a03d914081f40cb869a3248567a57573 upstream.

    The commit 19ba1eb15a2a ("Input: psmouse - add a custom serio protocol
    to send extra information") introduced usage of the BIT() macro
    for SERIO_* flags; this macro is not provided in UAPI headers.
    Replace if with similarly defined _BITUL() macro defined
    in .

    Fixes: 19ba1eb15a2a ("Input: psmouse - add a custom serio protocol to send extra information")
    Signed-off-by: Eugene Syromiatnikov
    Cc: # v5.0+
    Link: https://lore.kernel.org/r/20200324041341.GA32335@asgard.redhat.com
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Eugene Syromiatnikov
     
  • commit 1369d0abe469fb4cdea8a5bce219d38cb857a658 upstream.

    This laptop (and perhaps other variants of the same model) reports an
    SMBus-capable Synaptics touchpad. Everything (including suspend and
    resume) works fine when RMI is enabled via the kernel command line, so
    let's add it to the whitelist.

    Signed-off-by: Yussuf Khalil
    Link: https://lore.kernel.org/r/20200307213508.267187-1-dev@pp3345.net
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Yussuf Khalil
     
  • commit 4134252ab7e2c339a54302b88496cb5a89cdbaec upstream.

    We need to refresh timestamp when emitting key autorepeat events, otherwise
    they will carry timestamp of the original key press event.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206929
    Fixes: 3b51c44bd693 ("Input: allow drivers specify timestamp for input events")
    Cc: stable@vger.kernel.org
    Reported-by: teika kazura
    Tested-by: teika kazura
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Torokhov
     
  • commit 32cf3a610c35cb21e3157f4bbf29d89960e30a36 upstream.

    These functions are supposed to return negative error codes but instead
    it returns true on failure and false on success. The error codes are
    eventually propagated back to user space.

    Fixes: 48a2b783483b ("Input: add Raydium I2C touchscreen driver")
    Signed-off-by: Dan Carpenter
    Link: https://lore.kernel.org/r/20200303101306.4potflz7na2nn3od@kili.mountain
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Greg Kroah-Hartman

    Dan Carpenter
     
  • commit e1b9f99ff8c40bba6e59de9ad4a659447b1e4112 upstream.

    The driver forgets to disable and unprepare clk when remove.
    Add a call to clk_disable_unprepare to fix it.

    Signed-off-by: Chuhong Yuan
    Signed-off-by: Wolfram Sang
    Cc: stable@kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Chuhong Yuan
     
  • commit 7937fd3227055892e169f4b34d21157e57d919e2 upstream.

    The code now compiles without ACPI, but there's a warning since
    iwl_mvm_get_ppag_table() isn't used, and iwl_mvm_ppag_init() must
    not unconditionally fail but return success instead.

    Signed-off-by: Johannes Berg
    Signed-off-by: Luca Coelho
    Signed-off-by: Kalle Valo
    [Drop hunk removing iwl_mvm_get_ppag_table() since it doesn't exist in
    5.4]
    Signed-off-by: Jason Andryuk
    Signed-off-by: Greg Kroah-Hartman

    Johannes Berg
     
  • [ Upstream commit 1da8347d8505c137fb07ff06bbcd3f2bf37409bc ]

    Currently, the intel iommu debugfs directory(/sys/kernel/debug/iommu/intel)
    gets populated only when DMA remapping is enabled (dmar_disabled = 0)
    irrespective of whether interrupt remapping is enabled or not.

    Instead, populate the intel iommu debugfs directory if any IOMMUs are
    detected.

    Cc: Dan Carpenter
    Fixes: ee2636b8670b1 ("iommu/vt-d: Enable base Intel IOMMU debugfs support")
    Signed-off-by: Megha Dey
    Signed-off-by: Lu Baolu
    Signed-off-by: Joerg Roedel
    Signed-off-by: Sasha Levin

    Megha Dey
     
  • [ Upstream commit ba3b01d7a6f4ab9f8a0557044c9a7678f64ae070 ]

    Commit 6825d3ea6cde ("iommu/vt-d: Add debugfs support to show register
    contents") dumps the register contents for all IOMMU devices.

    Currently, a 64 bit read(dmar_readq) is done for all the IOMMU registers,
    even though some of the registers are 32 bits, which is incorrect.

    Use the correct read function variant (dmar_readl/dmar_readq) while
    reading the contents of 32/64 bit registers respectively.

    Signed-off-by: Megha Dey
    Link: https://lore.kernel.org/r/1583784587-26126-2-git-send-email-megha.dey@linux.intel.com
    Acked-by: Lu Baolu
    Signed-off-by: Joerg Roedel
    Signed-off-by: Sasha Levin

    Megha Dey
     
  • [ Upstream commit 5eb01ddfcfb25e6ebc404a41deae946bde776731 ]

    The HNS3 driver supports to configure TC numbers and TC to priority
    map via "tc" tool. But when delete the rule, will fail, because
    the HNS3 driver needs at least one TC, but the "tc" tool sets TC
    number to zero when delete.

    This patch makes sure that the TC number is at least one.

    Fixes: 30d240dfa2e8 ("net: hns3: Add mqprio hardware offload support in hns3 driver")
    Signed-off-by: Yonglong Liu
    Signed-off-by: Huazhong Tan
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin

    Yonglong Liu
     
  • [ Upstream commit f3cc008bf6d59b8d93b4190e01d3e557b0040e15 ]

    This patch fixes an off-by-one error in strncpy size argument in
    drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c. The issue is that in:

    strncmp(opt, "eee_timer:", 6)

    the passed string literal: "eee_timer:" has 10 bytes (without the NULL
    byte) and the passed size argument is 6. As a result, the logic will
    also accept other, malformed strings, e.g. "eee_tiXXX:".

    This bug doesn't seem to have any security impact since its present in
    module's cmdline parsing code.

    Signed-off-by: Dominik Czarnota
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin

    Dominik Czarnota
     
  • [ Upstream commit 7395f62d95aafacdb9bd4996ec2f95b4a655d7e6 ]

    Clang warns:

    drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2860:9: warning:
    converting the result of '?:' with integer constants to a boolean always
    evaluates to 'true' [-Wtautological-constant-compare]
    return DPAA_FD_DATA_ALIGNMENT ? ALIGN(headroom,
    ^
    drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:131:34: note: expanded
    from macro 'DPAA_FD_DATA_ALIGNMENT'
    \#define DPAA_FD_DATA_ALIGNMENT (fman_has_errata_a050385() ? 64 : 16)
    ^
    1 warning generated.

    This was exposed by commit 3c68b8fffb48 ("dpaa_eth: FMan erratum A050385
    workaround") even though it appears to have been an issue since the
    introductory commit 9ad1a3749333 ("dpaa_eth: add support for DPAA
    Ethernet") since DPAA_FD_DATA_ALIGNMENT has never been able to be zero.

    Just replace the whole boolean expression with the true branch, as it is
    always been true.

    Link: https://github.com/ClangBuiltLinux/linux/issues/928
    Signed-off-by: Nathan Chancellor
    Reviewed-by: Madalin Bucur
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin

    Nathan Chancellor
     
  • [ Upstream commit ba32679cac50c38fdf488296f96b1f3175532b8e ]

    When trying to transmit to an unknown destination, the mesh code would
    unconditionally transmit a HWMP PREQ even if HWMP is not the current
    path selection algorithm.

    Signed-off-by: Nicolas Cavallari
    Link: https://lore.kernel.org/r/20200305140409.12204-1-cavallar@lri.fr
    Signed-off-by: Johannes Berg
    Signed-off-by: Sasha Levin

    Nicolas Cavallari
     
  • [ Upstream commit 394b61711f3ce33f75bf70a3e22938464a13b3ee ]

    When trying to rescan disks in petitboot shell, we hit the following
    softlockup stacktrace:

    Kernel panic - not syncing: System is deadlocked on memory
    [ 241.223394] CPU: 32 PID: 693 Comm: sh Not tainted 5.4.16-openpower1 #1
    [ 241.223406] Call Trace:
    [ 241.223415] [c0000003f07c3180] [c000000000493fc4] dump_stack+0xa4/0xd8 (unreliable)
    [ 241.223432] [c0000003f07c31c0] [c00000000007d4ac] panic+0x148/0x3cc
    [ 241.223446] [c0000003f07c3260] [c000000000114b10] out_of_memory+0x468/0x4c4
    [ 241.223461] [c0000003f07c3300] [c0000000001472b0] __alloc_pages_slowpath+0x594/0x6d8
    [ 241.223476] [c0000003f07c3420] [c00000000014757c] __alloc_pages_nodemask+0x188/0x1a4
    [ 241.223492] [c0000003f07c34a0] [c000000000153e10] alloc_pages_current+0xcc/0xd8
    [ 241.223508] [c0000003f07c34e0] [c0000000001577ac] alloc_slab_page+0x30/0x98
    [ 241.223524] [c0000003f07c3520] [c0000000001597fc] new_slab+0x138/0x40c
    [ 241.223538] [c0000003f07c35f0] [c00000000015b204] ___slab_alloc+0x1e4/0x404
    [ 241.223552] [c0000003f07c36c0] [c00000000015b450] __slab_alloc+0x2c/0x48
    [ 241.223566] [c0000003f07c36f0] [c00000000015b754] kmem_cache_alloc_node+0x9c/0x1b4
    [ 241.223582] [c0000003f07c3760] [c000000000218c48] blk_alloc_queue_node+0x34/0x270
    [ 241.223599] [c0000003f07c37b0] [c000000000226574] blk_mq_init_queue+0x2c/0x78
    [ 241.223615] [c0000003f07c37e0] [c0000000002ff710] scsi_mq_alloc_queue+0x28/0x70
    [ 241.223631] [c0000003f07c3810] [c0000000003005b8] scsi_alloc_sdev+0x184/0x264
    [ 241.223647] [c0000003f07c38a0] [c000000000300ba0] scsi_probe_and_add_lun+0x288/0xa3c
    [ 241.223663] [c0000003f07c3a00] [c000000000301768] __scsi_scan_target+0xcc/0x478
    [ 241.223679] [c0000003f07c3b20] [c000000000301c64] scsi_scan_channel.part.9+0x74/0x7c
    [ 241.223696] [c0000003f07c3b70] [c000000000301df4] scsi_scan_host_selected+0xe0/0x158
    [ 241.223712] [c0000003f07c3bd0] [c000000000303f04] store_scan+0x104/0x114
    [ 241.223727] [c0000003f07c3cb0] [c0000000002d5ac4] dev_attr_store+0x30/0x4c
    [ 241.223741] [c0000003f07c3cd0] [c0000000001dbc34] sysfs_kf_write+0x64/0x78
    [ 241.223756] [c0000003f07c3cf0] [c0000000001da858] kernfs_fop_write+0x170/0x1b8
    [ 241.223773] [c0000003f07c3d40] [c0000000001621fc] __vfs_write+0x34/0x60
    [ 241.223787] [c0000003f07c3d60] [c000000000163c2c] vfs_write+0xa8/0xcc
    [ 241.223802] [c0000003f07c3db0] [c000000000163df4] ksys_write+0x70/0xbc
    [ 241.223816] [c0000003f07c3e20] [c00000000000b40c] system_call+0x5c/0x68

    As a part of the scan process Linux will allocate and configure a
    scsi_device for each target to be scanned. If the device is not present,
    then the scsi_device is torn down. As a part of scsi_device teardown a
    workqueue item will be scheduled and the lockups we see are because there
    are 250k workqueue items to be processed. Accoding to the specification of
    SIS-64 sas controller, max_channel should be decreased on SIS-64 adapters
    to 4.

    The patch fixes softlockup issue.

    Thanks for Oliver Halloran's help with debugging and explanation!

    Link: https://lore.kernel.org/r/1583510248-23672-1-git-send-email-wenxiong@linux.vnet.ibm.com
    Signed-off-by: Wen Xiong
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    Wen Xiong
     
  • [ Upstream commit 17413852804d7e86e6f0576cca32c1541817800e ]

    qeth_init_qdio_queues() fills the RX ring with an initial set of
    RX buffers. If qeth_init_input_buffer() fails to back one of the RX
    buffers with memory, we need to bail out and report the error.

    Fixes: 4a71df50047f ("qeth: new qeth device driver")
    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin

    Julian Wiedmann
     
  • [ Upstream commit 240c1948491b81cfe40f84ea040a8f2a4966f101 ]

    When an OSA device in prio-queue setup is reduced to 1 TX queue due to
    HW restrictions, we reset its the default_out_queue to 0.

    In the old code this was needed so that qeth_get_priority_queue() gets
    the queue selection right. But with proper multiqueue support we already
    reduced dev->real_num_tx_queues to 1, and so the stack puts all traffic
    on txq 0 without even calling .ndo_select_queue.

    Thus we can preserve the user's configuration, and apply it if the OSA
    device later re-gains support for multiple TX queues.

    Fixes: 73dc2daf110f ("s390/qeth: add TX multiqueue support for OSA devices")
    Signed-off-by: Julian Wiedmann
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin

    Julian Wiedmann
     
  • [ Upstream commit f5152416528c2295f35dd9c9bd4fb27c4032413d ]

    Similar to the commit 02d715b4a818 ("iommu/vt-d: Fix RCU list debugging
    warnings"), there are several other places that call
    list_for_each_entry_rcu() outside of an RCU read side critical section
    but with dmar_global_lock held. Silence those false positives as well.

    drivers/iommu/intel-iommu.c:4288 RCU-list traversed in non-reader section!!
    1 lock held by swapper/0/1:
    #0: ffffffff935892c8 (dmar_global_lock){+.+.}, at: intel_iommu_init+0x1ad/0xb97

    drivers/iommu/dmar.c:366 RCU-list traversed in non-reader section!!
    1 lock held by swapper/0/1:
    #0: ffffffff935892c8 (dmar_global_lock){+.+.}, at: intel_iommu_init+0x125/0xb97

    drivers/iommu/intel-iommu.c:5057 RCU-list traversed in non-reader section!!
    1 lock held by swapper/0/1:
    #0: ffffffffa71892c8 (dmar_global_lock){++++}, at: intel_iommu_init+0x61a/0xb13

    Signed-off-by: Qian Cai
    Acked-by: Lu Baolu
    Signed-off-by: Joerg Roedel
    Signed-off-by: Sasha Levin

    Qian Cai
     
  • [ Upstream commit 07dc3678bacc2a75b1900febea7d996a31f178a2 ]

    Store the IOMMU mapping created by the device core of each Exynos DRM
    sub-device and restore it when the Exynos DRM driver is unbound. This
    fixes IOMMU initialization failure for the second time when a deferred
    probe is triggered from the bind() callback of master's compound DRM
    driver. This also fixes the following issue found using kmemleak
    detector:

    unreferenced object 0xc2137640 (size 64):
    comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
    hex dump (first 32 bytes):
    50 a3 14 c2 80 a2 14 c2 01 00 00 00 20 00 00 00 P........... ...
    00 10 00 00 00 80 00 00 00 00 00 00 00 00 00 00 ................
    backtrace:
    [] arch_setup_dma_ops+0x4c/0x104
    [] of_dma_configure+0x19c/0x3a4
    [] really_probe+0xb0/0x47c
    [] driver_probe_device+0x78/0x1c4
    [] device_driver_attach+0x58/0x60
    [] __driver_attach+0xb8/0x158
    [] bus_for_each_dev+0x74/0xb4
    [] bus_add_driver+0x1c0/0x200
    [] driver_register+0x74/0x108
    [] exynos_drm_init+0xb0/0x134
    [] do_one_initcall+0x90/0x458
    [] kernel_init_freeable+0x188/0x200
    [] kernel_init+0x8/0x110
    [] ret_from_fork+0x14/0x20
    [] 0x0
    unreferenced object 0xc214a280 (size 128):
    comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
    hex dump (first 32 bytes):
    00 a0 ec ed 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    backtrace:
    [] arch_setup_dma_ops+0x4c/0x104
    [] of_dma_configure+0x19c/0x3a4
    [] really_probe+0xb0/0x47c
    [] driver_probe_device+0x78/0x1c4
    [] device_driver_attach+0x58/0x60
    [] __driver_attach+0xb8/0x158
    [] bus_for_each_dev+0x74/0xb4
    [] bus_add_driver+0x1c0/0x200
    [] driver_register+0x74/0x108
    [] exynos_drm_init+0xb0/0x134
    [] do_one_initcall+0x90/0x458
    [] kernel_init_freeable+0x188/0x200
    [] kernel_init+0x8/0x110
    [] ret_from_fork+0x14/0x20
    [] 0x0
    unreferenced object 0xedeca000 (size 4096):
    comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
    hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    backtrace:
    [] arch_setup_dma_ops+0x4c/0x104
    [] of_dma_configure+0x19c/0x3a4
    [] really_probe+0xb0/0x47c
    [] driver_probe_device+0x78/0x1c4
    [] device_driver_attach+0x58/0x60
    [] __driver_attach+0xb8/0x158
    [] bus_for_each_dev+0x74/0xb4
    [] bus_add_driver+0x1c0/0x200
    [] driver_register+0x74/0x108
    [] exynos_drm_init+0xb0/0x134
    [] do_one_initcall+0x90/0x458
    [] kernel_init_freeable+0x188/0x200
    [] kernel_init+0x8/0x110
    [] ret_from_fork+0x14/0x20
    [] 0x0
    unreferenced object 0xc214a300 (size 128):
    comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
    hex dump (first 32 bytes):
    00 a3 14 c2 00 a3 14 c2 00 40 18 c2 00 80 18 c2 .........@......
    02 00 02 00 ad 4e ad de ff ff ff ff ff ff ff ff .....N..........
    backtrace:
    [] iommu_domain_alloc+0x24/0x50
    [] arm_iommu_create_mapping+0xe4/0x134
    [] arch_setup_dma_ops+0x4c/0x104
    [] of_dma_configure+0x19c/0x3a4
    [] really_probe+0xb0/0x47c
    [] driver_probe_device+0x78/0x1c4
    [] device_driver_attach+0x58/0x60
    [] __driver_attach+0xb8/0x158
    [] bus_for_each_dev+0x74/0xb4
    [] bus_add_driver+0x1c0/0x200
    [] driver_register+0x74/0x108
    [] exynos_drm_init+0xb0/0x134
    [] do_one_initcall+0x90/0x458
    [] kernel_init_freeable+0x188/0x200
    [] kernel_init+0x8/0x110
    [] ret_from_fork+0x14/0x20

    Signed-off-by: Marek Szyprowski
    Reviewed-by: Lukasz Luba
    Signed-off-by: Inki Dae
    Signed-off-by: Sasha Levin

    Marek Szyprowski
     
  • [ Upstream commit f1c2cd3f8fb959123a9beba18c0e8112dcb2e137 ]

    The ROMC_INDEX/DATA offset was changed to e4/e5 since
    from smuio_v11 (vega20/arcturus).

    Signed-off-by: Hawking Zhang
    Tested-by: Candice Li
    Reviewed-by: Candice Li
    Signed-off-by: Alex Deucher
    Signed-off-by: Sasha Levin

    Hawking Zhang
     
  • [ Upstream commit d5349775c1726ce997b8eb4982cd85a01f1c8b42 ]

    [why]
    nv14 previously inherited soc bb from generic dcn 2, did not match
    watermark values according to memory team

    [how]
    add nv14 specific soc bb: copy nv2 generic that it was
    using from before, but changed num channels to 8

    Signed-off-by: Martin Leung
    Reviewed-by: Jun Lei
    Acked-by: Rodrigo Siqueira
    Signed-off-by: Alex Deucher
    Signed-off-by: Sasha Levin

    Martin Leung
     
  • [ Upstream commit b281f7b93b258ce1419043bbd898a29254d5c9c7 ]

    Detect the presence of the A050385 erratum.

    Signed-off-by: Madalin Bucur
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin

    Madalin Bucur