Linux 6.1.155
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.1.155 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/arm/mm/pageattr.c | 6 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 arch/s390/kernel/perf_cpum_cf.c | 4 arch/um/drivers/mconsole_user.c | 2 arch/x86/mm/pgtable.c | 2 drivers/cpufreq/cpufreq.c | 20 drivers/edac/sb_edac.c | 4 drivers/edac/skx_common.h | 1 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c | 2 drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h | 14 drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 3 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 3 drivers/gpu/drm/arm/display/include/malidp_utils.h | 2 drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c | 24 drivers/gpu/drm/ast/ast_dp.c | 2 drivers/gpu/drm/drm_color_mgmt.c | 2 drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 drivers/gpu/drm/i915/display/intel_backlight.c | 5 drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 drivers/gpu/drm/radeon/evergreen_cs.c | 2 drivers/hwmon/adt7475.c | 24 drivers/infiniband/hw/mlx5/devx.c | 1 drivers/md/dm-integrity.c | 2 drivers/media/dvb-frontends/stv0367_priv.h | 3 drivers/net/can/rcar/rcar_can.c | 8 drivers/net/can/spi/hi311x.c | 1 drivers/net/can/sun4i_can.c | 1 drivers/net/can/usb/etas_es58x/es581_4.c | 4 drivers/net/can/usb/etas_es58x/es58x_core.c | 7 drivers/net/can/usb/etas_es58x/es58x_core.h | 8 drivers/net/can/usb/etas_es58x/es58x_fd.c | 4 drivers/net/can/usb/mcba_usb.c | 1 drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 drivers/net/dsa/lantiq_gswip.c | 37 - drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 18 drivers/net/ethernet/intel/i40e/i40e.h | 4 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 25 drivers/net/ethernet/intel/i40e/i40e_main.c | 26 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 110 ++- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 3 drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 3 drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 2 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 drivers/net/fjes/fjes_main.c | 4 drivers/nfc/pn544/i2c.c | 2 drivers/platform/x86/sony-laptop.c | 1 drivers/scsi/isci/init.c | 6 drivers/staging/media/atomisp/pci/hive_isp_css_include/math_support.h | 5 drivers/usb/core/quirks.c | 2 drivers/video/fbdev/core/fbcon.c | 13 drivers/virt/acrn/ioreq.c | 4 fs/afs/server.c | 3 fs/btrfs/misc.h | 2 fs/ext2/balloc.c | 2 fs/ext4/ext4.h | 2 fs/hugetlbfs/inode.c | 10 fs/smb/server/transport_rdma.c | 18 fs/ufs/util.h | 6 include/crypto/if_alg.h | 2 include/linux/minmax.h | 122 +++- include/linux/mm.h | 54 + include/linux/pageblock-flags.h | 2 include/linux/swap.h | 10 include/net/bluetooth/hci_core.h | 21 kernel/bpf/verifier.c | 4 kernel/futex/requeue.c | 6 kernel/trace/preemptirq_delay_test.c | 2 kernel/trace/trace_dynevent.c | 4 lib/btree.c | 1 lib/decompress_unlzma.c | 2 lib/logic_pio.c | 3 mm/gup.c | 28 mm/kmsan/core.c | 10 mm/kmsan/kmsan_test.c | 16 mm/migrate_device.c | 42 - mm/mlock.c | 2 mm/swap.c | 4 mm/zsmalloc.c | 1 net/bluetooth/hci_event.c | 26 net/bluetooth/hci_sync.c | 7 net/ipv4/nexthop.c | 7 net/ipv4/proc.c | 2 net/ipv6/proc.c | 2 net/netfilter/nf_nat_core.c | 6 net/tipc/core.h | 2 net/tipc/link.c | 10 sound/usb/mixer_quirks.c | 295 +++++++++- sound/usb/quirks.c | 24 sound/usb/usbaudio.h | 4 tools/testing/selftests/bpf/progs/get_branch_snapshot.c | 4 tools/testing/selftests/net/fib_nexthops.sh | 12 tools/testing/selftests/seccomp/seccomp_bpf.c | 2 tools/testing/selftests/vm/mremap_test.c | 2 97 files changed, 910 insertions(+), 325 deletions(-)
Alok Tiwari (1):
bnxt_en: correct offset handling for IPv6 destination address
Andy Shevchenko (1):
minmax: deduplicate __unconst_integer_typeof()
Chen Ni (1):
ALSA: usb-audio: Convert comma to semicolon
Christian Loehle (1):
cpufreq: Initialize cpufreq-based invariance before subsys
Cristian Ciocaltea (6):
ALSA: usb-audio: Fix block comments in mixer_quirks
ALSA: usb-audio: Drop unnecessary parentheses in mixer_quirks
ALSA: usb-audio: Avoid multiple assignments in mixer_quirks
ALSA: usb-audio: Simplify NULL comparison in mixer_quirks
ALSA: usb-audio: Remove unneeded wmb() in mixer_quirks
ALSA: usb-audio: Add mixer quirk for Sony DualSense PS5
Cryolitia PukNgae (1):
ALSA: usb-audio: move mixer_quirks' min_mute into common quirk
Dan Carpenter (1):
octeontx2-pf: Fix potential use after free in otx2_tc_add_flow()
David Hildenbrand (2):
mm/gup: revert "mm: gup: fix infinite loop within __get_longterm_locked" mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize()
David Laight (1):
minmax: fix indentation of __cmp_once() and __clamp_once()
Eric Biggers (2):
crypto: af_alg - Fix incorrect boolean values in af_alg_ctx
kmsan: fix out-of-bounds access to shadow memory
Geert Uytterhoeven (1):
can: rcar_can: rcar_can_resume(): fix s2ram with PSCI
Greg Kroah-Hartman (1):
Linux 6.1.155
Guenter Roeck (1):
drm/i915/backlight: Return immediately when scale() finds invalid parameters
Herve Codina (1):
minmax: Introduce {min,max}_array()
Hugh Dickins (3):
mm/gup: check ref_count instead of lru before migration mm/gup: local lru_add_drain() to avoid lru_add_drain_all()
mm: folio_may_be_lru_cached() unless folio_test_large()
Ido Schimmel (2):
nexthop: Forbid FDB status change while nexthop is in a group
selftests: fib_nexthops: Fix creation of non-FDB nexthops
Jiayi Li (1):
usb: core: Add 0x prefix to quirks debug output
Jinjiang Tu (1):
mm/hugetlb: fix folio is still mapped when deleted
Justin Bronder (1):
i40e: increase max descriptors for XL710
Kefeng Wang (1):
mm: migrate_device: use more folio in migrate_device_finalize()
Leon Hwang (1):
bpf: Reject bpf_timer for PREEMPT_RT
Linus Torvalds (4):
minmax: avoid overly complicated constant expressions in VM code
minmax: make generic MIN() and MAX() macros available everywhere
minmax: add a few more MIN_T/MAX_T users
minmax: simplify and clarify min_t()/max_t() implementation
Luiz Augusto von Dentz (2):
Bluetooth: hci_sync: Fix hci_resume_advertising_sync
Bluetooth: hci_event: Fix UAF in hci_acl_create_conn_sync
Lukasz Czapnik (8):
i40e: fix idx validation in i40e_validate_queue_map
i40e: fix input validation logic for action_meta
i40e: add max boundary check for VF filters
i40e: add mask to apply valid bits for itr_idx
i40e: improve VF MAC filters accounting
i40e: fix validation of VF state in get resources
i40e: fix idx validation in config queues msg
i40e: add validation for ring_len param
Martin Schiller (1):
net: dsa: lantiq_gswip: do also enable or disable cpu port
Masami Hiramatsu (Google) (1):
tracing: dynevent: Add a missing lockdown check on dynevent
Matthew Wilcox (Oracle) (1):
minmax: add in_range() macro
Nathan Chancellor (1):
s390/cpum_cf: Fix uninitialized warning after backport of ce971233242b
Nirmoy Das (1):
drm/ast: Use msleep instead of mdelay for edid read
Or Har-Toov (1):
IB/mlx5: Fix obj_type mismatch for SRQ event subscriptions
Peng Fan (1):
arm64: dts: imx8mp: Correct thermal sensor index
Petr Malat (1):
ethernet: rvu-af: Remove slash from the driver name
Samasth Norway Ananda (1):
fbcon: fix integer overflow in fbcon_do_set_font
Sebastian Andrzej Siewior (1):
futex: Prevent use-after-free during requeue-PI
Shivank Garg (1):
mm: add folio_expected_ref_count() for reference count calculation
Stefan Metzmacher (1):
smb: server: don't use delayed_work for post_recv_credits_work
Stéphane Grosjean (1):
can: peak_usb: fix shift-out-of-bounds issue
Takashi Iwai (1):
ALSA: usb-audio: Fix build with CONFIG_INPUT=n
Thomas Zimmermann (1):
fbcon: Fix OOB access in font allocation
Vincent Mailhol (5):
can: etas_es58x: sort the includes by alphabetic order
can: etas_es58x: populate ndo_change_mtu() to prevent buffer overflow
can: hi311x: populate ndo_change_mtu() to prevent buffer overflow
can: sun4i_can: populate ndo_change_mtu() to prevent buffer overflow
can: mcba_usb: populate ndo_change_mtu() to prevent buffer overflow
Vladimir Oltean (2):
net: dsa: lantiq_gswip: move gswip_add_single_port_br() call to port_setup()
net: dsa: lantiq_gswip: suppress -EINVAL errors for bridge FDB entries added to the CPU port
Zabelin Nikita (1):
drm/gma500: Fix null dereference in hdmi teardown
Zhen Ni (1):
afs: Fix potential null pointer dereference in afs_put_server
noble.yang (1):
ALSA: usb-audio: Add DSD support for Comtrue USB Audio device
qaqland (1):
ALSA: usb-audio: Add mute TLV for playback volumes on more devices
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 1 -SUBLEVEL = 154 +SUBLEVEL = 155 EXTRAVERSION = NAME = Curry Ramen
arch/arm/mm/pageattr.c +3 -3
@@ -25,7 +25,7 @@ static int change_page_range(pte_t *ptep, unsigned long addr, void *data)return 0 ; } -static bool in_range (unsigned long start,unsigned long size, +static bool range_in_range (unsigned long start,unsigned long size,unsigned long range_start,unsigned long range_end) { return start >= range_start && start < range_end &&
@@ -63,8 +63,8 @@ static int change_memory_common(unsigned long addr, int numpages,if (!size)return 0 ; -if (!in_range (start, size,MODULES_VADDR ,MODULES_END ) && - !in_range (start, size,VMALLOC_START ,VMALLOC_END )) +if (!range_in_range (start, size,MODULES_VADDR ,MODULES_END ) && + !range_in_range (start, size,VMALLOC_START ,VMALLOC_END ))return -EINVAL ;return __change_memory_common (start, size, set_mask, clear_mask);
arch/arm64/boot/dts/freescale/imx8mp.dtsi +2 -2
@@ -227,7 +227,7 @@ thermal-zones { cpu-thermal { polling-delay-passive = <250>; polling-delay = <2000>; - thermal-sensors = <&tmu 0>; + thermal-sensors = <&tmu 1>; trips { cpu_alert0: trip0 { temperature = <85000>;
@@ -257,7 +257,7 @@ map0 { soc-thermal { polling-delay-passive = <250>; polling-delay = <2000>; - thermal-sensors = <&tmu 1>; + thermal-sensors = <&tmu 0>; trips { soc_alert0: trip0 { temperature = <85000>;
arch/s390/kernel/perf_cpum_cf.c +1 -3
@@ -552,15 +552,13 @@ static int cpumf_pmu_event_type(struct perf_event *event)static int cpumf_pmu_event_init (struct perf_event *event) {unsigned int type = event->attr.type; -int err; +int err = -ENOENT ;if (type ==PERF_TYPE_HARDWARE || type ==PERF_TYPE_RAW ) err =__hw_perf_event_init (event, type);else if (event->pmu->type == type)/* Registered as unknown PMU */ err =__hw_perf_event_init (event,cpumf_pmu_event_type (event)); -else -return -ENOENT ;if (unlikely (err) && event->destroy) event->destroy (event);
arch/um/drivers/mconsole_user.c +2 -0
@@ -71,7 +71,9 @@ static struct mconsole_command *mconsole_parse(struct mc_request *req)return NULL ; } +#ifndef MIN #define MIN (a,b) ((a)<(b) ? (a):(b)) +#endif #define STRINGX (x) #x#define STRING (x) STRINGX(x)
arch/x86/mm/pgtable.c +1 -1
@@ -107,7 +107,7 @@ static inline void pgd_list_del(pgd_t *pgd)#define UNSHARED_PTRS_PER_PGD \ (SHARED_KERNEL_PMD ? KERNEL_PGD_BOUNDARY : PTRS_PER_PGD)#define MAX_UNSHARED_PTRS_PER_PGD \ - max_t(size_t, KERNEL_PGD_BOUNDARY, PTRS_PER_PGD) + MAX_T(size_t, KERNEL_PGD_BOUNDARY, PTRS_PER_PGD)static void pgd_set_mm (pgd_t *pgd,struct mm_struct *mm)
drivers/cpufreq/cpufreq.c +11 -9
@@ -2894,6 +2894,15 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) goto err_null_driver; } +/* +* Mark support for the scheduler's frequency invariance engine for +* drivers that implement target(), target_index() or fast_switch(). +*/ +if (!cpufreq_driver->setpolicy) { +static_branch_enable_cpuslocked (&cpufreq_freq_invariance); +pr_debug ("cpufreq: supports frequency invariance\n" ); + } + ret =subsys_interface_register (&cpufreq_interface);if (ret) goto err_boost_unreg;
@@ -2915,21 +2924,14 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) hp_online = ret; ret =0 ; -/* -* Mark support for the scheduler's frequency invariance engine for -* drivers that implement target(), target_index() or fast_switch(). -*/ -if (!cpufreq_driver->setpolicy) { -static_branch_enable_cpuslocked (&cpufreq_freq_invariance); -pr_debug ("supports frequency invariance" ); - } -pr_debug ("driver %s up and running\n" , driver_data->name); goto out; err_if_unreg:subsys_interface_unregister (&cpufreq_interface); err_boost_unreg: +if (!cpufreq_driver->setpolicy) +static_branch_disable_cpuslocked (&cpufreq_freq_invariance);remove_boost_sysfs_file (); err_null_driver:write_lock_irqsave (&cpufreq_driver_lock, flags);
drivers/edac/sb_edac.c +2 -2
@@ -109,8 +109,8 @@ static const u32 knl_interleave_list[] = { 0x104, 0x10c, 0x114, 0x11c, /* 20-23 */ };#define MAX_INTERLEAVE \ - (max_t(unsigned int, ARRAY_SIZE(sbridge_interleave_list), \ - max_t(unsigned int, ARRAY_SIZE(ibridge_interleave_list), \ + (MAX_T(unsigned int, ARRAY_SIZE(sbridge_interleave_list), \ + MAX_T(unsigned int, ARRAY_SIZE(ibridge_interleave_list), \ ARRAY_SIZE(knl_interleave_list))))struct interleave_pkg {
drivers/edac/skx_common.h +0 -1
@@ -45,7 +45,6 @@#define I10NM_NUM_CHANNELS MAX(I10NM_NUM_DDR_CHANNELS, I10NM_NUM_HBM_CHANNELS)#define I10NM_NUM_DIMMS MAX(I10NM_NUM_DDR_DIMMS, I10NM_NUM_HBM_DIMMS) -#define MAX (a, b) ((a) > (b) ? (a) : (b))#define NUM_IMC MAX(SKX_NUM_IMC, I10NM_NUM_IMC)#define NUM_CHANNELS MAX(SKX_NUM_CHANNELS, I10NM_NUM_CHANNELS)#define NUM_DIMMS MAX(SKX_NUM_DIMMS, I10NM_NUM_DIMMS)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +2 -0
@@ -1258,7 +1258,9 @@ int emu_soc_asic_init(struct amdgpu_device *adev);#define amdgpu_inc_vram_lost (adev) atomic_inc(&((adev)->vram_lost_counter)); +#ifndef MIN #define MIN (X ,Y ) ((X) < (Y) ? (X) : (Y)) +#endif /* Common functions */ bool amdgpu_device_has_job_running (struct amdgpu_device *adev);
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c +2 -0
@@ -25,7 +25,9 @@#include "hdcp.h" +#ifndef MIN #define MIN (a, b) ((a) < (b) ? (a) : (b)) +#endif #define HDCP_I2C_ADDR 0x3a/* 0x74 >> 1*/ #define KSV_READ_SIZE 0xf/* 0x6803b - 0x6802c */ #define HDCP_MAX_AUX_TRANSACTION_SIZE 16
drivers/gpu/drm/amd/pm/powerplay/hwmgr/ppevvmath.h +10 -4
@@ -22,12 +22,18 @@*/ #include <asm/div64.h> -#define SHIFT_AMOUNT 16/* We multiply all original integers with 2^SHIFT_AMOUNT to get the fInt representation */ +enum ppevvmath_constants { +/* We multiply all original integers with 2^SHIFT_AMOUNT to get the fInt representation */ +SHIFT_AMOUNT =16 , -#define PRECISION 5/* Change this value to change the number of decimal places in the final output - 5 is a good default */ +/* Change this value to change the number of decimal places in the final output - 5 is a good default */ +PRECISION =5 , -#define SHIFTED_2 (2 << SHIFT_AMOUNT) -#define MAX (1 << (SHIFT_AMOUNT - 1)) - 1/* 32767 - Might change in the future */ +SHIFTED_2 = (2 <<SHIFT_AMOUNT ), + +/* 32767 - Might change in the future */ +MAX = (1 << (SHIFT_AMOUNT -1 )) -1 , +};/* ------------------------------------------------------------------------------- * NEW TYPE - fINT
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +2 -0
@@ -2081,7 +2081,9 @@ static int sienna_cichlid_display_disable_memory_clock_switch(struct smu_contextreturn ret; } +#ifndef MAX #define MAX (a, b) ((a) > (b) ? (a) : (b)) +#endif static int sienna_cichlid_update_pcie_parameters(struct smu_context *smu, uint8_t pcie_gen_cap,
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +3 -0
@@ -1255,7 +1255,10 @@ static int smu_v13_0_0_get_thermal_temperature_range(struct smu_context *smu,return 0 ; } +#ifndef MAX #define MAX (a, b) ((a) > (b) ? (a) : (b)) +#endif +static ssize_t smu_v13_0_0_get_gpu_metrics (struct smu_context *smu,void **table) {
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c +3 -0
@@ -1263,7 +1263,10 @@ static int smu_v13_0_7_get_thermal_temperature_range(struct smu_context *smu,return 0 ; } +#ifndef MAX #define MAX (a, b) ((a) > (b) ? (a) : (b)) +#endif +static ssize_t smu_v13_0_7_get_gpu_metrics (struct smu_context *smu,void **table) {
drivers/gpu/drm/arm/display/include/malidp_utils.h +1 -1
@@ -35,7 +35,7 @@ static inline void set_range(struct malidp_range *rg, u32 start, u32 end) rg->end = end; } -static inline bool in_range (struct malidp_range *rg,u32 v) +static inline bool malidp_in_range (struct malidp_range *rg,u32 v) {return (v >= rg->start) && (v <= rg->end); }
drivers/gpu/drm/arm/display/komeda/komeda_pipeline_state.c +12 -12
@@ -305,12 +305,12 @@ komeda_layer_check_cfg(struct komeda_layer *layer,if (komeda_fb_check_src_coords (kfb, src_x, src_y, src_w, src_h))return -EINVAL ; -if (!in_range (&layer->hsize_in, src_w)) { +if (!malidp_in_range (&layer->hsize_in, src_w)) {DRM_DEBUG_ATOMIC ("invalidate src_w %d.\n" , src_w);return -EINVAL ; } -if (!in_range (&layer->vsize_in, src_h)) { +if (!malidp_in_range (&layer->vsize_in, src_h)) {DRM_DEBUG_ATOMIC ("invalidate src_h %d.\n" , src_h);return -EINVAL ; }
@@ -452,14 +452,14 @@ komeda_scaler_check_cfg(struct komeda_scaler *scaler, hsize_out = dflow->out_w; vsize_out = dflow->out_h; -if (!in_range (&scaler->hsize, hsize_in) || - !in_range (&scaler->hsize, hsize_out)) { +if (!malidp_in_range (&scaler->hsize, hsize_in) || + !malidp_in_range (&scaler->hsize, hsize_out)) {DRM_DEBUG_ATOMIC ("Invalid horizontal sizes" );return -EINVAL ; } -if (!in_range (&scaler->vsize, vsize_in) || - !in_range (&scaler->vsize, vsize_out)) { +if (!malidp_in_range (&scaler->vsize, vsize_in) || + !malidp_in_range (&scaler->vsize, vsize_out)) {DRM_DEBUG_ATOMIC ("Invalid vertical sizes" );return -EINVAL ; }
@@ -574,13 +574,13 @@ komeda_splitter_validate(struct komeda_splitter *splitter,return -EINVAL ; } -if (!in_range (&splitter->hsize, dflow->in_w)) { +if (!malidp_in_range (&splitter->hsize, dflow->in_w)) {DRM_DEBUG_ATOMIC ("split in_w:%d is out of the acceptable range.\n" , dflow->in_w);return -EINVAL ; } -if (!in_range (&splitter->vsize, dflow->in_h)) { +if (!malidp_in_range (&splitter->vsize, dflow->in_h)) {DRM_DEBUG_ATOMIC ("split in_h: %d exceeds the acceptable range.\n" , dflow->in_h);return -EINVAL ;
@@ -624,13 +624,13 @@ komeda_merger_validate(struct komeda_merger *merger,return -EINVAL ; } -if (!in_range (&merger->hsize_merged, output->out_w)) { +if (!malidp_in_range (&merger->hsize_merged, output->out_w)) {DRM_DEBUG_ATOMIC ("merged_w: %d is out of the accepted range.\n" , output->out_w);return -EINVAL ; } -if (!in_range (&merger->vsize_merged, output->out_h)) { +if (!malidp_in_range (&merger->vsize_merged, output->out_h)) {DRM_DEBUG_ATOMIC ("merged_h: %d is out of the accepted range.\n" , output->out_h);return -EINVAL ;
@@ -866,8 +866,8 @@ void komeda_complete_data_flow_cfg(struct komeda_layer *layer,* input/output range. */ if (dflow->en_scaling && scaler) - dflow->en_split = !in_range (&scaler->hsize, dflow->in_w) || - !in_range (&scaler->hsize, dflow->out_w); + dflow->en_split = !malidp_in_range (&scaler->hsize, dflow->in_w) || + !malidp_in_range (&scaler->hsize, dflow->out_w); } static bool merger_is_available(struct komeda_pipeline *pipe,
drivers/gpu/drm/ast/ast_dp.c +1 -1
@@ -51,7 +51,7 @@ int ast_astdp_read_edid(struct drm_device *dev, u8 *ediddata)* of right-click of mouse. * 2. The Delays are often longer a lot when system resume from S3/S4. */ -mdelay (j+1 ); +msleep (j +1 ); if (!(ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xD1, ASTDP_MCU_FW_EXECUTING) &&
drivers/gpu/drm/drm_color_mgmt.c +1 -1
@@ -532,7 +532,7 @@ int drm_plane_create_color_properties(struct drm_plane *plane, {struct drm_device *dev = plane->dev;struct drm_property *prop; -struct drm_prop_enum_list enum_list[max_t (int,DRM_COLOR_ENCODING_MAX , +struct drm_prop_enum_list enum_list[MAX_T (int,DRM_COLOR_ENCODING_MAX ,DRM_COLOR_RANGE_MAX )];int i, len;
drivers/gpu/drm/gma500/oaktrail_hdmi.c +1 -1
@@ -724,8 +724,8 @@ void oaktrail_hdmi_teardown(struct drm_device *dev)if (hdmi_dev) { pdev = hdmi_dev->dev; -pci_set_drvdata (pdev,NULL );oaktrail_hdmi_i2c_exit (pdev); +pci_set_drvdata (pdev,NULL );iounmap (hdmi_dev->regs);kfree (hdmi_dev);pci_dev_put (pdev);
drivers/gpu/drm/i915/display/intel_backlight.c +3 -2
@@ -39,8 +39,9 @@ static u32 scale(u32 source_val, {u64 target_val; -WARN_ON (source_min > source_max); -WARN_ON (target_min > target_max); +if (WARN_ON (source_min >= source_max) || +WARN_ON (target_min > target_max)) +return target_min;/* defensive */ source_val =clamp (source_val, source_min, source_max);
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +0 -6
@@ -680,12 +680,6 @@ struct block_header {u32 data[]; }; -/* this should be a general kernel helper */ -static int in_range (u32 addr,u32 start,u32 size) -{ -return addr >= start && addr < start + size; -} -static bool fw_block_mem (struct a6xx_gmu_bo *bo,const struct block_header *blk) {if (!in_range (blk->addr, bo->iova, bo->size))
drivers/gpu/drm/radeon/evergreen_cs.c +2 -0
@@ -33,8 +33,10 @@#include "evergreen_reg_safe.h" #include "cayman_reg_safe.h" +#ifndef MIN #define MAX (a,b) (((a)>(b))?(a):(b))#define MIN (a,b) (((a)<(b))?(a):(b)) +#endif #define REG_SAFE_BM_SIZE ARRAY_SIZE(evergreen_reg_safe_bm)
drivers/hwmon/adt7475.c +12 -12
@@ -23,23 +23,23 @@#include <linux/util_macros.h> /* Indexes for the sysfs hooks */ - -#define INPUT 0 -#define MIN 1 -#define MAX 2 -#define CONTROL 3 -#define OFFSET 3 -#define AUTOMIN 4 -#define THERM 5 -#define HYSTERSIS 6 - +enum adt_sysfs_id { +INPUT =0 , +MIN =1 , +MAX =2 , +CONTROL =3 , +OFFSET =3 ,// Dup +AUTOMIN =4 , +THERM =5 , +HYSTERSIS =6 ,/* * These are unique identifiers for the sysfs functions - unlike the * numbers above, these are not also indexes into an array */ +ALARM =9 , +FAULT =10 , +}; -#define ALARM 9 -#define FAULT 10/* 7475 Common Registers */
drivers/infiniband/hw/mlx5/devx.c +1 -0
@@ -191,6 +191,7 @@ static u16 get_legacy_obj_type(u16 opcode) {switch (opcode) {case MLX5_CMD_OP_CREATE_RQ : +case MLX5_CMD_OP_CREATE_RMP :return MLX5_EVENT_QUEUE_TYPE_RQ ;case MLX5_CMD_OP_CREATE_QP :return MLX5_EVENT_QUEUE_TYPE_QP ;
drivers/md/dm-integrity.c +1 -1
@@ -2618,7 +2618,7 @@ static void do_journal_write(struct dm_integrity_c *ic, unsigned int write_start unlikely(from_replay) && #endif ic->internal_hash) { -char test_tag[max_t (size_t,HASH_MAX_DIGESTSIZE ,MAX_TAG_SIZE )]; +char test_tag[MAX_T (size_t,HASH_MAX_DIGESTSIZE ,MAX_TAG_SIZE )];integrity_sector_checksum (ic, sec + ((l - j) << ic->sb->log2_sectors_per_block), (char *)access_journal_data (ic, i, l), test_tag);
drivers/media/dvb-frontends/stv0367_priv.h +3 -0
@@ -25,8 +25,11 @@#endif /* MACRO definitions */ +#ifndef MIN #define MAX (X ,Y ) ((X) >= (Y) ? (X) : (Y))#define MIN (X ,Y ) ((X) <= (Y) ? (X) : (Y)) +#endif +#define INRANGE (X ,Y ,Z ) \ ((((X) <= (Y)) && ((Y) <= (Z))) || \ (((Z) <= (Y)) && ((Y) <= (X))) ? 1 : 0)
drivers/net/can/rcar/rcar_can.c +1 -7
@@ -862,7 +862,6 @@ static int __maybe_unused rcar_can_resume(struct device *dev) {struct net_device *ndev =dev_get_drvdata (dev);struct rcar_can_priv *priv =netdev_priv (ndev); -u16 ctlr;int err;if (!netif_running (ndev))
@@ -874,12 +873,7 @@ static int __maybe_unused rcar_can_resume(struct device *dev)return err; } - ctlr =readw (&priv->regs->ctlr); - ctlr &= ~RCAR_CAN_CTLR_SLPM ; -writew (ctlr, &priv->regs->ctlr); - ctlr &= ~RCAR_CAN_CTLR_CANM ; -writew (ctlr, &priv->regs->ctlr); - priv->can.state =CAN_STATE_ERROR_ACTIVE ; +rcar_can_start (ndev);netif_device_attach (ndev);netif_start_queue (ndev);
drivers/net/can/spi/hi311x.c +1 -0
@@ -813,6 +813,7 @@ static const struct net_device_ops hi3110_netdev_ops = { .ndo_open = hi3110_open, .ndo_stop = hi3110_stop, .ndo_start_xmit = hi3110_hard_start_xmit, + .ndo_change_mtu = can_change_mtu, };static const struct ethtool_ops hi3110_ethtool_ops = {
drivers/net/can/sun4i_can.c +1 -0
@@ -769,6 +769,7 @@ static const struct net_device_ops sun4ican_netdev_ops = { .ndo_open = sun4ican_open, .ndo_stop = sun4ican_close, .ndo_start_xmit = sun4ican_start_xmit, + .ndo_change_mtu = can_change_mtu, };static const struct ethtool_ops sun4ican_ethtool_ops = {
drivers/net/can/usb/etas_es58x/es581_4.c +2 -2
@@ -6,12 +6,12 @@* * Copyright (c) 2019 Robert Bosch Engineering and Business Solutions. All rights reserved. * Copyright (c) 2020 ETAS K.K.. All rights reserved. -* Copyright (c) 2020, 2021 Vincent Mailhol <[email protected]> +* Copyright (c) 2020-2022 Vincent Mailhol <[email protected]> */ +#include <asm/unaligned.h> #include <linux/kernel.h> #include <linux/units.h> -#include <asm/unaligned.h> #include "es58x_core.h" #include "es581_4.h"
drivers/net/can/usb/etas_es58x/es58x_core.c +4 -3
@@ -7,15 +7,15 @@* * Copyright (c) 2019 Robert Bosch Engineering and Business Solutions. All rights reserved. * Copyright (c) 2020 ETAS K.K.. All rights reserved. -* Copyright (c) 2020, 2021 Vincent Mailhol <[email protected]> +* Copyright (c) 2020-2025 Vincent Mailhol <[email protected]> */ +#include <asm/unaligned.h> +#include <linux/crc16.h> #include <linux/ethtool.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/usb.h> -#include <linux/crc16.h> -#include <asm/unaligned.h> #include "es58x_core.h"
@@ -1976,6 +1976,7 @@ static const struct net_device_ops es58x_netdev_ops = { .ndo_stop = es58x_stop, .ndo_start_xmit = es58x_start_xmit, .ndo_eth_ioctl = can_eth_ioctl_hwts, + .ndo_change_mtu = can_change_mtu, };static const struct ethtool_ops es58x_ethtool_ops = {
drivers/net/can/usb/etas_es58x/es58x_core.h +4 -4
@@ -6,17 +6,17 @@* * Copyright (c) 2019 Robert Bosch Engineering and Business Solutions. All rights reserved. * Copyright (c) 2020 ETAS K.K.. All rights reserved. -* Copyright (c) 2020, 2021 Vincent Mailhol <[email protected]> +* Copyright (c) 2020-2022 Vincent Mailhol <[email protected]> */ #ifndef __ES58X_COMMON_H__#define __ES58X_COMMON_H__ -#include <linux/types.h> -#include <linux/usb.h> -#include <linux/netdevice.h> #include <linux/can.h> #include <linux/can/dev.h> +#include <linux/netdevice.h> +#include <linux/types.h> +#include <linux/usb.h> #include "es581_4.h" #include "es58x_fd.h"
drivers/net/can/usb/etas_es58x/es58x_fd.c +2 -2
@@ -8,12 +8,12 @@* * Copyright (c) 2019 Robert Bosch Engineering and Business Solutions. All rights reserved. * Copyright (c) 2020 ETAS K.K.. All rights reserved. -* Copyright (c) 2020, 2021 Vincent Mailhol <[email protected]> +* Copyright (c) 2020-2022 Vincent Mailhol <[email protected]> */ +#include <asm/unaligned.h> #include <linux/kernel.h> #include <linux/units.h> -#include <asm/unaligned.h> #include "es58x_core.h" #include "es58x_fd.h"
drivers/net/can/usb/mcba_usb.c +1 -0
@@ -761,6 +761,7 @@ static const struct net_device_ops mcba_netdev_ops = { .ndo_open = mcba_usb_open, .ndo_stop = mcba_usb_close, .ndo_start_xmit = mcba_usb_start_xmit, + .ndo_change_mtu = can_change_mtu, };static const struct ethtool_ops mcba_ethtool_ops = {
drivers/net/can/usb/peak_usb/pcan_usb_core.c +1 -1
@@ -89,7 +89,7 @@ void peak_usb_update_ts_now(struct peak_time_ref *time_ref, u32 ts_now)u32 delta_ts = time_ref->ts_dev_2 - time_ref->ts_dev_1;if (time_ref->ts_dev_2 < time_ref->ts_dev_1) - delta_ts &= (1 << time_ref->adapter->ts_used_bits) -1 ; + delta_ts &= (1ULL << time_ref->adapter->ts_used_bits) -1 ; time_ref->ts_total += delta_ts; }
drivers/net/dsa/lantiq_gswip.c +20 -17
@@ -682,30 +682,24 @@ static int gswip_add_single_port_br(struct gswip_priv *priv, int port, bool add)return 0 ; } -static int gswip_port_enable (struct dsa_switch *ds,int port, -struct phy_device *phydev) +static int gswip_port_setup (struct dsa_switch *ds,int port) {struct gswip_priv *priv = ds->priv;int err; -if (!dsa_is_user_port (ds, port)) -return 0 ; -if (!dsa_is_cpu_port (ds, port)) { err =gswip_add_single_port_br (priv, port, true);if (err)return err; } -/* RMON Counter Enable for port */ -gswip_switch_w (priv,GSWIP_BM_PCFG_CNTEN ,GSWIP_BM_PCFGp (port)); +return 0 ; +} -/* enable port fetch/store dma & VLAN Modification */ -gswip_switch_mask (priv,0 ,GSWIP_FDMA_PCTRL_EN | -GSWIP_FDMA_PCTRL_VLANMOD_BOTH , -GSWIP_FDMA_PCTRLp (port)); -gswip_switch_mask (priv,0 ,GSWIP_SDMA_PCTRL_EN , -GSWIP_SDMA_PCTRLp (port)); +static int gswip_port_enable (struct dsa_switch *ds,int port, +struct phy_device *phydev) +{ +struct gswip_priv *priv = ds->priv;if (!dsa_is_cpu_port (ds, port)) {u32 mdio_phy =0 ;
@@ -717,6 +711,16 @@ static int gswip_port_enable(struct dsa_switch *ds, int port, GSWIP_MDIO_PHYp(port)); } +/* RMON Counter Enable for port */ +gswip_switch_w (priv,GSWIP_BM_PCFG_CNTEN ,GSWIP_BM_PCFGp (port)); + +/* enable port fetch/store dma & VLAN Modification */ +gswip_switch_mask (priv,0 ,GSWIP_FDMA_PCTRL_EN | +GSWIP_FDMA_PCTRL_VLANMOD_BOTH , +GSWIP_FDMA_PCTRLp (port)); +gswip_switch_mask (priv,0 ,GSWIP_SDMA_PCTRL_EN , +GSWIP_SDMA_PCTRLp (port)); +return 0 ; }
@@ -724,9 +728,6 @@ static void gswip_port_disable(struct dsa_switch *ds, int port) {struct gswip_priv *priv = ds->priv; -if (!dsa_is_user_port (ds, port)) -return ; -gswip_switch_mask (priv,GSWIP_FDMA_PCTRL_EN ,0 ,GSWIP_FDMA_PCTRLp (port)); gswip_switch_mask(priv, GSWIP_SDMA_PCTRL_EN, 0,
@@ -1365,8 +1366,9 @@ static int gswip_port_fdb(struct dsa_switch *ds, int port,int i;int err; +/* Operation not supported on the CPU port, don't throw errors */ if (!bridge) -return -EINVAL ; +return 0 ;for (i = max_ports; i <ARRAY_SIZE (priv->vlans); i++) {if (priv->vlans[i].bridge == bridge) {
@@ -1821,6 +1823,7 @@ static int gswip_get_sset_count(struct dsa_switch *ds, int port, int sset)static const struct dsa_switch_ops gswip_xrx200_switch_ops = { .get_tag_protocol = gswip_get_tag_protocol, .setup = gswip_setup, + .port_setup = gswip_port_setup, .port_enable = gswip_port_enable, .port_disable = gswip_port_disable, .port_bridge_join = gswip_port_bridge_join,
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c +1 -1
@@ -244,7 +244,7 @@ bnxt_tc_parse_pedit(struct bnxt *bp, struct bnxt_tc_actions *actions, offset < offset_of_ip6_daddr + 16) { actions->nat.src_xlate = false; idx = (offset - offset_of_ip6_daddr) / 4; - actions->nat.l3.ipv6.saddr.s6_addr32[idx] = htonl(val); + actions->nat.l3.ipv6.daddr.s6_addr32[idx] = htonl(val); } else { netdev_err(bp->dev, "%s: IPv6_hdr: Invalid pedit field\n",
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +9 -9
@@ -2126,7 +2126,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = { .set_link_ksettings = set_link_ksettings, }; -static int in_range (int val,int lo,int hi) +static int cxgb_in_range (int val,int lo,int hi) {return val <0 || (val <= hi && val >= lo); }
@@ -2162,19 +2162,19 @@ static int cxgb_siocdevprivate(struct net_device *dev,return -EINVAL ;if (t.qset_idx >=SGE_QSETS )return -EINVAL ; -if (!in_range (t.intr_lat,0 ,M_NEWTIMER ) || - !in_range (t.cong_thres,0 ,255 ) || - !in_range (t.txq_size[0 ],MIN_TXQ_ENTRIES , +if (!cxgb_in_range (t.intr_lat,0 ,M_NEWTIMER ) || + !cxgb_in_range (t.cong_thres,0 ,255 ) || + !cxgb_in_range (t.txq_size[0 ],MIN_TXQ_ENTRIES ,MAX_TXQ_ENTRIES ) || - !in_range (t.txq_size[1 ],MIN_TXQ_ENTRIES , + !cxgb_in_range (t.txq_size[1 ],MIN_TXQ_ENTRIES ,MAX_TXQ_ENTRIES ) || - !in_range (t.txq_size[2 ],MIN_CTRL_TXQ_ENTRIES , + !cxgb_in_range (t.txq_size[2 ],MIN_CTRL_TXQ_ENTRIES ,MAX_CTRL_TXQ_ENTRIES ) || - !in_range (t.fl_size[0 ],MIN_FL_ENTRIES , + !cxgb_in_range (t.fl_size[0 ],MIN_FL_ENTRIES ,MAX_RX_BUFFERS ) || - !in_range (t.fl_size[1 ],MIN_FL_ENTRIES , + !cxgb_in_range (t.fl_size[1 ],MIN_FL_ENTRIES ,MAX_RX_JUMBO_BUFFERS ) || - !in_range (t.rspq_size,MIN_RSPQ_ENTRIES , + !cxgb_in_range (t.rspq_size,MIN_RSPQ_ENTRIES ,MAX_RSPQ_ENTRIES ))return -EINVAL ;
drivers/net/ethernet/intel/i40e/i40e.h +3 -1
@@ -50,6 +50,7 @@#define I40E_MAX_VEB 16#define I40E_MAX_NUM_DESCRIPTORS 4096 +#define I40E_MAX_NUM_DESCRIPTORS_XL710 8160#define I40E_MAX_CSR_SPACE (4 * 1024 * 1024 - 64 * 1024)#define I40E_DEFAULT_NUM_DESCRIPTORS 512#define I40E_REQ_DESCRIPTOR_MULTIPLE 32
@@ -1255,7 +1256,8 @@ struct i40e_mac_filter *i40e_add_mac_filter(struct i40e_vsi *vsi, const u8 *macaddr);int i40e_del_mac_filter (struct i40e_vsi *vsi,const u8 *macaddr);bool i40e_is_vsi_in_vlan (struct i40e_vsi *vsi); -int i40e_count_filters (struct i40e_vsi *vsi); +int i40e_count_all_filters (struct i40e_vsi *vsi); +int i40e_count_active_filters (struct i40e_vsi *vsi);struct i40e_mac_filter *i40e_find_mac (struct i40e_vsi *vsi,const u8 *macaddr);void i40e_vlan_stripping_enable (struct i40e_vsi *vsi);static inline bool i40e_is_sw_dcb (struct i40e_pf *pf)
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +19 -6
@@ -2012,6 +2012,18 @@ static void i40e_get_drvinfo(struct net_device *netdev, drvinfo->n_priv_flags +=I40E_GL_PRIV_FLAGS_STR_LEN ; } +static u32 i40e_get_max_num_descriptors (struct i40e_pf *pf) +{ +struct i40e_hw *hw = &pf->hw; + +switch (hw->mac.type) { +case I40E_MAC_XL710 : +return I40E_MAX_NUM_DESCRIPTORS_XL710 ; +default : +return I40E_MAX_NUM_DESCRIPTORS ; + } +} + static void i40e_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring, struct kernel_ethtool_ringparam *kernel_ring,
@@ -2021,8 +2033,8 @@ static void i40e_get_ringparam(struct net_device *netdev,struct i40e_pf *pf = np->vsi->back;struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; - ring->rx_max_pending =I40E_MAX_NUM_DESCRIPTORS ; - ring->tx_max_pending =I40E_MAX_NUM_DESCRIPTORS ; + ring->rx_max_pending =i40e_get_max_num_descriptors (pf); + ring->tx_max_pending =i40e_get_max_num_descriptors (pf); ring->rx_mini_max_pending =0 ; ring->rx_jumbo_max_pending =0 ; ring->rx_pending = vsi->rx_rings[0 ]->count;
@@ -2047,12 +2059,12 @@ static int i40e_set_ringparam(struct net_device *netdev,struct kernel_ethtool_ringparam *kernel_ring, struct netlink_ext_ack *extack) { + u32 new_rx_count, new_tx_count, max_num_descriptors;struct i40e_ring *tx_rings =NULL , *rx_rings =NULL ;struct i40e_netdev_priv *np =netdev_priv (netdev);struct i40e_hw *hw = &np->vsi->back->hw;struct i40e_vsi *vsi = np->vsi;struct i40e_pf *pf = vsi->back; -u32 new_rx_count, new_tx_count;u16 tx_alloc_queue_pairs;int timeout =50 ;int i, err =0 ;
@@ -2060,14 +2072,15 @@ static int i40e_set_ringparam(struct net_device *netdev,if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))return -EINVAL ; -if (ring->tx_pending >I40E_MAX_NUM_DESCRIPTORS || + max_num_descriptors =i40e_get_max_num_descriptors (pf); +if (ring->tx_pending > max_num_descriptors || ring->tx_pending <I40E_MIN_NUM_DESCRIPTORS || - ring->rx_pending >I40E_MAX_NUM_DESCRIPTORS || + ring->rx_pending > max_num_descriptors || ring->rx_pending <I40E_MIN_NUM_DESCRIPTORS ) {netdev_info (netdev,"Descriptors requested (Tx: %d / Rx: %d) out of range [%d-%d]\n" , ring->tx_pending, ring->rx_pending, -I40E_MIN_NUM_DESCRIPTORS ,I40E_MAX_NUM_DESCRIPTORS ); +I40E_MIN_NUM_DESCRIPTORS , max_num_descriptors);return -EINVAL ; }
drivers/net/ethernet/intel/i40e/i40e_main.c +22 -4
@@ -1233,12 +1233,30 @@ void i40e_update_stats(struct i40e_vsi *vsi) }/** -* i40e_count_filters - counts VSI mac filters +* i40e_count_all_filters - counts VSI MAC filters * @vsi: the VSI to be searched * -* Returns count of mac filters -**/ -int i40e_count_filters (struct i40e_vsi *vsi) +* Return: count of MAC filters in any state. +*/ +int i40e_count_all_filters (struct i40e_vsi *vsi) +{ +struct i40e_mac_filter *f; +struct hlist_node *h; +int bkt, cnt =0 ; + +hash_for_each_safe (vsi->mac_filter_hash, bkt, h, f, hlist) + cnt++; + +return cnt; +} + +/** +* i40e_count_active_filters - counts VSI MAC filters +* @vsi: the VSI to be searched +* +* Return: count of active MAC filters. +*/ +int i40e_count_active_filters (struct i40e_vsi *vsi) {struct i40e_mac_filter *f;struct hlist_node *h;
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +64 -46
213 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h +2 -1
@@ -39,7 +39,8 @@ enum i40e_vf_states {I40E_VF_STATE_MC_PROMISC ,I40E_VF_STATE_UC_PROMISC ,I40E_VF_STATE_PRE_ENABLE , - I40E_VF_STATE_RESETTING +I40E_VF_STATE_RESETTING , + I40E_VF_STATE_RESOURCES_LOADED, };/* VF capabilities */
drivers/net/ethernet/marvell/octeontx2/af/cgx.c +1 -2
@@ -21,8 +21,7 @@#include "rvu.h" #include "lmac_common.h" -#define DRV_NAME "Marvell-CGX/RPM" -#define DRV_STRING "Marvell CGX/RPM Driver" +#define DRV_NAME "Marvell-CGX-RPM"static LIST_HEAD (cgx_list);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c +1 -1
@@ -1039,7 +1039,6 @@ static int otx2_tc_add_flow(struct otx2_nic *nic, free_leaf:otx2_tc_del_from_flow_list (flow_cfg, new_node); -kfree_rcu (new_node, rcu);if (new_node->is_act_police) {mutex_lock (&nic->mbox.lock);
@@ -1059,6 +1058,7 @@ static int otx2_tc_add_flow(struct otx2_nic *nic,mutex_unlock (&nic->mbox.lock); } +kfree_rcu (new_node, rcu);return rc; }
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -1
@@ -2827,7 +2827,7 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv)u32 channels_to_check = tx_channel_count > rx_channel_count ? tx_channel_count : rx_channel_count;u32 chan; -int status[max_t (u32,MTL_MAX_TX_QUEUES ,MTL_MAX_RX_QUEUES )]; +int status[MAX_T (u32,MTL_MAX_TX_QUEUES ,MTL_MAX_RX_QUEUES )];/* Make sure we never check beyond our status buffer. */ if (WARN_ON_ONCE (channels_to_check >ARRAY_SIZE (status)))
drivers/net/fjes/fjes_main.c +1 -3
@@ -14,9 +14,7 @@#include "fjes.h" #include "fjes_trace.h" -#define MAJ 1 -#define MIN 2 -#define DRV_VERSION __stringify(MAJ) "." __stringify(MIN) +#define DRV_VERSION "1.2"#define DRV_NAME "fjes"char fjes_driver_name[] =DRV_NAME ;char fjes_driver_version[] =DRV_VERSION ;
drivers/nfc/pn544/i2c.c +0 -2
@@ -126,8 +126,6 @@ struct pn544_i2c_fw_secure_blob {#define PN544_FW_CMD_RESULT_COMMAND_REJECTED 0xE0#define PN544_FW_CMD_RESULT_CHUNK_ERROR 0xE6 -#define MIN (X ,Y ) ((X) < (Y) ? (X) : (Y)) -#define PN544_FW_WRITE_BUFFER_MAX_LEN 0x9f7#define PN544_FW_I2C_MAX_PAYLOAD PN544_HCI_I2C_LLC_MAX_SIZE#define PN544_FW_I2C_WRITE_FRAME_HEADER_LEN 8
drivers/platform/x86/sony-laptop.c +0 -1
@@ -757,7 +757,6 @@ static union acpi_object *__call_snc_method(acpi_handle handle, char *method,return result; } -#define MIN (a, b) (a > b ? b : a)static int sony_nc_buffer_call (acpi_handle handle,char *name,u64 *value,void *buffer,size_t buflen) {
drivers/scsi/isci/init.c +1 -5
@@ -65,11 +65,7 @@#include "task.h" #include "probe_roms.h" -#define MAJ 1 -#define MIN 2 -#define BUILD 0 -#define DRV_VERSION __stringify(MAJ) "." __stringify(MIN) "." \ - __stringify(BUILD) +#define DRV_VERSION "1.2.0"MODULE_VERSION (DRV_VERSION );
drivers/staging/media/atomisp/pci/hive_isp_css_include/math_support.h +0 -5
@@ -31,11 +31,6 @@/* A => B */ #define IMPLIES (a, b) (!(a) || (b)) -/* for preprocessor and array sizing use MIN and MAX -otherwise use min and max */ -#define MAX (a, b) (((a) > (b)) ? (a) : (b)) -#define MIN (a, b) (((a) < (b)) ? (a) : (b)) -#define ROUND_DIV (a, b) (((b) != 0) ? ((a) + ((b) >> 1)) / (b) : 0)#define CEIL_DIV (a, b) (((b) != 0) ? ((a) + (b) - 1) / (b) : 0)#define CEIL_MUL (a, b) (CEIL_DIV(a, b) * (b))
drivers/usb/core/quirks.c +1 -1
@@ -734,7 +734,7 @@ void usb_detect_quirks(struct usb_device *udev) udev->quirks ^=usb_detect_dynamic_quirks (udev);if (udev->quirks) -dev_dbg (&udev->dev,"USB quirks for this device: %x\n" , +dev_dbg (&udev->dev,"USB quirks for this device: 0x%x\n" , udev->quirks);#ifdef CONFIG_USB_DEFAULT_PERSIST
drivers/video/fbdev/core/fbcon.c +10 -3
@@ -2489,7 +2489,7 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font,unsigned charcount = font->charcount;int w = font->width;int h = font->height; -int size; +int size, alloc_size;int i, csum;u8 *new_data, *data = font->data;int pitch =PITCH (font->width);
@@ -2516,9 +2516,16 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font,if (fbcon_invalid_charcount (info, charcount))return -EINVAL ; - size =CALC_FONTSZ (h, pitch, charcount); +/* Check for integer overflow in font size calculation */ +if (check_mul_overflow (h, pitch, &size) || +check_mul_overflow (size, charcount, &size)) +return -EINVAL ; + +/* Check for overflow in allocation size calculation */ +if (check_add_overflow (FONT_EXTRA_WORDS *sizeof (int ), size, &alloc_size)) +return -EINVAL ; - new_data =kmalloc (FONT_EXTRA_WORDS *sizeof (int ) + size,GFP_USER ); + new_data =kmalloc (alloc_size,GFP_USER );if (!new_data)return -ENOMEM ;
drivers/virt/acrn/ioreq.c +2 -2
@@ -351,7 +351,7 @@ static bool handle_cf8cfc(struct acrn_vm *vm,return is_handled; } -static bool in_range (struct acrn_ioreq_range *range, +static bool acrn_in_range (struct acrn_ioreq_range *range,struct acrn_io_request *req) {bool ret = false;
@@ -389,7 +389,7 @@ static struct acrn_ioreq_client *find_ioreq_client(struct acrn_vm *vm,list_for_each_entry (client, &vm->ioreq_clients, list) {read_lock_bh (&client->range_lock);list_for_each_entry (range, &client->range_list, list) { -if (in_range (range, req)) { +if (acrn_in_range (range, req)) { found = client;break ; }
fs/afs/server.c +2 -1
@@ -401,13 +401,14 @@ struct afs_server *afs_use_server(struct afs_server *server, enum afs_server_travoid afs_put_server (struct afs_net *net,struct afs_server *server,enum afs_server_trace reason) { -unsigned int a, debug_id = server->debug_id; +unsigned int a, debug_id;bool zero;int r;if (!server)return ; + debug_id = server->debug_id; a =atomic_read (&server->active); zero =__refcount_dec_and_test (&server->ref, &r);trace_afs_server (debug_id, r -1 , a, reason);
fs/btrfs/misc.h +0 -2
@@ -8,8 +8,6 @@#include <linux/math64.h> #include <linux/rbtree.h> -#define in_range (b, first, len) ((b) >= (first) && (b) < (first) + (len)) -static inline void cond_wake_up (struct wait_queue_head *wq) {/*
fs/ext2/balloc.c +0 -2
@@ -36,8 +36,6 @@*/ -#define in_range (b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) -struct ext2_group_desc *ext2_get_group_desc (struct super_block * sb,unsigned int block_group,struct buffer_head ** bh)
fs/ext4/ext4.h +0 -2
@@ -3804,8 +3804,6 @@ static inline void set_bitmap_uptodate(struct buffer_head *bh)set_bit (BH_BITMAP_UPTODATE , &(bh)->b_state); } -#define in_range (b, first, len) ((b) >= (first) && (b) <= (first) + (len) - 1) -/* For ioend & aio unwritten conversion wait queues */ #define EXT4_WQ_HASH_SZ 37#define ext4_ioend_wq (v) (&ext4__ioend_wq[((unsigned long)(v)) %\
fs/hugetlbfs/inode.c +6 -4
@@ -576,14 +576,16 @@ static bool remove_inode_single_folio(struct hstate *h, struct inode *inode,/* * If folio is mapped, it was faulted in after being -* unmapped in caller. Unmap (again) while holding -* the fault mutex. The mutex will prevent faults -* until we finish removing the folio. +* unmapped in caller or hugetlb_vmdelete_list() skips +* unmapping it due to fail to grab lock. Unmap (again) +* while holding the fault mutex. The mutex will prevent +* faults until we finish removing the folio. Hold folio +* lock to guarantee no concurrent migration. */ +folio_lock (folio);if (unlikely (folio_mapped (folio)))hugetlb_unmap_file_folio (h, mapping, folio, index); -folio_lock (folio);/* * We must remove the folio from page cache before removing * the region/ reserve map (hugetlb_unreserve_pages). In
fs/smb/server/transport_rdma.c +8 -10
@@ -147,7 +147,7 @@ struct smb_direct_transport {wait_queue_head_t wait_send_pending;atomic_t send_pending; -struct delayed_work post_recv_credits_work; +struct work_struct post_recv_credits_work;struct work_struct send_immediate_work;struct work_struct disconnect_work;
@@ -365,8 +365,8 @@ static struct smb_direct_transport *alloc_transport(struct rdma_cm_id *cm_id)spin_lock_init (&t->lock_new_recv_credits); -INIT_DELAYED_WORK (&t->post_recv_credits_work, - smb_direct_post_recv_credits); +INIT_WORK (&t->post_recv_credits_work, + smb_direct_post_recv_credits);INIT_WORK (&t->send_immediate_work, smb_direct_send_immediate_work);INIT_WORK (&t->disconnect_work, smb_direct_disconnect_rdma_work);
@@ -393,7 +393,7 @@ static void free_transport(struct smb_direct_transport *t) atomic_read(&t->send_pending) == 0);cancel_work_sync (&t->disconnect_work); -cancel_delayed_work_sync (&t->post_recv_credits_work); +cancel_work_sync (&t->post_recv_credits_work);cancel_work_sync (&t->send_immediate_work);if (t->qp) {
@@ -609,8 +609,7 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc)wake_up_interruptible (&t->wait_send_credits);if (is_receive_credit_post_required (receive_credits, avail_recvmsg_count)) -mod_delayed_work (smb_direct_wq, - &t->post_recv_credits_work,0 ); +queue_work (smb_direct_wq, &t->post_recv_credits_work);if (data_length) {enqueue_reassembly (t, recvmsg, (int )data_length);
@@ -767,8 +766,7 @@ static int smb_direct_read(struct ksmbd_transport *t, char *buf, st->count_avail_recvmsg += queue_removed;if (is_receive_credit_post_required (st->recv_credits, st->count_avail_recvmsg)) {spin_unlock (&st->receive_credit_lock); -mod_delayed_work (smb_direct_wq, - &st->post_recv_credits_work,0 ); +queue_work (smb_direct_wq, &st->post_recv_credits_work); }else {spin_unlock (&st->receive_credit_lock); }
@@ -795,7 +793,7 @@ static int smb_direct_read(struct ksmbd_transport *t, char *buf,static void smb_direct_post_recv_credits (struct work_struct *work) {struct smb_direct_transport *t =container_of (work, - struct smb_direct_transport, post_recv_credits_work.work); + struct smb_direct_transport, post_recv_credits_work);struct smb_direct_recvmsg *recvmsg;int receive_credits, credits =0 ;int ret;
@@ -1676,7 +1674,7 @@ static int smb_direct_prepare_negotiation(struct smb_direct_transport *t) goto out_err; } -smb_direct_post_recv_credits (&t->post_recv_credits_work.work); +smb_direct_post_recv_credits (&t->post_recv_credits_work);return 0 ; out_err:put_recvmsg (t, recvmsg);
fs/ufs/util.h +0 -6
@@ -11,12 +11,6 @@#include <linux/fs.h> #include "swab.h" - -/* -* some useful macros -*/ -#define in_range (b,first,len) ((b)>=(first)&&(b)<(first)+(len)) -/* * functions used for retyping */
include/crypto/if_alg.h +1 -1
@@ -152,7 +152,7 @@ struct af_alg_ctx {size_t used;atomic_t rcvused; - u32 more:1, + bool more:1, merge:1, enc:1, write:1,
include/linux/minmax.h +102 -20
163 lines not on this page · raw message
include/linux/mm.h +54 -0
60 lines not on this page · raw message
include/linux/pageblock-flags.h +1 -1
@@ -41,7 +41,7 @@ extern unsigned int pageblock_order;* Huge pages are a constant size, but don't exceed the maximum allocation * granularity. */ -#define pageblock_order min_t(unsigned int, HUGETLB_PAGE_ORDER, MAX_ORDER - 1) +#define pageblock_order MIN_T(unsigned int, HUGETLB_PAGE_ORDER, MAX_ORDER - 1)#endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */
include/linux/swap.h +10 -0
@@ -392,6 +392,16 @@ void lru_cache_add(struct page *);void mark_page_accessed (struct page *);void folio_mark_accessed (struct folio *); +static inline bool folio_may_be_lru_cached (struct folio *folio) +{ +/* +* Holding PMD-sized folios in per-CPU LRU cache unbalances accounting. +* Holding small numbers of low-order mTHP folios in per-CPU LRU cache +* will be sensible, but nobody has implemented and tested that yet. +*/ +return !folio_test_large (folio); +} +extern atomic_t lru_disable_count;static inline bool lru_cache_disabled (void )
include/net/bluetooth/hci_core.h +21 -0
@@ -1140,6 +1140,27 @@ static inline struct hci_conn *hci_conn_hash_lookup_ba(struct hci_dev *hdev,return NULL ; } +static inline struct hci_conn *hci_conn_hash_lookup_role (struct hci_dev *hdev, +__u8 type,__u8 role, +bdaddr_t *ba) +{ +struct hci_conn_hash *h = &hdev->conn_hash; +struct hci_conn *c; + +rcu_read_lock (); + +list_for_each_entry_rcu (c, &h->list, list) { +if (c->type == type && c->role == role && !bacmp (&c->dst, ba)) { +rcu_read_unlock (); +return c; + } + } + +rcu_read_unlock (); + +return NULL ; +} +static inline struct hci_conn *hci_conn_hash_lookup_le (struct hci_dev *hdev,bdaddr_t *ba,__u8 ba_type)
kernel/bpf/verifier.c +4 -0
@@ -5733,6 +5733,10 @@ static int process_timer_func(struct bpf_verifier_env *env, int regno,verbose (env,"verifier bug. Two map pointers in a timer helper\n" );return -EFAULT ; } +if (IS_ENABLED (CONFIG_PREEMPT_RT )) { +verbose (env,"bpf_timer cannot be used for PREEMPT_RT.\n" ); +return -EOPNOTSUPP ; + } meta->map_uid = reg->map_uid; meta->map_ptr = map;return 0 ;
kernel/futex/requeue.c +4 -2
@@ -223,18 +223,20 @@ static inlinevoid requeue_pi_wake_futex (struct futex_q *q,union futex_key *key,struct futex_hash_bucket *hb) { - q->key = *key; +struct task_struct *task; + q->key = *key;__futex_unqueue (q);WARN_ON (!q->rt_waiter); q->rt_waiter =NULL ; q->lock_ptr = &hb->lock; + task =READ_ONCE (q->task);/* Signal locked state to the waiter */ futex_requeue_pi_complete (q,1 ); -wake_up_state (q->task,TASK_NORMAL ); +wake_up_state (task,TASK_NORMAL ); }/**
kernel/trace/preemptirq_delay_test.c +0 -2
@@ -34,8 +34,6 @@ MODULE_PARM_DESC(cpu_affinity, "Cpu num test is running on");static struct completion done; -#define MIN (x, y) ((x) < (y) ? (x) : (y)) -static void busy_wait (ulong time) {u64 start, end;
kernel/trace/trace_dynevent.c +4 -0
@@ -239,6 +239,10 @@ static int dyn_event_open(struct inode *inode, struct file *file) {int ret; + ret =security_locked_down (LOCKDOWN_TRACEFS ); +if (ret) +return ret; + ret =tracing_check_open_get_tr (NULL );if (ret)return ret;
lib/btree.c +0 -1
@@ -43,7 +43,6 @@#include <linux/slab.h> #include <linux/module.h> -#define MAX (a, b) ((a) > (b) ? (a) : (b))#define NODESIZE MAX(L1_CACHE_BYTES, 128)struct btree_geo {
lib/decompress_unlzma.c +2 -0
@@ -37,7 +37,9 @@#include <linux/decompress/mm.h> +#ifndef MIN #define MIN (a, b) (((a) < (b)) ? (a) : (b)) +#endif static long long INIT read_int (unsigned char *ptr,int size) {
lib/logic_pio.c +0 -3
@@ -20,9 +20,6 @@static LIST_HEAD (io_range_list);static DEFINE_MUTEX (io_range_mutex); -/* Consider a kernel general helper for this */ -#define in_range (b, first, len) ((b) >= (first) && (b) < (first) + (len)) -/** * logic_pio_register_range - register logical PIO range for a host * @new_range: pointer to the IO range to be registered.
mm/gup.c +21 -7
@@ -1961,14 +1961,14 @@ struct page *get_dump_page(unsigned long addr)/* * Returns the number of collected pages. Return value is always >= 0. */ -static void collect_longterm_unpinnable_pages ( +static unsigned long collect_longterm_unpinnable_pages (struct list_head *movable_page_list,unsigned long nr_pages,struct page **pages) { +unsigned long i, collected =0 ;struct folio *prev_folio =NULL ; -bool drain_allow = true; -unsigned long i; +int drained =0 ;for (i =0 ; i < nr_pages; i++) {struct folio *folio =page_folio (pages[i]);
@@ -1980,6 +1980,8 @@ static void collect_longterm_unpinnable_pages(if (folio_is_longterm_pinnable (folio))continue ; + collected++; +if (folio_is_device_coherent (folio))continue ;
@@ -1988,9 +1990,17 @@ static void collect_longterm_unpinnable_pages(continue ; } -if (!folio_test_lru (folio) && drain_allow) { +if (drained ==0 &&folio_may_be_lru_cached (folio) && +folio_ref_count (folio) != +folio_expected_ref_count (folio) +1 ) { +lru_add_drain (); + drained =1 ; + } +if (drained ==1 &&folio_may_be_lru_cached (folio) && +folio_ref_count (folio) != +folio_expected_ref_count (folio) +1 ) {lru_add_drain_all (); - drain_allow = false; + drained =2 ; }if (folio_isolate_lru (folio))
@@ -2001,6 +2011,8 @@ static void collect_longterm_unpinnable_pages(NR_ISOLATED_ANON +folio_is_file_lru (folio), folio_nr_pages(folio)); } + +return collected; }/*
@@ -2093,10 +2105,12 @@ static int migrate_longterm_unpinnable_pages(static long check_and_migrate_movable_pages (unsigned long nr_pages,struct page **pages) { +unsigned long collected;LIST_HEAD (movable_page_list); -collect_longterm_unpinnable_pages (&movable_page_list, nr_pages, pages); -if (list_empty (&movable_page_list)) + collected =collect_longterm_unpinnable_pages (&movable_page_list, + nr_pages, pages); +if (!collected)return 0 ; return migrate_longterm_unpinnable_pages(&movable_page_list, nr_pages,
mm/kmsan/core.c +7 -3
@@ -258,7 +258,8 @@ void kmsan_internal_set_shadow_origin(void *addr, size_t size, int b, u32 origin, bool checked) {u64 address = (u64 )addr; -u32 *shadow_start, *origin_start; +void *shadow_start; +u32 *aligned_shadow, *origin_start;size_t pad =0 ;KMSAN_WARN_ON (!kmsan_metadata_is_contiguous (addr, size));
@@ -277,9 +278,12 @@ void kmsan_internal_set_shadow_origin(void *addr, size_t size, int b, }__memset (shadow_start, b, size); -if (!IS_ALIGNED (address,KMSAN_ORIGIN_SIZE )) { +if (IS_ALIGNED (address,KMSAN_ORIGIN_SIZE )) { + aligned_shadow = shadow_start; + }else { pad = address %KMSAN_ORIGIN_SIZE ; address -= pad; + aligned_shadow = shadow_start - pad; size += pad; } size =ALIGN (size,KMSAN_ORIGIN_SIZE );
@@ -293,7 +297,7 @@ void kmsan_internal_set_shadow_origin(void *addr, size_t size, int b,* corresponding shadow slot is zero. */ for (int i =0 ; i < size /KMSAN_ORIGIN_SIZE ; i++) { -if (origin || !shadow_start[i]) +if (origin || !aligned_shadow[i]) origin_start[i] = origin; } }
mm/kmsan/kmsan_test.c +16 -0
@@ -470,6 +470,21 @@ static void test_memcpy_aligned_to_unaligned2(struct kunit *test)KUNIT_EXPECT_TRUE (test,report_matches (&expect)); } +/* Test case: ensure that KMSAN does not access shadow memory out of bounds. */ +static void test_memset_on_guarded_buffer (struct kunit *test) +{ +void *buf =vmalloc (PAGE_SIZE ); + +kunit_info (test, +"memset() on ends of guarded buffer should not crash\n" ); + +for (size_t size =0 ; size <=128 ; size++) { +memset (buf,0xff , size); +memset (buf +PAGE_SIZE - size,0xff , size); + } +vfree (buf); +} + static noinline void fibonacci(int *array, int size, int start) {if (start <2 || (start == size))return ;
@@ -515,6 +530,7 @@ static struct kunit_case kmsan_test_cases[] = {KUNIT_CASE (test_memcpy_aligned_to_aligned),KUNIT_CASE (test_memcpy_aligned_to_unaligned),KUNIT_CASE (test_memcpy_aligned_to_unaligned2), +KUNIT_CASE (test_memset_on_guarded_buffer), KUNIT_CASE(test_long_origin_chain), {}, };
mm/migrate_device.c +20 -22
62 lines not on this page · raw message
mm/mlock.c +1 -1
@@ -256,7 +256,7 @@ void mlock_folio(struct folio *folio)folio_get (folio);if (!pagevec_add (pvec,mlock_lru (&folio->page)) || -folio_test_large (folio) ||lru_cache_disabled ()) + !folio_may_be_lru_cached (folio) ||lru_cache_disabled ())mlock_pagevec (pvec);local_unlock (&mlock_pvec.lock); }
mm/swap.c +2 -2
@@ -249,8 +249,8 @@ static void folio_batch_move_lru(struct folio_batch *fbatch, move_fn_t move_fn)static void folio_batch_add_and_move (struct folio_batch *fbatch,struct folio *folio,move_fn_t move_fn) { -if (folio_batch_add (fbatch, folio) && !folio_test_large (folio) && - !lru_cache_disabled ()) +if (folio_batch_add (fbatch, folio) && +folio_may_be_lru_cached (folio) && !lru_cache_disabled ())return ;folio_batch_move_lru (fbatch, move_fn); }
mm/zsmalloc.c +0 -1
@@ -123,7 +123,6 @@#define ISOLATED_BITS 3#define MAGIC_VAL_BITS 8 -#define MAX (a, b) ((a) >= (b) ? (a) : (b))/* ZS_MIN_ALLOC_SIZE must be multiple of ZS_ALIGN */ #define ZS_MIN_ALLOC_SIZE \ MAX(32, (ZS_MAX_PAGES_PER_ZSPAGE << PAGE_SHIFT >> OBJ_INDEX_BITS))
net/bluetooth/hci_event.c +23 -3
@@ -3125,8 +3125,18 @@ static void hci_conn_complete_evt(struct hci_dev *hdev, void *data,hci_dev_lock (hdev); +/* Check for existing connection: +* +* 1. If it doesn't exist then it must be receiver/slave role. +* 2. If it does exist confirm that it is connecting/BT_CONNECT in case +* of initiator/master role since there could be a collision where +* either side is attempting to connect or something like a fuzzing +* testing is trying to play tricks to destroy the hcon object before +* it even attempts to connect (e.g. hcon->state == BT_OPEN). +*/ conn =hci_conn_hash_lookup_ba (hdev, ev->link_type, &ev->bdaddr); -if (!conn) { +if (!conn || + (conn->role ==HCI_ROLE_MASTER && conn->state !=BT_CONNECT )) {/* In case of error status and there is no connection pending * just unlock as there is nothing to cleanup. */
@@ -5706,8 +5716,18 @@ static void le_conn_complete_evt(struct hci_dev *hdev, u8 status,*/ hci_dev_clear_flag (hdev,HCI_LE_ADV ); - conn =hci_conn_hash_lookup_ba (hdev,LE_LINK , bdaddr); -if (!conn) { +/* Check for existing connection: +* +* 1. If it doesn't exist then use the role to create a new object. +* 2. If it does exist confirm that it is connecting/BT_CONNECT in case +* of initiator/master role since there could be a collision where +* either side is attempting to connect or something like a fuzzing +* testing is trying to play tricks to destroy the hcon object before +* it even attempts to connect (e.g. hcon->state == BT_OPEN). +*/ + conn =hci_conn_hash_lookup_role (hdev,LE_LINK , role, bdaddr); +if (!conn || + (conn->role ==HCI_ROLE_MASTER && conn->state !=BT_CONNECT )) {/* In case of error status and there is no connection pending * just unlock as there is nothing to cleanup. */
net/bluetooth/hci_sync.c +7 -0
@@ -2595,6 +2595,13 @@ static int hci_resume_advertising_sync(struct hci_dev *hdev)hci_remove_ext_adv_instance_sync (hdev, adv->instance,NULL ); } + +/* If current advertising instance is set to instance 0x00 +* then we need to re-enable it. +*/ +if (!hdev->cur_adv_instance) + err =hci_enable_ext_advertising_sync (hdev, + hdev->cur_adv_instance); }else {/* Schedule for most recent instance to be restarted and begin * the software rotation loop
net/ipv4/nexthop.c +7 -0
@@ -2113,6 +2113,13 @@ static int replace_nexthop_single(struct net *net, struct nexthop *old,return -EINVAL ; } +if (!list_empty (&old->grp_list) && +rtnl_dereference (new->nh_info)->fdb_nh != +rtnl_dereference (old->nh_info)->fdb_nh) { +NL_SET_ERR_MSG (extack,"Cannot change nexthop FDB status while in a group" ); +return -EINVAL ; + } + err =call_nexthop_notifiers (net,NEXTHOP_EVENT_REPLACE , new, extack);if (err)return err;
net/ipv4/proc.c +1 -1
@@ -43,7 +43,7 @@#include <net/sock.h> #include <net/raw.h> -#define TCPUDP_MIB_MAX max_t(u32, UDP_MIB_MAX, TCP_MIB_MAX) +#define TCPUDP_MIB_MAX MAX_T(u32, UDP_MIB_MAX, TCP_MIB_MAX)/* * Report socket allocation statistics [[email protected]]
net/ipv6/proc.c +1 -1
@@ -27,7 +27,7 @@#include <net/ipv6.h> #define MAX4 (a, b, c, d) \ - max_t(u32, max_t(u32, a, b), max_t(u32, c, d)) + MAX_T(u32, MAX_T(u32, a, b), MAX_T(u32, c, d))#define SNMP_MIB_MAX MAX4(UDP_MIB_MAX, TCP_MIB_MAX, \ IPSTATS_MIB_MAX, ICMP_MIB_MAX)
net/netfilter/nf_nat_core.c +3 -3
@@ -242,7 +242,7 @@ static bool l4proto_in_range(const struct nf_conntrack_tuple *tuple,/* If we source map this tuple so reply looks like reply_tuple, will * that meet the constraints of range. */ -static int in_range (const struct nf_conntrack_tuple *tuple, +static int nf_in_range (const struct nf_conntrack_tuple *tuple,const struct nf_nat_range2 *range) {/* If we are supposed to map IPs, then we must be in the
@@ -291,7 +291,7 @@ find_appropriate_src(struct net *net, &ct->tuplehash[IP_CT_DIR_REPLY].tuple); result->dst = tuple->dst; -if (in_range (result, range)) +if (nf_in_range (result, range))return 1 ; } }
@@ -523,7 +523,7 @@ get_unique_tuple(struct nf_conntrack_tuple *tuple,if (maniptype ==NF_NAT_MANIP_SRC && !(range->flags &NF_NAT_RANGE_PROTO_RANDOM_ALL )) {/* try the original tuple first */ -if (in_range (orig_tuple, range)) { +if (nf_in_range (orig_tuple, range)) {if (!nf_nat_used_tuple (orig_tuple, ct)) { *tuple = *orig_tuple;return ;
net/tipc/core.h +1 -1
@@ -197,7 +197,7 @@ static inline int less(u16 left, u16 right)return less_eq (left, right) && (mod (right) !=mod (left)); } -static inline int in_range (u16 val,u16 min,u16 max) +static inline int tipc_in_range (u16 val,u16 min,u16 max) {return !less (val, min) && !more (val, max); }
net/tipc/link.c +5 -5
@@ -1624,7 +1624,7 @@ static int tipc_link_advance_transmq(struct tipc_link *l, struct tipc_link *r, last_ga->bgack_cnt); }/* Check against the last Gap ACK block */ -if (in_range (seqno, start, end)) +if (tipc_in_range (seqno, start, end))continue ;/* Update/release the packet peer is acking */ bc_has_acked = true;
@@ -2252,12 +2252,12 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb,strncpy (if_name, data,TIPC_MAX_IF_NAME );/* Update own tolerance if peer indicates a non-zero value */ -if (in_range (peers_tol,TIPC_MIN_LINK_TOL ,TIPC_MAX_LINK_TOL )) { +if (tipc_in_range (peers_tol,TIPC_MIN_LINK_TOL ,TIPC_MAX_LINK_TOL )) { l->tolerance = peers_tol; l->bc_rcvlink->tolerance = peers_tol; }/* Update own priority if peer's priority is higher */ -if (in_range (peers_prio, l->priority +1 ,TIPC_MAX_LINK_PRI )) +if (tipc_in_range (peers_prio, l->priority +1 ,TIPC_MAX_LINK_PRI )) l->priority = peers_prio;/* If peer is going down we want full re-establish cycle */
@@ -2300,13 +2300,13 @@ static int tipc_link_proto_rcv(struct tipc_link *l, struct sk_buff *skb, l->rcv_nxt_state =msg_seqno (hdr) +1 ;/* Update own tolerance if peer indicates a non-zero value */ -if (in_range (peers_tol,TIPC_MIN_LINK_TOL ,TIPC_MAX_LINK_TOL )) { +if (tipc_in_range (peers_tol,TIPC_MIN_LINK_TOL ,TIPC_MAX_LINK_TOL )) { l->tolerance = peers_tol; l->bc_rcvlink->tolerance = peers_tol; }/* Update own prio if peer indicates a different value */ if ((peers_prio != l->priority) && -in_range (peers_prio,1 ,TIPC_MAX_LINK_PRI )) { +tipc_in_range (peers_prio,1 ,TIPC_MAX_LINK_PRI )) { l->priority = peers_prio; rc =tipc_link_fsm_evt (l,LINK_FAILURE_EVT ); }
sound/usb/mixer_quirks.c +280 -15
366 lines not on this page · raw message
sound/usb/quirks.c +22 -2
@@ -2094,6 +2094,10 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_SET_IFACE_FIRST),DEVICE_FLG (0x0556 ,0x0014 ,/* Phoenix Audio TMX320VC */ QUIRK_FLAG_GET_SAMPLE_RATE ), +DEVICE_FLG (0x0572 ,0x1b08 ,/* Conexant Systems (Rockwell), Inc. */ +QUIRK_FLAG_MIXER_MIN_MUTE ), +DEVICE_FLG (0x0572 ,0x1b09 ,/* Conexant Systems (Rockwell), Inc. */ +QUIRK_FLAG_MIXER_MIN_MUTE ),DEVICE_FLG (0x05a3 ,0x9420 ,/* ELP HD USB Camera */ QUIRK_FLAG_GET_SAMPLE_RATE ), DEVICE_FLG(0x05a7, 0x1020, /* Bose Companion 5 */
@@ -2136,12 +2140,16 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_CTL_MSG_DELAY_1M),DEVICE_FLG (0x0b0e ,0x0349 ,/* Jabra 550a */ QUIRK_FLAG_CTL_MSG_DELAY_1M ), +DEVICE_FLG (0x0bda ,0x498a ,/* Realtek Semiconductor Corp. */ +QUIRK_FLAG_MIXER_MIN_MUTE ),DEVICE_FLG (0x0c45 ,0x6340 ,/* Sonix HD USB Camera */ QUIRK_FLAG_GET_SAMPLE_RATE ),DEVICE_FLG (0x0c45 ,0x636b ,/* Microdia JP001 USB Camera */ QUIRK_FLAG_GET_SAMPLE_RATE ), -DEVICE_FLG (0x0d8c ,0x0014 ,/* USB Audio Device */ -QUIRK_FLAG_CTL_MSG_DELAY_1M ), +DEVICE_FLG (0x0d8c ,0x000c ,/* C-Media */ +QUIRK_FLAG_MIXER_MIN_MUTE ), +DEVICE_FLG (0x0d8c ,0x0014 ,/* C-Media */ +QUIRK_FLAG_CTL_MSG_DELAY_1M |QUIRK_FLAG_MIXER_MIN_MUTE ),DEVICE_FLG (0x0ecb ,0x205c ,/* JBL Quantum610 Wireless */ QUIRK_FLAG_FIXED_RATE ), DEVICE_FLG(0x0ecb, 0x2069, /* JBL Quantum810 Wireless */
@@ -2150,6 +2158,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_SHARE_MEDIA_DEVICE | QUIRK_FLAG_ALIGN_TRANSFER),DEVICE_FLG (0x1101 ,0x0003 ,/* Audioengine D1 */ QUIRK_FLAG_GET_SAMPLE_RATE ), +DEVICE_FLG (0x12d1 ,0x3a07 ,/* Huawei Technologies Co., Ltd. */ +QUIRK_FLAG_MIXER_MIN_MUTE ),DEVICE_FLG (0x1224 ,0x2a25 ,/* Jieli Technology USB PHY 2.0 */ QUIRK_FLAG_GET_SAMPLE_RATE |QUIRK_FLAG_MIC_RES_16 ), DEVICE_FLG(0x1395, 0x740a, /* Sennheiser DECT */
@@ -2188,6 +2198,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_ITF_USB_DSD_DAC | QUIRK_FLAG_CTL_MSG_DELAY),DEVICE_FLG (0x1901 ,0x0191 ,/* GE B850V3 CP2114 audio interface */ QUIRK_FLAG_GET_SAMPLE_RATE ), +DEVICE_FLG (0x19f7 ,0x0003 ,/* RODE NT-USB */ +QUIRK_FLAG_MIXER_MIN_MUTE ),DEVICE_FLG (0x19f7 ,0x0035 ,/* RODE NT-USB+ */ QUIRK_FLAG_GET_SAMPLE_RATE ), DEVICE_FLG(0x1bcf, 0x2281, /* HD Webcam */
@@ -2238,6 +2250,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_IGNORE_CTL_ERROR),DEVICE_FLG (0x2912 ,0x30c8 ,/* Audioengine D1 */ QUIRK_FLAG_GET_SAMPLE_RATE ), +DEVICE_FLG (0x2a70 ,0x1881 ,/* OnePlus Technology (Shenzhen) Co., Ltd. BE02T */ +QUIRK_FLAG_MIXER_MIN_MUTE ),DEVICE_FLG (0x2b53 ,0x0023 ,/* Fiero SC-01 (firmware v1.0.0 @ 48 kHz) */ QUIRK_FLAG_GENERIC_IMPLICIT_FB ), DEVICE_FLG(0x2b53, 0x0024, /* Fiero SC-01 (firmware v1.0.0 @ 96 kHz) */
@@ -2248,10 +2262,14 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_CTL_MSG_DELAY_1M),DEVICE_FLG (0x2d95 ,0x8021 ,/* VIVO USB-C-XE710 HEADSET */ QUIRK_FLAG_CTL_MSG_DELAY_1M ), +DEVICE_FLG (0x2d99 ,0x0026 ,/* HECATE G2 GAMING HEADSET */ +QUIRK_FLAG_MIXER_MIN_MUTE ),DEVICE_FLG (0x2fc6 ,0xf0b7 ,/* iBasso DC07 Pro */ QUIRK_FLAG_CTL_MSG_DELAY_1M ),DEVICE_FLG (0x30be ,0x0101 ,/* Schiit Hel */ QUIRK_FLAG_IGNORE_CTL_ERROR ), +DEVICE_FLG (0x339b ,0x3a07 ,/* Synaptics HONOR USB-C HEADSET */ +QUIRK_FLAG_MIXER_MIN_MUTE ),DEVICE_FLG (0x413c ,0xa506 ,/* Dell AE515 sound bar */ QUIRK_FLAG_GET_SAMPLE_RATE ), DEVICE_FLG(0x534d, 0x0021, /* MacroSilicon MS2100/MS2106 */
@@ -2303,6 +2321,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_DSD_RAW),VENDOR_FLG (0x2d87 ,/* Cayin device */ QUIRK_FLAG_DSD_RAW ), +VENDOR_FLG (0x2fc6 ,/* Comture-inc devices */ +QUIRK_FLAG_DSD_RAW ),VENDOR_FLG (0x3336 ,/* HEM devices */ QUIRK_FLAG_DSD_RAW ), VENDOR_FLG(0x3353, /* Khadas devices */
sound/usb/usbaudio.h +4 -0
@@ -180,6 +180,9 @@ extern bool snd_usb_skip_validation;* for the given endpoint. * QUIRK_FLAG_MIC_RES_16 and QUIRK_FLAG_MIC_RES_384 * Set the fixed resolution for Mic Capture Volume (mostly for webcams) +* QUIRK_FLAG_MIXER_MIN_MUTE +* Set minimum volume control value as mute for devices where the lowest +* playback value represents muted state instead of minimum audible volume */ #define QUIRK_FLAG_GET_SAMPLE_RATE (1U << 0)
@@ -206,5 +209,6 @@ extern bool snd_usb_skip_validation;#define QUIRK_FLAG_FIXED_RATE (1U << 21)#define QUIRK_FLAG_MIC_RES_16 (1U << 22)#define QUIRK_FLAG_MIC_RES_384 (1U << 23) +#define QUIRK_FLAG_MIXER_MIN_MUTE (1U << 24)#endif /* __USBAUDIO_H */
tools/testing/selftests/bpf/progs/get_branch_snapshot.c +2 -2
@@ -15,7 +15,7 @@ long total_entries = 0;#define ENTRY_CNT 32struct perf_branch_entry entries[ENTRY_CNT ] = {}; -static inline bool in_range (__u64 val) +static inline bool gbs_in_range (__u64 val) {return (val >= address_low) && (val < address_high); }
@@ -31,7 +31,7 @@ int BPF_PROG(test1, int n, int ret)for (i =0 ; i <ENTRY_CNT ; i++) {if (i >= total_entries)break ; -if (in_range (entries[i].from) &&in_range (entries[i].to)) +if (gbs_in_range (entries[i].from) &&gbs_in_range (entries[i].to)) test1_hits++;else if (!test1_hits) wasted_entries++;
tools/testing/selftests/net/fib_nexthops.sh +6 -6
@@ -441,8 +441,8 @@ ipv6_fdb_grp_fcnal() log_test $? 0 "Get Fdb nexthop group by id" # fdb nexthop group can only contain fdb nexthops - run_cmd "$IP nexthop add id 63 via 2001:db8:91::4" - run_cmd "$IP nexthop add id 64 via 2001:db8:91::5" + run_cmd "$IP nexthop add id 63 via 2001:db8:91::4 dev veth1" + run_cmd "$IP nexthop add id 64 via 2001:db8:91::5 dev veth1" run_cmd "$IP nexthop add id 103 group 63/64 fdb" log_test $? 2 "Fdb Nexthop group with non-fdb nexthops"
@@ -521,15 +521,15 @@ ipv4_fdb_grp_fcnal() log_test $? 0 "Get Fdb nexthop group by id" # fdb nexthop group can only contain fdb nexthops - run_cmd "$IP nexthop add id 14 via 172.16.1.2" - run_cmd "$IP nexthop add id 15 via 172.16.1.3" + run_cmd "$IP nexthop add id 14 via 172.16.1.2 dev veth1" + run_cmd "$IP nexthop add id 15 via 172.16.1.3 dev veth1" run_cmd "$IP nexthop add id 103 group 14/15 fdb" log_test $? 2 "Fdb Nexthop group with non-fdb nexthops" # Non fdb nexthop group can not contain fdb nexthops run_cmd "$IP nexthop add id 16 via 172.16.1.2 fdb" run_cmd "$IP nexthop add id 17 via 172.16.1.3 fdb" - run_cmd "$IP nexthop add id 104 group 14/15" + run_cmd "$IP nexthop add id 104 group 16/17" log_test $? 2 "Non-Fdb Nexthop group with fdb nexthops" # fdb nexthop cannot have blackhole
@@ -556,7 +556,7 @@ ipv4_fdb_grp_fcnal() run_cmd "$BRIDGE fdb add 02:02:00:00:00:14 dev vx10 nhid 12 self" log_test $? 255 "Fdb mac add with nexthop" - run_cmd "$IP ro add 172.16.0.0/22 nhid 15" + run_cmd "$IP ro add 172.16.0.0/22 nhid 16" log_test $? 2 "Route add with fdb nexthop" run_cmd "$IP ro add 172.16.0.0/22 nhid 103"
tools/testing/selftests/seccomp/seccomp_bpf.c +2 -0
@@ -60,7 +60,9 @@#define SKIP (s, ...) XFAIL(s, ##__VA_ARGS__)#endif +#ifndef MIN #define MIN (X ,Y ) ((X) < (Y) ? (X) : (Y)) +#endif #ifndef PR_SET_PTRACER # define PR_SET_PTRACER 0x59616d61
tools/testing/selftests/vm/mremap_test.c +2 -0
@@ -22,7 +22,9 @@#define VALIDATION_DEFAULT_THRESHOLD 4/* 4MB */ #define VALIDATION_NO_THRESHOLD 0/* Verify the entire region */ +#ifndef MIN #define MIN (X ,Y ) ((X) < (Y) ? (X) : (Y)) +#endif struct config {unsigned long long src_alignment;