I'm announcing the release of the 6.1.104 kernel.
All users of the 6.1 kernel series must upgrade.
The updated 6.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2
arch/arm64/boot/dts/qcom/msm8998.dtsi | 36 +---
arch/arm64/include/asm/jump_label.h | 1
arch/arm64/kernel/jump_label.c | 11 +
arch/mips/boot/dts/loongson/loongson64-2k1000.dtsi | 84 +++++++---
arch/riscv/mm/fault.c | 17 +-
drivers/cpufreq/qcom-cpufreq-nvmem.c | 56 +++----
drivers/gpu/drm/i915/display/intel_dp_link_training.c | 54 ++++++
drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 6
drivers/gpu/drm/i915/display/intel_hdcp_regs.h | 2
drivers/gpu/drm/nouveau/nouveau_prime.c | 3
drivers/gpu/drm/udl/Makefile | 2
drivers/gpu/drm/udl/udl_connector.c | 139 ------------------
drivers/gpu/drm/udl/udl_connector.h | 15 -
drivers/gpu/drm/udl/udl_drv.h | 11 +
drivers/gpu/drm/udl/udl_modeset.c | 135 +++++++++++++++++
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 17 --
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 2
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 29 +++
drivers/hid/amd-sfh-hid/amd_sfh_client.c | 55 ++-----
drivers/hid/wacom_wac.c | 3
drivers/leds/led-triggers.c | 32 ++--
drivers/leds/trigger/ledtrig-timer.c | 5
drivers/net/ethernet/intel/ice/ice_txrx.c | 2
drivers/net/ethernet/intel/ice/ice_xsk.c | 19 +-
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 6
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 7
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c | 5
drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c | 2
drivers/net/ethernet/realtek/r8169_main.c | 8 -
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2
drivers/net/usb/sr9700.c | 11 +
drivers/platform/chrome/cros_ec_proto.c | 2
fs/btrfs/block-group.c | 13 +
fs/btrfs/extent-tree.c | 3
fs/btrfs/free-space-cache.c | 4
fs/btrfs/space-info.c | 2
fs/btrfs/space-info.h | 1
fs/ext4/extents.c | 5
fs/ext4/extents_status.c | 14 -
fs/ext4/extents_status.h | 6
fs/ext4/inode.c | 115 ++++++++------
fs/f2fs/segment.c | 4
fs/file.c | 1
fs/proc/proc_sysctl.c | 8 -
include/linux/leds.h | 30 +--
include/linux/sysctl.h | 1
include/trace/events/btrfs.h | 8 +
include/trace/events/mptcp.h | 2
init/Kconfig | 1
ipc/ipc_sysctl.c | 36 ++++
ipc/mq_sysctl.c | 35 ++++
kernel/irq/irqdomain.c | 7
mm/Kconfig | 11 +
mm/page_alloc.c | 19 +-
net/bluetooth/hci_sync.c | 21 ++
net/core/rtnetlink.c | 2
net/ipv4/netfilter/iptable_nat.c | 18 +-
net/ipv6/ndisc.c | 34 ++--
net/ipv6/netfilter/ip6table_nat.c | 14 +
net/iucv/af_iucv.c | 4
net/mptcp/options.c | 2
net/mptcp/pm_netlink.c | 28 ++-
net/mptcp/protocol.c | 18 +-
net/mptcp/protocol.h | 1
net/mptcp/subflow.c | 17 +-
net/netfilter/ipset/ip_set_list_set.c | 3
net/sched/act_ct.c | 4
net/sysctl_net.c | 1
sound/firewire/amdtp-stream.c | 38 +++-
sound/firewire/amdtp-stream.h | 1
sound/pci/hda/hda_controller.h | 2
sound/pci/hda/hda_intel.c | 10 +
sound/pci/hda/patch_conexant.c | 54 +-----
sound/pci/hda/patch_realtek.c | 1
sound/usb/stream.c | 4
tools/testing/selftests/net/mptcp/mptcp_connect.c | 8 -
78 files changed, 812 insertions(+), 582 deletions(-)
Al Viro (1):
protect the fetch of ->fd[fd] in do_dup2() from mispredictions
Alexander Maltsev (1):
netfilter: ipset: Add list flush to cancel_gc
Alexandra Winter (1):
net/iucv: fix use after free in iucv_sock_close()
Alexey Gladkov (2):
sysctl: allow change system v ipc sysctls inside ipc namespace
sysctl: allow to change limits for posix messages queues
Alice Ryhl (1):
rust: SHADOW_CALL_STACK is incompatible with Rust
Andy Chiu (1):
net: axienet: start napi before enabling Rx/Tx
Baokun Li (1):
ext4: make ext4_es_insert_extent() return void
Basavaraj Natikar (3):
HID: amd_sfh: Remove duplicate cleanup
HID: amd_sfh: Split sensor and HID initialization
HID: amd_sfh: Move sensor discovery before HID device initialization
Binbin Zhou (1):
MIPS: Loongson64: DTS: Add RTC support to Loongson-2K1000
Dan Carpenter (1):
net: mvpp2: Don't re-use loop iterator
Danilo Krummrich (1):
drm/nouveau: prime: fix refcount underflow
Dmitry Baryshkov (1):
arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings
Edmund Raile (2):
Revert "ALSA: firewire-lib: obsolete workqueue for period update"
Revert "ALSA: firewire-lib: operate for period elapse event in process context"
Eric Dumazet (1):
sched: act_ct: take care of padding in struct zones_ht_key
Greg Kroah-Hartman (1):
Linux 6.1.104
Hans de Goede (1):
leds: trigger: Call synchronize_rcu() before calling trig->activate()
Heiner Kallweit (3):
leds: trigger: Remove unused function led_trigger_rename_static()
leds: trigger: Store brightness set by led_trigger_event()
r8169: don't increment tx_dropped in case of NETDEV_TX_BUSY
Herve Codina (1):
irqdomain: Fixed unbalanced fwnode get and put
Huang Ying (1):
mm: restrict the pcp batch scale factor to avoid too long latency
Ian Forbes (2):
drm/vmwgfx: Fix overlay when using Screen Targets
drm/vmwgfx: Trigger a modeset when the screen moves
Imre Deak (1):
drm/i915/dp: Don't switch the LTTPR mode on an active link
Jaegeuk Kim (1):
f2fs: assign CURSEG_ALL_DATA_ATGC if blkaddr is valid
Javier Carrasco (1):
cpufreq: qcom-nvmem: fix memory leaks in probe error paths
Jiaxun Yang (3):
MIPS: Loongson64: DTS: Fix PCIe port nodes for ls7a
MIPS: dts: loongson: Fix liointc IRQ polarity
MIPS: dts: loongson: Fix ls2k1000-rtc interrupt
Krishna Kurapati (2):
arm64: dts: qcom: msm8998: Disable SS instance in Parkmode for USB
arm64: dts: qcom: ipq8074: Disable SS instance in Parkmode for USB
Kuniyuki Iwashima (3):
rtnetlink: Don't ignore IFLA_TARGET_NETNSID when ifname is specified in rtnl_dellink().
netfilter: iptables: Fix null-ptr-deref in iptable_nat_table_init().
netfilter: iptables: Fix potential null-ptr-deref in ip6table_nat_table_init().
Li Zhijian (1):
mm/page_alloc: fix pcp->count race between drain_pages_zone() vs __rmqueue_pcplist()
Liu Jing (1):
selftests: mptcp: always close input's FD if opened
Lucas Stach (1):
mm: page_alloc: control latency caused by zone PCP draining
Luiz Augusto von Dentz (1):
Bluetooth: hci_sync: Fix suspending with wrong filter policy
Ma Ke (1):
net: usb: sr9700: fix uninitialized variable use in sr_mdio_read
Maciej Fijalkowski (3):
ice: don't busy wait for Rx queue disable in ice_qp_dis()
ice: replace synchronize_rcu with synchronize_net
ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog
Maciej Żenczykowski (1):
ipv6: fix ndisc_is_useropt() handling for PIO
Mark Bloch (1):
net/mlx5: Lag, don't use the hardcoded value of the first port
Matthieu Baerts (NGI0) (3):
mptcp: sched: check both directions for backup
mptcp: distinguish rcv vs sent backup flag in requests
mptcp: pm: only set request_bkup flag when sending MP_PRIO
Mavroudis Chatzilazaridis (1):
ALSA: hda/realtek: Add quirk for Acer Aspire E5-574G
Michal Kubiak (1):
ice: respect netif readiness in AF_XDP ZC related ndo's
Moshe Shemesh (1):
net/mlx5: Fix missing lock on sync reset reload
Naohiro Aota (1):
btrfs: zoned: fix zone_unusable accounting on making block group read-write again
Nikita Zhandarovich (1):
drm/i915: Fix possible int overflow in skl_ddi_calculate_wrpll()
Paolo Abeni (4):
mptcp: fix user-space PM announced address accounting
mptcp: fix NL PM announced address accounting
mptcp: fix bad RCVPRUNED mib accounting
mptcp: fix duplicate data handling
Patryk Duda (1):
platform/chrome: cros_ec_proto: Lock device when updating MKBP version
Shahar Shitrit (1):
net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys
Stephan Gerhold (1):
cpufreq: qcom-nvmem: Simplify driver data allocation
Suraj Kandpal (1):
drm/i915/hdcp: Fix HDCP2_STREAM_STATUS macro
Takashi Iwai (2):
ALSA: hda: Conditionally use snooping for AMD HDMI
ALSA: usb-audio: Correct surround channels in UAC1 channel map
Tatsunosuke Tobita (1):
HID: wacom: Modify pen IDs
Thomas Weißschuh (3):
sysctl: treewide: drop unused argument ctl_table_root::set_ownership(table)
sysctl: always initialize i_uid/i_gid
leds: triggers: Flush pending brightness before activating trigger
Thomas Zimmermann (6):
drm/udl: Rename struct udl_drm_connector to struct udl_connector
drm/udl: Test pixel limit in mode-config's mode-valid function
drm/udl: Use USB timeout constant when reading EDID
drm/udl: Various improvements to the connector
drm/udl: Move connector to modesetting code
drm/udl: Remove DRM_CONNECTOR_POLL_HPD
Will Deacon (1):
arm64: jump_label: Ensure patched jump_labels are visible to all CPUs
Yangtao Li (1):
cpufreq: qcom-nvmem: Convert to platform remove callback returning void
Zack Rusin (1):
drm/vmwgfx: Fix a deadlock in dma buf fence polling
Zhang Yi (4):
ext4: refactor ext4_da_map_blocks()
ext4: convert to exclusive lock while inserting delalloc extents
ext4: factor out a common helper to query extent map
ext4: check the extent status again before inserting delalloc block
Zhe Qiao (1):
riscv/mm: Add handling for VM_FAULT_SIGSEGV in mm_fault_error()
Zhiguo Niu (1):
f2fs: fix to avoid use SSR allocate when do defragment
songxiebing (1):
ALSA: hda: conexant: Fix headset auto detect fail in the polling mode
From: Mitchell Levy <levymitchell0(a)gmail.com>
When computing which xfeatures are available, make sure that LBR is only
present if both LBR is supported in general, as well as by XSAVES.
There are two distinct CPU features related to the use of XSAVES as it
applies to LBR: whether LBR is itself supported (strictly speaking, I'm
not sure that this is necessary to check though it's certainly a good
sanity check), and whether XSAVES supports LBR (see sections 13.2 and
13.5.12 of the Intel 64 and IA-32 Architectures Software Developer's
Manual, Volume 1). Currently, the LBR subsystem correctly checks both
(see intel_pmu_arch_lbr_init), however the xstate initialization
subsystem does not.
When calculating what value to place in the IA32_XSS MSR,
xfeatures_mask_independent only checks whether LBR support is present,
not whether XSAVES supports LBR. If XSAVES does not support LBR, this
write causes #GP, leaving the state of IA32_XSS unchanged (i.e., set to
zero, as its not written with other values, and its default value is
zero out of RESET per section 13.3 of the arch manual).
Then, the next time XRSTORS is used to restore supervisor state, it will
fail with #GP (because the RFBM has zero for all supervisor features,
which does not match the XCOMP_BV field). In particular,
XFEATURE_MASK_FPSTATE includes supervisor features, so setting up the FPU
will cause a #GP. This results in a call to fpu_reset_from_exception_fixup,
which by the same process results in another #GP. Eventually this causes
the kernel to run out of stack space and #DF.
Fixes: f0dccc9da4c0 ("x86/fpu/xstate: Support dynamic supervisor feature for LBR")
Cc: stable(a)vger.kernel.org
Signed-off-by: Mitchell Levy <levymitchell0(a)gmail.com>
---
Changes in v2:
- Corrected Fixes tag (thanks tglx)
- Properly check for XSAVES support of LBR (thanks tglx)
- Link to v1: https://lore.kernel.org/r/20240808-xsave-lbr-fix-v1-1-a223806c83e7@gmail.com
---
arch/x86/include/asm/fpu/types.h | 7 +++++++
arch/x86/kernel/fpu/xstate.c | 3 +++
arch/x86/kernel/fpu/xstate.h | 4 ++--
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/fpu/types.h b/arch/x86/include/asm/fpu/types.h
index eb17f31b06d2..de16862bf230 100644
--- a/arch/x86/include/asm/fpu/types.h
+++ b/arch/x86/include/asm/fpu/types.h
@@ -591,6 +591,13 @@ struct fpu_state_config {
* even without XSAVE support, i.e. legacy features FP + SSE
*/
u64 legacy_features;
+ /*
+ * @independent_features:
+ *
+ * Features that are supported by XSAVES, but not managed as part of
+ * the FPU core, such as LBR
+ */
+ u64 independent_features;
};
/* FPU state configuration information */
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
index c5a026fee5e0..1339f8328db5 100644
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@ -788,6 +788,9 @@ void __init fpu__init_system_xstate(unsigned int legacy_size)
goto out_disable;
}
+ fpu_kernel_cfg.independent_features = fpu_kernel_cfg.max_features &
+ XFEATURE_MASK_INDEPENDENT;
+
/*
* Clear XSAVE features that are disabled in the normal CPUID.
*/
diff --git a/arch/x86/kernel/fpu/xstate.h b/arch/x86/kernel/fpu/xstate.h
index 2ee0b9c53dcc..afb404cd2059 100644
--- a/arch/x86/kernel/fpu/xstate.h
+++ b/arch/x86/kernel/fpu/xstate.h
@@ -62,9 +62,9 @@ static inline u64 xfeatures_mask_supervisor(void)
static inline u64 xfeatures_mask_independent(void)
{
if (!cpu_feature_enabled(X86_FEATURE_ARCH_LBR))
- return XFEATURE_MASK_INDEPENDENT & ~XFEATURE_MASK_LBR;
+ return fpu_kernel_cfg.independent_features & ~XFEATURE_MASK_LBR;
- return XFEATURE_MASK_INDEPENDENT;
+ return fpu_kernel_cfg.independent_features;
}
/* XSAVE/XRSTOR wrapper functions */
---
base-commit: de9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed
change-id: 20240807-xsave-lbr-fix-02d52f641653
Best regards,
--
Mitchell Levy <levymitchell0(a)gmail.com>
Zero and negative number is not a valid IRQ for in-kernel code and the
irq_of_parse_and_map() function returns zero on error. So this check for
valid IRQs should only accept values > 0.
Cc: stable(a)vger.kernel.org
Fixes: 2d9e31b9412c ("dmaengine: moxart: remove NO_IRQ")
Signed-off-by: Ma Ke <make24(a)iscas.ac.cn>
---
drivers/dma/moxart-dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/moxart-dma.c b/drivers/dma/moxart-dma.c
index 66dc6d31b603..16dd3c5aba4d 100644
--- a/drivers/dma/moxart-dma.c
+++ b/drivers/dma/moxart-dma.c
@@ -568,7 +568,7 @@ static int moxart_probe(struct platform_device *pdev)
return -ENOMEM;
irq = irq_of_parse_and_map(node, 0);
- if (!irq) {
+ if (irq <= 0) {
dev_err(dev, "no IRQ resource\n");
return -EINVAL;
}
--
2.25.1
Increase the frequency of the PWM signal that drives the LED backlight of
the Pinebook Pro's panel, from about 1.35 KHz (which equals to the PWM
period of 740,740 ns), to exactly 8 kHz (which equals to the PWM period of
125,000 ns). Using a higher PWM frequency for the panel backlight, which
reduces the flicker, can only be beneficial to the end users' eyes.
On top of that, increasing the backlight PWM signal frequency reportedly
eliminates the buzzing emitted from the Pinebook Pro's built-in speakers
when certain backlight levels are set, which cause some weird interference
with some of the components of the Pinebook Pro's audio chain.
The old value for the backlight PWM period, i.e. 740,740 ns, is pretty much
an arbitrary value that was selected during the very early bring-up of the
Pinebook Pro, only because that value seemed to minimize horizontal line
distortion on the display, which resulted from the old X.org drivers causing
screen tearing when dragging windows around. That's no longer an issue, so
there are no reasons to stick with the old PWM period value.
The lower and the upper backlight PWM frequency limits for the Pinebook Pro's
panel, according to its datasheet, are 200 Hz and 10 kHz, respectively. [1]
These changes still leave some headroom, which may have some positive effects
on the lifetime expectancy of the panel's backlight LEDs.
[1] https://files.pine64.org/doc/datasheet/PinebookPro/NV140FHM-N49_Rev.P0_2016…
Fixes: 5a65505a6988 ("arm64: dts: rockchip: Add initial support for Pinebook Pro")
Cc: stable(a)vger.kernel.org
Reported-by: Nikola Radojevic <nikola(a)radojevic.rs>
Signed-off-by: Dragan Simic <dsimic(a)manjaro.org>
---
arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
index 294eb2de263d..b3f76cc2d6e1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
@@ -32,7 +32,7 @@ chosen {
backlight: edp-backlight {
compatible = "pwm-backlight";
power-supply = <&vcc_12v>;
- pwms = <&pwm0 0 740740 0>;
+ pwms = <&pwm0 0 125000 0>;
};
bat: battery {
From: Johannes Berg <johannes.berg(a)intel.com>
commit ce04abc3fcc62cd5640af981ebfd7c4dc3bded28 upstream.
When userspace sets basic rates, it might send us some rates
list that's empty or consists of invalid values only. We're
currently ignoring invalid values and then may end up with a
rates bitmap that's empty, which later results in a warning.
Reject the call if there were no valid rates.
[ Conflict resolution involved adjusting the patch to accommodate
changes in the function signature of ieee80211_parse_bitrates and
ieee80211_check_rate_mask ]
Signed-off-by: Johannes Berg <johannes.berg(a)intel.com>
Reported-by: syzbot+07bee335584b04e7c2f8(a)syzkaller.appspotmail.com
Tested-by: syzbot+07bee335584b04e7c2f8(a)syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=07bee335584b04e7c2f8
Signed-off-by: Vincenzo Mezzela <vincenzo.mezzela(a)gmail.com>
---
Hi,
please note that a backport of the same patch for v5.15 is available at
[1].
Thanks,
Vincenzo
- [1] https://lore.kernel.org/all/20240727125033.1774143-1-vincenzo.mezzela@gmail…
net/mac80211/cfg.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 2c60fc165801..d121a3b460f4 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2577,6 +2577,17 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
if (!sband)
return -EINVAL;
+ if (params->basic_rates) {
+ if (!ieee80211_parse_bitrates(sdata->vif.bss_conf.chandef.width,
+ wiphy->bands[sband->band],
+ params->basic_rates,
+ params->basic_rates_len,
+ &sdata->vif.bss_conf.basic_rates))
+ return -EINVAL;
+ changed |= BSS_CHANGED_BASIC_RATES;
+ ieee80211_check_rate_mask(&sdata->deflink);
+ }
+
if (params->use_cts_prot >= 0) {
sdata->vif.bss_conf.use_cts_prot = params->use_cts_prot;
changed |= BSS_CHANGED_ERP_CTS_PROT;
@@ -2600,16 +2611,6 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
changed |= BSS_CHANGED_ERP_SLOT;
}
- if (params->basic_rates) {
- ieee80211_parse_bitrates(sdata->vif.bss_conf.chandef.width,
- wiphy->bands[sband->band],
- params->basic_rates,
- params->basic_rates_len,
- &sdata->vif.bss_conf.basic_rates);
- changed |= BSS_CHANGED_BASIC_RATES;
- ieee80211_check_rate_mask(&sdata->deflink);
- }
-
if (params->ap_isolate >= 0) {
if (params->ap_isolate)
sdata->flags |= IEEE80211_SDATA_DONT_BRIDGE_PACKETS;
--
2.43.0
This patch addresses a reference count handling issue in the
ice_dpll_init_rclk_pins() function. The function calls ice_dpll_get_pins(),
which increments the reference count of the relevant resources. However,
if the condition WARN_ON((!vsi || !vsi->netdev)) is met, the function
currently returns an error without properly releasing the resources
acquired by ice_dpll_get_pins(), leading to a reference count leak.
To resolve this, the patch introduces a goto unregister_pins; statement
when the condition is met, ensuring that the resources are correctly
released and the reference count is decremented before returning the error.
This change prevents potential memory leaks and ensures proper resource
management within the function.
This bug was identified by an experimental static analysis tool developed
by our team. The tool specializes in analyzing reference count operations
and detecting potential issues where resources are not properly managed.
In this case, the tool flagged the missing release operation as a
potential problem, which led to the development of this patch.
Fixes: d7999f5ea64b ("ice: implement dpll interface to control cgu")
Cc: stable(a)vger.kernel.org
Signed-off-by: Gui-Dong Han <hanguidong02(a)outlook.com>
---
drivers/net/ethernet/intel/ice/ice_dpll.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c
index e92be6f130a3..f3f204cae093 100644
--- a/drivers/net/ethernet/intel/ice/ice_dpll.c
+++ b/drivers/net/ethernet/intel/ice/ice_dpll.c
@@ -1641,8 +1641,10 @@ ice_dpll_init_rclk_pins(struct ice_pf *pf, struct ice_dpll_pin *pin,
if (ret)
goto unregister_pins;
}
- if (WARN_ON((!vsi || !vsi->netdev)))
- return -EINVAL;
+ if (WARN_ON((!vsi || !vsi->netdev))) {
+ ret = -EINVAL;
+ goto unregister_pins;
+ }
dpll_netdev_pin_set(vsi->netdev, pf->dplls.rclk.pin);
return 0;
--
2.25.1
From: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
[ Upstream commit 524e057b2d66b61f9b63b6db30467ab7b0bb4796 ]
The Broadcom BCM5760X NIC may be a multi-function device.
While it does not advertise an ACS capability, peer-to-peer transactions
are not possible between the individual functions. So it is ok to treat
them as fully isolated.
Add an ACS quirk for this device so the functions can be in independent
IOMMU groups and attached individually to userspace applications using
VFIO.
[kwilczynski: commit log]
Link: https://lore.kernel.org/linux-pci/20240510204228.73435-1-ajit.khaparde@broa…
Signed-off-by: Ajit Khaparde <ajit.khaparde(a)broadcom.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski(a)kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com>
Reviewed-by: Andy Gospodarek <gospo(a)broadcom.com>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
drivers/pci/quirks.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 60a469bdc7e3e..39c42a1e8d9a3 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4945,6 +4945,10 @@ static const struct pci_dev_acs_enabled {
{ PCI_VENDOR_ID_BROADCOM, 0x1750, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1751, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0x1752, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1760, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1761, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1762, pci_quirk_mf_endpoint_acs },
+ { PCI_VENDOR_ID_BROADCOM, 0x1763, pci_quirk_mf_endpoint_acs },
{ PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs },
/* Amazon Annapurna Labs */
{ PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, pci_quirk_al_acs },
--
2.43.0
This patch addresses an issue with improper reference count handling in the
ice_sriov_set_msix_vec_count() function. Specifically, the function calls
ice_get_vf_by_id(), which increments the reference count of the vf pointer.
If the subsequent call to ice_get_vf_vsi() fails, the function currently
returns an error without decrementing the reference count of the vf
pointer, leading to a reference count leak.
The correct behavior, as implemented in this patch, is to decrement the
reference count using ice_put_vf(vf) before returning an error when vsi
is NULL.
This bug was identified by an experimental static analysis tool developed
by our team. The tool specializes in analyzing reference count operations
and identifying potential mismanagement of reference counts. In this case,
the tool flagged the missing decrement operation as a potential issue,
leading to this patch.
Fixes: 4035c72dc1ba ("ice: reconfig host after changing MSI-X on VF")
Cc: stable(a)vger.kernel.org
Signed-off-by: Gui-Dong Han <hanguidong02(a)outlook.com>
---
drivers/net/ethernet/intel/ice/ice_sriov.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c b/drivers/net/ethernet/intel/ice/ice_sriov.c
index 55ef33208456..eb5030aba9a5 100644
--- a/drivers/net/ethernet/intel/ice/ice_sriov.c
+++ b/drivers/net/ethernet/intel/ice/ice_sriov.c
@@ -1096,8 +1096,10 @@ int ice_sriov_set_msix_vec_count(struct pci_dev *vf_dev, int msix_vec_count)
return -ENOENT;
vsi = ice_get_vf_vsi(vf);
- if (!vsi)
+ if (!vsi) {
+ ice_put_vf(vf);
return -ENOENT;
+ }
prev_msix = vf->num_msix;
prev_queues = vf->num_vf_qs;
--
2.25.1