1. 20 May, 2021 5 commits
    • Rohith Surabattula's avatar
      Fix KASAN identified use-after-free issue. · 9687c85d
      Rohith Surabattula authored
      [  612.157429] ==================================================================
      [  612.158275] BUG: KASAN: use-after-free in process_one_work+0x90/0x9b0
      [  612.158801] Read of size 8 at addr ffff88810a31ca60 by task kworker/2:9/2382
      
      [  612.159611] CPU: 2 PID: 2382 Comm: kworker/2:9 Tainted: G
      OE     5.13.0-rc2+ #98
      [  612.159623] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
      BIOS 1.14.0-1.fc33 04/01/2014
      [  612.159640] Workqueue:  0x0 (deferredclose)
      [  612.159669] Call Trace:
      [  612.159685]  dump_stack+0xbb/0x107
      [  612.159711]  print_address_description.constprop.0+0x18/0x140
      [  612.159733]  ? process_one_work+0x90/0x9b0
      [  612.159743]  ? process_one_work+0x90/0x9b0
      [  612.159754]  kasan_report.cold+0x7c/0xd8
      [  612.159778]  ? lock_is_held_type+0x80/0x130
      [  612.159789]  ? process_one_work+0x90/0x9b0
      [  612.159812]  kasan_check_range+0x145/0x1a0
      [  612.159834]  process_one_work+0x90/0x9b0
      [  612.159877]  ? pwq_dec_nr_in_flight+0x110/0x110
      [  612.159914]  ? spin_bug+0x90/0x90
      [  612.159967]  worker_thread+0x3b6/0x6c0
      [  612.160023]  ? process_one_work+0x9b0/0x9b0
      [  612.160038]  kthread+0x1dc/0x200
      [  612.160051]  ? kthread_create_worker_on_cpu+0xd0/0xd0
      [  612.160092]  ret_from_fork+0x1f/0x30
      
      [  612.160399] Allocated by task 2358:
      [  612.160757]  kasan_save_stack+0x1b/0x40
      [  612.160768]  __kasan_kmalloc+0x9b/0xd0
      [  612.160778]  cifs_new_fileinfo+0xb0/0x960 [cifs]
      [  612.161170]  cifs_open+0xadf/0xf20 [cifs]
      [  612.161421]  do_dentry_open+0x2aa/0x6b0
      [  612.161432]  path_openat+0xbd9/0xfa0
      [  612.161441]  do_filp_open+0x11d/0x230
      [  612.161450]  do_sys_openat2+0x115/0x240
      [  612.161460]  __x64_sys_openat+0xce/0x140
      
      When mod_delayed_work is called to modify the delay of pending work,
      it might return false and queue a new work when pending work is
      already scheduled or when try to grab pending work failed.
      
      So, Increase the reference count when new work is scheduled to
      avoid use-after-free.
      Signed-off-by: default avatarRohith Surabattula <rohiths@microsoft.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      9687c85d
    • Rohith Surabattula's avatar
      Defer close only when lease is enabled. · 0ab95c25
      Rohith Surabattula authored
      When smb2 lease parameter is disabled on server. Server grants
      batch oplock instead of RHW lease by default on open, inode page cache
      needs to be zapped immediatley upon close as cache is not valid.
      Signed-off-by: default avatarRohith Surabattula <rohiths@microsoft.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      0ab95c25
    • Rohith Surabattula's avatar
      Fix kernel oops when CONFIG_DEBUG_ATOMIC_SLEEP is enabled. · 860b69a9
      Rohith Surabattula authored
      Removed oplock_break_received flag which was added to achieve
      synchronization between oplock handler and open handler by earlier commit.
      
      It is not needed because there is an existing lock open_file_lock to achieve
      the same. find_readable_file takes open_file_lock and then traverses the
      openFileList. Similarly, cifs_oplock_break while closing the deferred
      handle (i.e cifsFileInfo_put) takes open_file_lock and then sends close
      to the server.
      
      Added comments for better readability.
      Signed-off-by: default avatarRohith Surabattula <rohiths@microsoft.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      860b69a9
    • Jiapeng Chong's avatar
      cifs: Fix inconsistent indenting · e83aa352
      Jiapeng Chong authored
      Eliminate the follow smatch warning:
      
      fs/cifs/fs_context.c:1148 smb3_fs_context_parse_param() warn:
      inconsistent indenting.
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      e83aa352
    • Ronnie Sahlberg's avatar
      cifs: fix memory leak in smb2_copychunk_range · d201d763
      Ronnie Sahlberg authored
      When using smb2_copychunk_range() for large ranges we will
      run through several iterations of a loop calling SMB2_ioctl()
      but never actually free the returned buffer except for the final
      iteration.
      This leads to memory leaks everytime a large copychunk is requested.
      
      Fixes: 9bf0c9cd ("CIFS: Fix SMB2/SMB3 Copy offload support (refcopy) for large files")
      Cc: <stable@vger.kernel.org>
      Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
      Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      d201d763
  2. 19 May, 2021 1 commit
  3. 17 May, 2021 1 commit
  4. 16 May, 2021 7 commits
    • Linus Torvalds's avatar
      Linux 5.13-rc2 · d07f6ca9
      Linus Torvalds authored
      d07f6ca9
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.13-rc2' of... · 28183dbf
      Linus Torvalds authored
      Merge tag 'driver-core-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here are two driver fixes for driver core changes that happened in
        5.13-rc1.
      
        The clk driver fix resolves a many-reported issue with booting some
        devices, and the USB typec fix resolves the reported problem of USB
        systems on some embedded boards.
      
        Both of these have been in linux-next this week with no reported
        issues"
      
      * tag 'driver-core-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        clk: Skip clk provider registration when np is NULL
        usb: typec: tcpm: Don't block probing of consumers of "connector" nodes
      28183dbf
    • Linus Torvalds's avatar
      Merge tag 'staging-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 6942d81a
      Linus Torvalds authored
      Pull staging and IIO driver fixes from Greg KH:
       "Here are some small IIO driver fixes and one Staging driver fix for
        5.13-rc2.
      
        Nothing major, just some resolutions for reported problems:
      
         - gcc-11 bogus warning fix for rtl8723bs
      
         - iio driver tiny fixes
      
        All of these have been in linux-next for many days with no reported
        issues"
      
      * tag 'staging-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        iio: tsl2583: Fix division by a zero lux_val
        iio: core: return ENODEV if ioctl is unknown
        iio: core: fix ioctl handlers removal
        iio: gyro: mpu3050: Fix reported temperature value
        iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER
        iio: proximity: pulsedlight: Fix rumtime PM imbalance on error
        iio: light: gp2ap002: Fix rumtime PM imbalance on error
        staging: rtl8723bs: avoid bogus gcc warning
      6942d81a
    • Linus Torvalds's avatar
      Merge tag 'usb-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 4a668429
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 5.13-rc2. They consist of a number
        of resolutions for reported issues:
      
         - typec fixes for found problems
      
         - xhci fixes and quirk additions
      
         - dwc3 driver fixes
      
         - minor fixes found by Coverity
      
         - cdc-wdm fixes for reported problems
      
        All of these have been in linux-next for a few days with no reported
        issues"
      
      * tag 'usb-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (28 commits)
        usb: core: hub: fix race condition about TRSMRCY of resume
        usb: typec: tcpm: Fix SINK_DISCOVERY current limit for Rp-default
        xhci: Add reset resume quirk for AMD xhci controller.
        usb: xhci: Increase timeout for HC halt
        xhci: Do not use GFP_KERNEL in (potentially) atomic context
        xhci: Fix giving back cancelled URBs even if halted endpoint can't reset
        xhci-pci: Allow host runtime PM as default for Intel Alder Lake xHCI
        usb: musb: Fix an error message
        usb: typec: tcpm: Fix wrong handling for Not_Supported in VDM AMS
        usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work
        usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4
        usb: fotg210-hcd: Fix an error message
        docs: usb: function: Modify path name
        usb: dwc3: omap: improve extcon initialization
        usb: typec: ucsi: Put fwnode in any case during ->probe()
        usb: typec: tcpm: Fix wrong handling in GET_SINK_CAP
        usb: dwc2: Remove obsolete MODULE_ constants from platform.c
        usb: dwc3: imx8mp: fix error return code in dwc3_imx8mp_probe()
        usb: dwc3: imx8mp: detect dwc3 core node via compatible string
        usb: dwc3: gadget: Return success always for kick transfer in ep queue
        ...
      4a668429
    • Linus Torvalds's avatar
      Merge tag 'timers-urgent-2021-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8ce36481
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "Two fixes for timers:
      
         - Use the ALARM feature check in the alarmtimer core code insted of
           the old method of checking for the set_alarm() callback.
      
           Drivers can have that callback set but the feature bit cleared. If
           such a RTC device is selected then alarms wont work.
      
         - Use a proper define to let the preprocessor check whether Hyper-V
           VDSO clocksource should be active.
      
           The code used a constant in an enum with #ifdef, which evaluates to
           always false and disabled the clocksource for VDSO"
      
      * tag 'timers-urgent-2021-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86
        alarmtimer: Check RTC features instead of ops
      8ce36481
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · f44e58bb
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - two patches for error path fixes
      
       - a small series for fixing a regression with swiotlb with Xen on Arm
      
      * tag 'for-linus-5.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/swiotlb: check if the swiotlb has already been initialized
        arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required
        xen/arm: move xen_swiotlb_detect to arm/swiotlb-xen.h
        xen/unpopulated-alloc: fix error return code in fill_list()
        xen/gntdev: fix gntdev_mmap() error exit path
      f44e58bb
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.13_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ccb013c2
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
       "The three SEV commits are not really urgent material. But we figured
        since getting them in now will avoid a huge amount of conflicts
        between future SEV changes touching tip, the kvm and probably other
        trees, sending them to you now would be best.
      
        The idea is that the tip, kvm etc branches for 5.14 will all base
        ontop of -rc2 and thus everything will be peachy. What is more, those
        changes are purely mechanical and defines movement so they should be
        fine to go now (famous last words).
      
        Summary:
      
         - Enable -Wundef for the compressed kernel build stage
      
         - Reorganize SEV code to streamline and simplify future development"
      
      * tag 'x86_urgent_for_v5.13_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot/compressed: Enable -Wundef
        x86/msr: Rename MSR_K8_SYSCFG to MSR_AMD64_SYSCFG
        x86/sev: Move GHCB MSR protocol and NAE definitions in a common header
        x86/sev-es: Rename sev-es.{ch} to sev.{ch}
      ccb013c2
  5. 15 May, 2021 26 commits