Skip to content
  1. Oct 25, 2023
    • Jinjie Ruan's avatar
      fpga: Fix memory leak for fpga_region_test_class_find() · 28926daf
      Jinjie Ruan authored
      
      
      fpga_region_class_find() in fpga_region_test_class_find() will call
      get_device() if the data is matched, which will increment refcount for
      dev->kobj, so it should call put_device() to decrement refcount for
      dev->kobj to free the region, because fpga_region_unregister() will call
      fpga_region_dev_release() only when the refcount for dev->kobj is zero
      but fpga_region_test_init() call device_register() in
      fpga_region_register_full(), which also increment refcount.
      
      So call put_device() after calling fpga_region_class_find() in
      fpga_region_test_class_find(). After applying this patch, the following
      memory leak is never detected.
      
      unreferenced object 0xffff88810c8ef000 (size 1024):
        comm "kunit_try_catch", pid 1875, jiffies 4294715298 (age 836.836s)
        hex dump (first 32 bytes):
          b8 d1 fb 05 81 88 ff ff 08 f0 8e 0c 81 88 ff ff  ................
          08 f0 8e 0c 81 88 ff ff 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<ffffffff817ebad7>] kmalloc_trace+0x27/0xa0
          [<ffffffffa02385e1>] fpga_region_register_full+0x51/0x430 [fpga_region]
          [<ffffffffa0228e47>] 0xffffffffa0228e47
          [<ffffffff829c479d>] kunit_try_run_case+0xdd/0x250
          [<ffffffff829c9f2a>] kunit_generic_run_threadfn_adapter+0x4a/0x90
          [<ffffffff81238b85>] kthread+0x2b5/0x380
          [<ffffffff81097ded>] ret_from_fork+0x2d/0x70
          [<ffffffff810034d1>] ret_from_fork_asm+0x11/0x20
      unreferenced object 0xffff888105fbd1b8 (size 8):
        comm "kunit_try_catch", pid 1875, jiffies 4294715298 (age 836.836s)
        hex dump (first 8 bytes):
          72 65 67 69 6f 6e 30 00                          region0.
        backtrace:
          [<ffffffff817ec023>] __kmalloc_node_track_caller+0x53/0x150
          [<ffffffff82995590>] kvasprintf+0xb0/0x130
          [<ffffffff83f713b1>] kobject_set_name_vargs+0x41/0x110
          [<ffffffff8304ac1b>] dev_set_name+0xab/0xe0
          [<ffffffffa02388a2>] fpga_region_register_full+0x312/0x430 [fpga_region]
          [<ffffffffa0228e47>] 0xffffffffa0228e47
          [<ffffffff829c479d>] kunit_try_run_case+0xdd/0x250
          [<ffffffff829c9f2a>] kunit_generic_run_threadfn_adapter+0x4a/0x90
          [<ffffffff81238b85>] kthread+0x2b5/0x380
          [<ffffffff81097ded>] ret_from_fork+0x2d/0x70
          [<ffffffff810034d1>] ret_from_fork_asm+0x11/0x20
      unreferenced object 0xffff88810b3b8a00 (size 256):
        comm "kunit_try_catch", pid 1875, jiffies 4294715298 (age 836.836s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 08 8a 3b 0b 81 88 ff ff  ..........;.....
          08 8a 3b 0b 81 88 ff ff e0 ac 04 83 ff ff ff ff  ..;.............
        backtrace:
          [<ffffffff817ebad7>] kmalloc_trace+0x27/0xa0
          [<ffffffff83056d7a>] device_add+0xa2a/0x15e0
          [<ffffffffa02388b1>] fpga_region_register_full+0x321/0x430 [fpga_region]
          [<ffffffffa0228e47>] 0xffffffffa0228e47
          [<ffffffff829c479d>] kunit_try_run_case+0xdd/0x250
          [<ffffffff829c9f2a>] kunit_generic_run_threadfn_adapter+0x4a/0x90
          [<ffffffff81238b85>] kthread+0x2b5/0x380
          [<ffffffff81097ded>] ret_from_fork+0x2d/0x70
          [<ffffffff810034d1>] ret_from_fork_asm+0x11/0x20
      
      Fixes: 64a5f972 ("fpga: add an initial KUnit suite for the FPGA Region")
      Signed-off-by: default avatarJinjie Ruan <ruanjinjie@huawei.com>
      Reviewed-by: default avatarMarco Pagani <marpagan@redhat.com>
      Acked-by: default avatarXu Yilun <yilun.xu@intel.com>
      Link: https://lore.kernel.org/r/20231007094321.3447084-1-ruanjinjie@huawei.com
      
      
      [yilun.xu@intel.com: slightly changes the commit message]
      Signed-off-by: default avatarXu Yilun <yilun.xu@linux.intel.com>
      Link: https://lore.kernel.org/r/20231023032857.902699-3-yilun.xu@linux.intel.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      28926daf
    • Russ Weight's avatar
      fpga: m10bmc-sec: Change contact for secure update driver · 1e55c520
      Russ Weight authored
      
      
      Change the maintainer for the Intel MAX10 BMC Secure Update driver from
      Russ Weight to Peter Colberg. Update the ABI documentation contact
      information as well.
      
      Signed-off-by: default avatarRuss Weight <russell.h.weight@intel.com>
      Acked-by: default avatarPeter Colberg <peter.colberg@intel.com>
      Link: https://lore.kernel.org/r/20230928164753.278684-1-russell.h.weight@intel.com
      
      
      Signed-off-by: default avatarXu Yilun <yilun.xu@linux.intel.com>
      Link: https://lore.kernel.org/r/20231023032857.902699-2-yilun.xu@linux.intel.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1e55c520
  2. Oct 21, 2023
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-fixes-for-6.6b' of... · 3e4a7afd
      Greg Kroah-Hartman authored
      Merge tag 'iio-fixes-for-6.6b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus
      
      Jonathan writes:
      
      2nd set of IIO fixes for the 6.6 cycle.
      
      Note, given timing my expectation is these will be queued for the
      6.7 merge window but they could go quicker if the 6.6 cycle ends up
      being extended.
      
      afe:
        * Allow for channels with offset but no scale.  In this case the scale
          can be assumed to be 1.
      adi,ad74115:
        * Add missing dt-binding constraint on number of reset-gpios.
      samsung,exynos:
        * Don't request touchscreen interrupt if it is not going to be used,
          getting rid of an incorrect resulting warning message.
      xilinx,xadc:
        * Avoid changing preset voltage and themperature thresholds as they
          are typicaly set as part of FPGA image building so should be left
          alone.
        * Fix wrong temperature offset and scale for some devices.
      
      * tag 'iio-fixes-for-6.6b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio:
        iio: afe: rescale: Accept only offset channels
        iio: exynos-adc: request second interupt only when touchscreen mode is used
        iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale
        iio: adc: xilinx-xadc: Don't clobber preset voltage/temperature thresholds
        dt-bindings: iio: add missing reset-gpios constrain
      3e4a7afd
    • Marco Pagani's avatar
      fpga: disable KUnit test suites when module support is enabled · a3fad2e9
      Marco Pagani authored
      
      
      The fpga core currently assumes that all manager, bridge, and region
      devices have a parent device associated with a driver that can be used
      to take the module's refcount. This behavior causes the fpga test suites
      to crash with a null-ptr-deref since parent fake devices do not have a
      driver. This patch disables all fpga KUnit test suites when loadable
      module support is enabled until the fpga core is fixed. Test suites
      can still be run using the KUnit default UML kernel.
      
      Signed-off-by: default avatarMarco Pagani <marpagan@redhat.com>
      Acked-by: default avatarXu Yilun <yilun.xu@intel.com>
      Fixes: ccbc1c30 ("fpga: add an initial KUnit suite for the FPGA Manager")
      Link: https://lore.kernel.org/r/20231018163814.100803-1-marpagan@redhat.com
      
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a3fad2e9
  3. Oct 18, 2023
  4. Oct 17, 2023
  5. Oct 16, 2023
    • Linus Torvalds's avatar
      Linux 6.6-rc6 · 58720809
      Linus Torvalds authored
      58720809
    • Linus Torvalds's avatar
      Revert "x86/smp: Put CPUs into INIT on shutdown if possible" · fbe1bf1e
      Linus Torvalds authored
      This reverts commit 45e34c8a, and the
      two subsequent fixes to it:
      
        3f874c9b ("x86/smp: Don't send INIT to non-present and non-booted CPUs")
        b1472a60 ("x86/smp: Don't send INIT to boot CPU")
      
      because it seems to result in hung machines at shutdown.  Particularly
      some Dell machines, but Thomas says
      
       "The rest seems to be Lenovo and Sony with Alderlake/Raptorlake CPUs -
        at least that's what I could figure out from the various bug reports.
      
        I don't know which CPUs the DELL machines have, so I can't say it's a
        pattern.
      
        I agree with the revert for now"
      
      Ashok Raj chimes in:
      
       "There was a report (probably this same one), and it turns out it was a
        bug in the BIOS SMI handler.
      
        The client BIOS's were waiting for the lowest APICID to be the SMI
        rendevous master. If this is MeteorLake, the BSP wasn't the one with
        the lowest APIC and it triped here.
      
        The BIOS change is also being pushed to others for assimilation :)
      
        Server BIOS's had this correctly for a while now"
      
      and it does look likely to be some bad interaction between SMI and the
      non-BSP cores having put into INIT (and thus unresponsive until reset).
      
      Link: https://bbs.archlinux.org/viewtopic.php?pid=2124429
      Link: https://www.reddit.com/r/openSUSE/comments/16qq99b/tumbleweed_shutdown_did_not_finish_completely/
      Link: https://forum.artixlinux.org/index.php/topic,5997.0.html
      Link: https://bugzilla.redhat.com/show_bug.cgi?id=2241279
      
      
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Ashok Raj <ashok.raj@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fbe1bf1e
    • Xuan Zhuo's avatar
      virtio_net: fix the missing of the dma cpu sync · 5720c43d
      Xuan Zhuo authored
      
      
      Commit 295525e2 ("virtio_net: merge dma operations when filling
      mergeable buffers") unmaps the buffer with DMA_ATTR_SKIP_CPU_SYNC when
      the dma->ref is zero. We do that with DMA_ATTR_SKIP_CPU_SYNC, because we
      do not want to do the sync for the entire page_frag. But that misses the
      sync for the current area.
      
      This patch does cpu sync regardless of whether the ref is zero or not.
      
      Fixes: 295525e2 ("virtio_net: merge dma operations when filling mergeable buffers")
      Reported-by: default avatarMichael Roth <michael.roth@amd.com>
      Closes: http://lore.kernel.org/all/20230926130451.axgodaa6tvwqs3ut@amd.com
      
      
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5720c43d
    • Linus Torvalds's avatar
      Merge tag 'usb-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 11d3f726
      Linus Torvalds authored
      Pull USB / Thunderbolt fixes from Greg KH:
       "Here are some USB and Thunderbolt driver fixes for 6.6-rc6 to resolve
        a number of small reported issues. Included in here are:
      
         - thunderbolt driver fixes
      
         - xhci driver fixes
      
         - cdns3 driver fixes
      
         - musb driver fixes
      
         - a number of typec driver fixes
      
         - a few other small driver fixes
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (22 commits)
        usb: typec: ucsi: Use GET_CAPABILITY attributes data to set power supply scope
        usb: typec: ucsi: Fix missing link removal
        usb: typec: altmodes/displayport: Signal hpd low when exiting mode
        xhci: Preserve RsvdP bits in ERSTBA register correctly
        xhci: Clear EHB bit only at end of interrupt handler
        xhci: track port suspend state correctly in unsuccessful resume cases
        usb: xhci: xhci-ring: Use sysdev for mapping bounce buffer
        usb: typec: ucsi: Clear EVENT_PENDING bit if ucsi_send_command fails
        usb: misc: onboard_hub: add support for Microchip USB2412 USB 2.0 hub
        usb: gadget: udc-xilinx: replace memcpy with memcpy_toio
        usb: cdns3: Modify the return value of cdns_set_active () to void when CONFIG_PM_SLEEP is disabled
        usb: dwc3: Soft reset phy on probe for host
        usb: hub: Guard against accesses to uninitialized BOS descriptors
        usb: typec: qcom: Update the logic of regulator enable and disable
        usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call
        usb: musb: Get the musb_qh poniter after musb_giveback
        usb: musb: Modify the "HWVers" register address
        usb: cdnsp: Fixes issue with dequeuing not queued requests
        thunderbolt: Restart XDomain discovery handshake after failure
        thunderbolt: Correct TMU mode initialization from hardware
        ...
      11d3f726
    • Linus Torvalds's avatar
      Merge tag 'tty-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 41226a36
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small tty/serial driver fixes for 6.6-rc6 that resolve
        some reported issues. Included in here are:
      
         - serial core pm runtime fix for issue reported by many
      
         - 8250_omap driver fix
      
         - rs485 spinlock fix for reported problem
      
         - ams-delta bugfix for previous tty api changes in -rc1 that missed
           this driver that never seems to get built in any test systems
      
        All of these have been in linux-next for over a week with no reported
        problems"
      
      * tag 'tty-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        ASoC: ti: ams-delta: Fix cx81801_receive() argument types
        serial: core: Fix checks for tx runtime PM state
        serial: 8250_omap: Fix errors with no_console_suspend
        serial: Reduce spinlocked portion of uart_rs485_config()
      41226a36
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · a477e3a7
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here is a small set of char/misc and other smaller driver subsystem
        fixes for 6.6-rc6. Included in here are:
      
         - lots of iio driver fixes
      
         - binder memory leak fix
      
         - mcb driver fixes
      
         - counter driver fixes
      
         - firmware loader documentation fix
      
         - documentation update for embargoed hardware issues
      
        All of these have been in linux-next for over a week with no reported
        issues"
      
      * tag 'char-misc-6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (22 commits)
        iio: pressure: ms5611: ms5611_prom_is_valid false negative bug
        dt-bindings: iio: adc: adi,ad7292: Fix additionalProperties on channel nodes
        iio: adc: ad7192: Correct reference voltage
        iio: light: vcnl4000: Don't power on/off chip in config
        iio: addac: Kconfig: update ad74413r selections
        iio: pressure: dps310: Adjust Timeout Settings
        iio: imu: bno055: Fix missing Kconfig dependencies
        iio: adc: imx8qxp: Fix address for command buffer registers
        iio: cros_ec: fix an use-after-free in cros_ec_sensors_push_data()
        iio: irsd200: fix -Warray-bounds bug in irsd200_trigger_handler
        dt-bindings: iio: rohm,bu27010: add missing vdd-supply to example
        binder: fix memory leaks of spam and pending work
        firmware_loader: Update contact emails for ABI docs
        Documentation: embargoed-hardware-issues.rst: Clarify prenotifaction
        mcb: remove is_added flag from mcb_device struct
        coresight: tmc-etr: Disable warnings for allocation failures
        coresight: Fix run time warnings while reusing ETR buffer
        iio: admv1013: add mixer_vgate corner cases
        iio: pressure: bmp280: Fix NULL pointer exception
        iio: dac: ad3552r: Correct device IDs
        ...
      a477e3a7
  6. Oct 15, 2023
  7. Oct 14, 2023