1. 21 Oct, 2021 1 commit
    • Yang Yingliang's avatar
      iio: buffer: Fix memory leak in iio_buffers_alloc_sysfs_and_mask() · 486a2508
      Yang Yingliang authored
      When 'iio_dev_opaque->buffer_ioctl_handler' alloc fails in
      iio_buffers_alloc_sysfs_and_mask(), the 'attrs' allocated in
      iio_buffer_register_legacy_sysfs_groups() will be leaked:
      
      unreferenced object 0xffff888108568d00 (size 128):
        comm "88", pid 2014, jiffies 4294963294 (age 26.920s)
        hex dump (first 32 bytes):
          80 3e da 02 80 88 ff ff 00 3a da 02 80 88 ff ff  .>.......:......
          00 35 da 02 80 88 ff ff 00 38 da 02 80 88 ff ff  .5.......8......
        backtrace:
          [<0000000095a9e51e>] __kmalloc+0x1a3/0x2f0
          [<00000000faa3735e>] iio_buffers_alloc_sysfs_and_mask+0xfa3/0x1480 [industrialio]
          [<00000000a46384dc>] __iio_device_register+0x52e/0x1b40 [industrialio]
          [<00000000210af05e>] __devm_iio_device_register+0x22/0x80 [industrialio]
          [<00000000730d7b41>] adjd_s311_probe+0x195/0x200 [adjd_s311]
          [<00000000c0f70eb9>] i2c_device_probe+0xa07/0xbb0
      
      The iio_buffer_register_legacy_sysfs_groups() is
      called in __iio_buffer_alloc_sysfs_and_mask(),
      so move the iio_buffer_unregister_legacy_sysfs_groups()
      into __iio_buffer_free_sysfs_and_mask(), then the memory
      will be freed.
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Fixes: d9a62574 ("iio: core: merge buffer/ & scan_elements/ attributes")
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Link: https://lore.kernel.org/r/20211018063718.1971240-1-yangyingliang@huawei.com
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      486a2508
  2. 17 Oct, 2021 8 commits
  3. 07 Oct, 2021 3 commits
  4. 05 Oct, 2021 3 commits
    • Dan Carpenter's avatar
      staging: r8188eu: prevent array underflow in rtw_hal_update_ra_mask() · 37f12202
      Dan Carpenter authored
      The problem is that "mac_id" is a u32 so this check for underflow does
      not work when "mac_id" is zero.  In that situation, "mac_id - 1" is
      UINT_MAX instead of -1 so the condition is true.  It leads to an
      array underflow on the next line.
      
      Fixes: 8cd574e6 ("staging: r8188eu: introduce new hal dir for RTL8188eu driver")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Link: https://lore.kernel.org/r/20210930122604.GB10068@kiliSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      37f12202
    • Arnd Bergmann's avatar
      staging: vc04_services: shut up out-of-range warning · 7ff4034e
      Arnd Bergmann authored
      The comparison against SIZE_MAX produces a harmless warning on 64-bit
      architectures:
      
      drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:185:16: error: result of comparison of constant 419244183493398898 with expression of type 'unsigned int' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
              if (num_pages > (SIZE_MAX - sizeof(struct pagelist) -
                  ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Shut up that warning by adding a cast to a longer type.
      
      Fixes: ca641bae ("staging: vc04_services: prevent integer overflow in create_pagelist()")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20210927113702.3866843-1-arnd@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7ff4034e
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-fixes-for-5.15a' of... · 85a87780
      Greg Kroah-Hartman authored
      Merge tag 'iio-fixes-for-5.15a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
      
      Jonathan writes:
      
      1st set of IIO fixes for the 5.15 cycle
      
      Usual mixed back of minor bug fixes.
      
      adi,ad7192, ad7780, ad7793
      * Fix incorrect IRQ_FLAG types.  As the IRQ line is shared with the data
        line we can be sure of the polarity and edge like nature. They were
        previously either left unspecified or as level interrupts which may
        cause problems on power up.
      adi,adis16475
      * Fix a deadlock by calling unlocked function when lock already held. Also
        deal with making sure lock is released correctly.
      adi,adis16480
      * Fix assumption that all devices support sleep mode.
      aspeed,adc
      * Add missing platform_set_drvdata() so we can get the indio_dev in remove
        as was being assumed.
      fsl,fxls8962af
      * Return IRQ_HANDLED on flush rather than a positive 'error' code.
      maxim,max1207
      * Fix a wrong shift on 12-bit devices that will lead to incorrect scale.
      * Fix wrong number of channels on max1X31 devices due to allocating them twice.
      mediatek,mt6577
      * Fix a failure to apply scaling to IIO_CHAN_INFO_PROCESSED
      renesas,rzg2l
      * Fix failure to return -EBUSY on timeout due to ignored error code.
      * Add a missing clk_disable_unprepare() on error in runtime_resume.
      samsung,ssp_spi
      * Fix an error code to always be returned on invalid length.
      * Add some range checking to ensure resilience against bad data leading
        to potential overflow.
      ti,adc128s052
      * Fix an error handling path that leaves regulator on if probe fails.
      ti,dac5571
      * Add missing return value in a switch default.
      ti,opt3001
      * Fix case where sensor returns 0 lux and we were previously accidentally
        returning that this was a timeout.
      
      * tag 'iio-fixes-for-5.15a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
        iio: light: opt3001: Fixed timeout error when 0 lux
        iio: adis16480: fix devices that do not support sleep mode
        iio: mtk-auxadc: fix case IIO_CHAN_INFO_PROCESSED
        iio: adis16475: fix deadlock on frequency set
        iio: ssp_sensors: add more range checking in ssp_parse_dataframe()
        iio: ssp_sensors: fix error code in ssp_print_mcu_debug()
        iio: adc: ad7793: Fix IRQ flag
        iio: adc: ad7780: Fix IRQ flag
        iio: adc: ad7192: Add IRQ flag
        iio: adc: aspeed: set driver data when adc probe.
        iio: adc: rzg2l_adc: add missing clk_disable_unprepare() in rzg2l_adc_pm_runtime_resume()
        iio: adc: max1027: Fix the number of max1X31 channels
        iio: adc: max1027: Fix wrong shift with 12-bit devices
        iio: adc128s052: Fix the error handling path of 'adc128_probe()'
        iio: adc: rzg2l_adc: Fix -EBUSY timeout error return
        iio: accel: fxls8962af: return IRQ_HANDLED when fifo is flushed
        iio: dac: ti-dac5571: fix an error code in probe()
      85a87780
  5. 03 Oct, 2021 1 commit
  6. 26 Sep, 2021 9 commits
  7. 25 Sep, 2021 14 commits
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · a3b397b4
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "16 patches.
      
        Subsystems affected by this patch series: xtensa, sh, ocfs2, scripts,
        lib, and mm (memory-failure, kasan, damon, shmem, tools, pagecache,
        debug, and pagemap)"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        mm: fix uninitialized use in overcommit_policy_handler
        mm/memory_failure: fix the missing pte_unmap() call
        kasan: always respect CONFIG_KASAN_STACK
        sh: pgtable-3level: fix cast to pointer from integer of different size
        mm/debug: sync up latest migrate_reason to migrate_reason_names
        mm/debug: sync up MR_CONTIG_RANGE and MR_LONGTERM_PIN
        mm: fs: invalidate bh_lrus for only cold path
        lib/zlib_inflate/inffast: check config in C to avoid unused function warning
        tools/vm/page-types: remove dependency on opt_file for idle page tracking
        scripts/sorttable: riscv: fix undeclared identifier 'EM_RISCV' error
        ocfs2: drop acl cache for directories too
        mm/shmem.c: fix judgment error in shmem_is_huge()
        xtensa: increase size of gcc stack frame check
        mm/damon: don't use strnlen() with known-bogus source length
        kasan: fix Kconfig check of CC_HAS_WORKING_NOSANITIZE_ADDRESS
        mm, hwpoison: add is_free_buddy_page() in HWPoisonHandlable()
      a3b397b4
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · bb19237b
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Thirty-three fixes, I'm afraid.
      
        Essentially the build up from the last couple of weeks while I've been
        dealling with Linux Plumbers conference infrastructure issues. It's
        mostly the usual assortment of spelling fixes and minor corrections.
      
        The only core relevant changes are to the sd driver to reduce the spin
        up message spew and fix a small memory leak on the freeing path"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (33 commits)
        scsi: ses: Retry failed Send/Receive Diagnostic commands
        scsi: target: Fix spelling mistake "CONFLIFT" -> "CONFLICT"
        scsi: lpfc: Fix gcc -Wstringop-overread warning, again
        scsi: lpfc: Use correct scnprintf() limit
        scsi: lpfc: Fix sprintf() overflow in lpfc_display_fpin_wwpn()
        scsi: core: Remove 'current_tag'
        scsi: acornscsi: Remove tagged queuing vestiges
        scsi: fas216: Kill scmd->tag
        scsi: qla2xxx: Restore initiator in dual mode
        scsi: ufs: core: Unbreak the reset handler
        scsi: sd_zbc: Support disks with more than 2**32 logical blocks
        scsi: ufs: core: Revert "scsi: ufs: Synchronize SCSI and UFS error handling"
        scsi: bsg: Fix device unregistration
        scsi: sd: Make sd_spinup_disk() less noisy
        scsi: ufs: ufs-pci: Fix Intel LKF link stability
        scsi: mpt3sas: Clean up some inconsistent indenting
        scsi: megaraid: Clean up some inconsistent indenting
        scsi: sr: Fix spelling mistake "does'nt" -> "doesn't"
        scsi: Remove SCSI CDROM MAINTAINERS entry
        scsi: megaraid: Fix Coccinelle warning
        ...
      bb19237b
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.15-2021-09-25' of git://git.kernel.dk/linux-block · f6f360ae
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "This one looks a bit bigger than it is, but that's mainly because 2/3
        of it is enabling IORING_OP_CLOSE to close direct file descriptors.
      
        We've had a few folks using them and finding it confusing that the way
        to close them is through using -1 for file update, this just brings
        API symmetry for direct descriptors. Hence I think we should just do
        this now and have a better API for 5.15 release. There's some room for
        de-duplicating the close code, but we're leaving that for the next
        merge window.
      
        Outside of that, just small fixes:
      
         - Poll race fixes (Hao)
      
         - io-wq core dump exit fix (me)
      
         - Reschedule around potentially intensive tctx and buffer iterators
           on teardown (me)
      
         - Fix for always ending up punting files update to io-wq (me)
      
         - Put the provided buffer meta data under memcg accounting (me)
      
         - Tweak for io_write(), removing dead code that was added with the
           iterator changes in this release (Pavel)"
      
      * tag 'io_uring-5.15-2021-09-25' of git://git.kernel.dk/linux-block:
        io_uring: make OP_CLOSE consistent with direct open
        io_uring: kill extra checks in io_write()
        io_uring: don't punt files update to io-wq unconditionally
        io_uring: put provided buffer meta data under memcg accounting
        io_uring: allow conditional reschedule for intensive iterators
        io_uring: fix potential req refcount underflow
        io_uring: fix missing set of EPOLLONESHOT for CQ ring overflow
        io_uring: fix race between poll completion and cancel_hash insertion
        io-wq: ensure we exit if thread group is exiting
      f6f360ae
    • Linus Torvalds's avatar
      Merge tag 'block-5.15-2021-09-25' of git://git.kernel.dk/linux-block · 2d70de4e
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request via Christoph:
            - keep ctrl->namespaces ordered (Christoph Hellwig)
            - fix incorrect h2cdata pdu offset accounting in nvme-tcp (Sagi
              Grimberg)
            - handled updated hw_queues in nvme-fc more carefully (Daniel
              Wagner, James Smart)
      
       - md lock order fix (Christoph)
      
       - fallocate locking fix (Ming)
      
       - blktrace UAF fix (Zhihao)
      
       - rq-qos bio tracking fix (Ming)
      
      * tag 'block-5.15-2021-09-25' of git://git.kernel.dk/linux-block:
        block: hold ->invalidate_lock in blkdev_fallocate
        blktrace: Fix uaf in blk_trace access after removing by sysfs
        block: don't call rq_qos_ops->done_bio if the bio isn't tracked
        md: fix a lock order reversal in md_alloc
        nvme: keep ctrl->namespaces ordered
        nvme-tcp: fix incorrect h2cdata pdu offset accounting
        nvme-fc: remove freeze/unfreeze around update_nr_hw_queues
        nvme-fc: avoid race between time out and tear down
        nvme-fc: update hardware queues before using them
      2d70de4e
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.15b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 57398443
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Some minor cleanups and fixes of some theoretical bugs, as well as a
        fix of a bug introduced in 5.15-rc1"
      
      * tag 'for-linus-5.15b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/x86: fix PV trap handling on secondary processors
        xen/balloon: fix balloon kthread freezing
        swiotlb-xen: this is PV-only on x86
        xen/pci-swiotlb: reduce visibility of symbols
        PCI: only build xen-pcifront in PV-enabled environments
        swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests
        Xen/gntdev: don't ignore kernel unmapping error
        xen/x86: drop redundant zeroing from cpu_initialize_context()
      57398443
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-fixes-5.15-rc3' of... · 90316e6e
      Linus Torvalds authored
      Merge tag 'linux-kselftest-fixes-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull Kselftest fixes from Shuah Khan:
      
       - fix to Kselftest common framework header install to run before other
         targets for it work correctly in parallel build case.
      
       - fixes to kvm test to not ignore fscanf() returns which could result
         in inconsistent test behavior and failures.
      
      * tag 'linux-kselftest-fixes-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: kvm: fix get_run_delay() ignoring fscanf() return warn
        selftests: kvm: move get_run_delay() into lib/test_util
        selftests:kvm: fix get_trans_hugepagesz() ignoring fscanf() return warn
        selftests:kvm: fix get_warnings_count() ignoring fscanf() return warn
        selftests: be sure to make khdr before other targets
      90316e6e
    • Linus Torvalds's avatar
      Merge tag 'erofs-for-5.15-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs · a5e0acea
      Linus Torvalds authored
      Pull erofs fixes from Gao Xiang:
       "Two bugfixes to fix the 4KiB blockmap chunk format availability and a
        dangling pointer usage. There is also a trivial cleanup to clarify
        compacted_2b if compacted_4b_initial > totalidx.
      
        Summary:
      
         - fix the dangling pointer use in erofs_lookup tracepoint
      
         - fix unsupported chunk format check
      
         - zero out compacted_2b if compacted_4b_initial > totalidx"
      
      * tag 'erofs-for-5.15-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
        erofs: clear compacted_2b if compacted_4b_initial > totalidx
        erofs: fix misbehavior of unsupported chunk format check
        erofs: fix up erofs_lookup tracepoint
      a5e0acea
    • Linus Torvalds's avatar
      Merge tag '5.15-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · b8f42965
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Six small cifs/smb3 fixes, two for stable:
      
         - important fix for deferred close (found by a git functional test)
           related to attribute caching on close.
      
         - four (two cosmetic, two more serious) small fixes for problems
           pointed out by smatch via Dan Carpenter
      
         - fix for comment formatting problems pointed out by W=1"
      
      * tag '5.15-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix incorrect check for null pointer in header_assemble
        smb3: correct server pointer dereferencing check to be more consistent
        smb3: correct smb3 ACL security descriptor
        cifs: Clear modified attribute bit from inode flags
        cifs: Deal with some warnings from W=1
        cifs: fix a sign extension bug
      b8f42965
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 85736168
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char and misc driver fixes for 5.15-rc3.
      
        Nothing huge in here, just fixes for a number of small issues that
        have been reported. These include:
      
         - habanalabs race conditions and other bugs fixed
      
         - binder driver fixes
      
         - fpga driver fixes
      
         - coresight build warning fix
      
         - nvmem driver fix
      
         - comedi memory leak fix
      
         - bcm-vk tty race fix
      
         - other tiny driver fixes
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'char-misc-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits)
        comedi: Fix memory leak in compat_insnlist()
        nvmem: NVMEM_NINTENDO_OTP should depend on WII
        misc: bcm-vk: fix tty registration race
        fpga: dfl: Avoid reads to AFU CSRs during enumeration
        fpga: machxo2-spi: Fix missing error code in machxo2_write_complete()
        fpga: machxo2-spi: Return an error on failure
        habanalabs: expose a single cs seq in staged submissions
        habanalabs: fix wait offset handling
        habanalabs: rate limit multi CS completion errors
        habanalabs/gaudi: fix LBW RR configuration
        habanalabs: Fix spelling mistake "FEADBACK" -> "FEEDBACK"
        habanalabs: fail collective wait when not supported
        habanalabs/gaudi: use direct MSI in single mode
        habanalabs: fix kernel OOPs related to staged cs
        habanalabs: fix potential race in interrupt wait ioctl
        mcb: fix error handling in mcb_alloc_bus()
        misc: genwqe: Fixes DMA mask setting
        coresight: syscfg: Fix compiler warning
        nvmem: core: Add stubs for nvmem_cell_read_variable_le_u32/64 if !CONFIG_NVMEM
        binder: make sure fd closes complete
        ...
      85736168
    • Linus Torvalds's avatar
      Merge tag 'staging-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 9cbef308
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are two small staging driver fixes for 5.15-rc3:
      
         - greybus tty use-after-free bugfix
      
         - r8188eu ioctl overlap build warning fix
      
        Note, the r8188eu ioctl has been entirely removed for 5.16-rc1, but
        it's good to get this fixed now for people using this in 5.15.
      
        Both of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: r8188eu: fix -Wrestrict warnings
        staging: greybus: uart: fix tty use after free
      9cbef308
    • Linus Torvalds's avatar
      Merge tag 'tty-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · f9d4be25
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are four small tty/serial driver fixes for 5.15-rc3. They
        include:
      
         - remove an export now that no one is using it anymore
      
         - mvebu-uart tx_empty callback fix
      
         - 8250_omap bugfix
      
         - synclink_gt build fix
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'tty-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: unexport tty_ldisc_release
        tty: synclink_gt: rename a conflicting function name
        serial: mvebu-uart: fix driver's tx_empty callback
        serial: 8250: 8250_omap: Fix RX_LVL register offset
      f9d4be25
    • Linus Torvalds's avatar
      Merge tag 'usb-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 2c4e969c
      Linus Torvalds authored
      Pull USB driver fixes from Greg KH:
       "Here are some USB driver fixes and new device ids for 5.15-rc3.
      
        They include:
      
         - usb-storage quirk additions
      
         - usb-serial new device ids
      
         - usb-serial driver fixes
      
         - USB roothub registration bugfix to resolve a long-reported issue
      
         - usb gadget driver fixes for a large number of small things
      
         - dwc2 driver fixes
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'usb-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (28 commits)
        USB: serial: option: add device id for Foxconn T99W265
        USB: serial: cp210x: add ID for GW Instek GDM-834x Digital Multimeter
        USB: serial: cp210x: add part-number debug printk
        USB: serial: cp210x: fix dropped characters with CP2102
        MAINTAINERS: usb, update Peter Korsgaard's entries
        usb: musb: tusb6010: uninitialized data in tusb_fifo_write_unaligned()
        usb-storage: Add quirk for ScanLogic SL11R-IDE older than 2.6c
        Re-enable UAS for LaCie Rugged USB3-FW with fk quirk
        USB: serial: option: remove duplicate USB device ID
        USB: serial: mos7840: remove duplicated 0xac24 device ID
        arm64: dts: qcom: ipq8074: remove USB tx-fifo-resize property
        usb: gadget: f_uac2: Populate SS descriptors' wBytesPerInterval
        usb: gadget: f_uac2: Add missing companion descriptor for feedback EP
        usb: dwc2: gadget: Fix ISOC transfer complete handling for DDMA
        usb: core: hcd: Modularize HCD stop configuration in usb_stop_hcd()
        xhci: Set HCD flag to defer primary roothub registration
        usb: core: hcd: Add support for deferring roothub registration
        usb: dwc2: gadget: Fix ISOC flow for BDMA and Slave
        usb: dwc3: core: balance phy init and exit
        Revert "USB: bcma: Add a check for devm_gpiod_get"
        ...
      2c4e969c
    • Nuno Sá's avatar
      iio: adis16475: fix deadlock on frequency set · 9da1b868
      Nuno Sá authored
      With commit 39c024b5
      ("iio: adis16475: improve sync scale mode handling"), two deadlocks were
      introduced:
       1) The call to 'adis_write_reg_16()' was not changed to it's unlocked
          version.
       2) The lock was not being released on the success path of the function.
      
      This change fixes both these issues.
      
      Fixes: 39c024b5 ("iio: adis16475: improve sync scale mode handling")
      Signed-off-by: default avatarNuno Sá <nuno.sa@analog.com>
      Reviewed-by: default avatarAlexandru Ardelean <ardeleanalex@gmail.com>
      Link: https://lore.kernel.org/r/20210920090047.74903-1-nuno.sa@analog.com
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      9da1b868
    • Hyunchul Lee's avatar
      ksmbd: use LOOKUP_BENEATH to prevent the out of share access · 265fd199
      Hyunchul Lee authored
      instead of removing '..' in a given path, call
      kern_path with LOOKUP_BENEATH flag to prevent
      the out of share access.
      
      ran various test on this:
      smb2-cat-async smb://127.0.0.1/homes/../out_of_share
      smb2-cat-async smb://127.0.0.1/homes/foo/../../out_of_share
      smbclient //127.0.0.1/homes -c "mkdir ../foo2"
      smbclient //127.0.0.1/homes -c "rename bar ../bar"
      
      Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
      Cc: Ralph Boehme <slow@samba.org>
      Tested-by: default avatarSteve French <smfrench@gmail.com>
      Tested-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
      Acked-by: default avatarNamjae Jeon <linkinjeon@kernel.org>
      Signed-off-by: default avatarHyunchul Lee <hyc.lee@gmail.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      265fd199
  8. 24 Sep, 2021 1 commit