Linux 6.1.153
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.1.153 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
------------
Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml | 2 Documentation/networking/can.rst | 2 Makefile | 2 arch/x86/kvm/cpuid.c | 33 +- drivers/dma/dw/rzn1-dmamux.c | 15 drivers/dma/idxd/init.c | 33 +- drivers/dma/qcom/bam_dma.c | 8 drivers/dma/ti/edma.c | 4 drivers/edac/altera_edac.c | 1 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 drivers/gpu/drm/i915/display/intel_display_power.c | 6 drivers/input/misc/iqs7222.c | 3 drivers/input/serio/i8042-acpipnpio.h | 14 drivers/media/i2c/imx214.c | 27 + drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_scp.c | 4 drivers/media/platform/mediatek/vcodec/venc/venc_h264_if.c | 6 drivers/mtd/nand/raw/atmel/nand-controller.c | 18 - drivers/mtd/nand/raw/stm32_fmc2_nand.c | 46 +- drivers/net/can/xilinx_can.c | 16 drivers/net/ethernet/freescale/fec_main.c | 3 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 drivers/net/ethernet/intel/igb/igb_ethtool.c | 5 drivers/phy/tegra/xusb-tegra210.c | 6 drivers/phy/ti/phy-ti-pipe3.c | 13 drivers/regulator/sy7636a-regulator.c | 7 drivers/soc/qcom/mdt_loader.c | 14 drivers/tty/hvc/hvc_console.c | 6 drivers/tty/serial/sc16is7xx.c | 14 drivers/usb/gadget/udc/dummy_hcd.c | 8 drivers/usb/serial/option.c | 17 + fs/fuse/file.c | 5 fs/kernfs/file.c | 54 ++- fs/nfs/client.c | 2 fs/nfs/flexfilelayout/flexfilelayout.c | 21 - fs/nfs/nfs4proc.c | 6 fs/ocfs2/extent_map.c | 10 fs/proc/generic.c | 3 include/linux/compiler-clang.h | 29 + include/linux/pgalloc.h | 29 + include/linux/pgtable.h | 13 include/net/sock.h | 40 ++ kernel/time/hrtimer.c | 50 --- kernel/trace/trace.c | 10 kernel/trace/trace_events_synth.c | 2 mm/damon/lru_sort.c | 3 mm/damon/reclaim.c | 3 mm/damon/sysfs.c | 14 mm/kasan/init.c | 12 mm/kasan/kasan_test.c | 1 mm/khugepaged.c | 22 - mm/memory-failure.c | 7 mm/percpu.c | 6 mm/sparse-vmemmap.c | 6 net/can/j1939/bus.c | 5 net/can/j1939/socket.c | 3 net/ceph/messenger.c | 7 net/core/sock.c | 5 net/hsr/hsr_device.c | 163 +++++++++- net/hsr/hsr_main.c | 4 net/hsr/hsr_main.h | 4 net/hsr/hsr_slave.c | 18 - net/ipv4/ip_tunnel_core.c | 6 net/ipv4/tcp_bpf.c | 5 net/mptcp/sockopt.c | 11 net/sunrpc/sched.c | 2 samples/ftrace/ftrace-direct-modify.c | 2 sound/soc/qcom/qdsp6/q6apm-dai.c | 28 + 67 files changed, 667 insertions(+), 282 deletions(-)
Alan Stern (1):
USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels
Alex Deucher (1):
drm/amdgpu: fix a memory leak in fence cleanup when unloading
Alex Tran (1):
docs: networking: can: change bcm_msg_head frames member to support flexible array
Alexander Dahl (1):
mtd: nand: raw: atmel: Fix comment in timings preparation
Alexander Sverdlin (1):
mtd: nand: raw: atmel: Respect tAR, tCLR in read setup timing
Anders Roxell (1):
dmaengine: ti: edma: Fix memory allocation size for queue_priority_map
Andreas Kemnade (1):
regulator: sy7636a: fix lifecycle of power good gpio
André Apitzsch (1):
media: i2c: imx214: Fix link frequency validation
Anssi Hannula (1):
can: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB
Antoine Tenart (1):
tunnels: reset the GSO metadata before reusing the skb
Arnd Bergmann (1):
media: mtk-vcodec: venc: avoid -Wenum-compare-conditional warning
Bjorn Andersson (1):
soc: qcom: mdt_loader: Deal with zero e_shentsize
Boris Ostrovsky (1):
KVM: SVM: Return TSA_SQ_NO and TSA_L1_NO bits in __do_cpuid_func()
Borislav Petkov (AMD) (1):
KVM: SVM: Set synthesized TSA CPUID flags
Chen Ridong (1):
kernfs: Fix UAF in polling when open file is released
Christoffer Sandberg (1):
Input: i8042 - add TUXEDO InfinityBook Pro Gen10 AMD to i8042 quirk table
Christophe Kerello (2):
mtd: rawnand: stm32_fmc2: avoid overlapping mappings on ECC buffer
mtd: rawnand: stm32_fmc2: fix ECC overwrite
Dan Carpenter (2):
dmaengine: idxd: Fix double free in idxd_setup_wqs()
soc: qcom: mdt_loader: Fix error return values in mdt_header_valid()
Fabian Vogt (1):
tty: hvc_console: Call hvc_kick in hvc_write unconditionally
Fabio Porcedda (2):
USB: serial: option: add Telit Cinterion FN990A w/audio compositions
USB: serial: option: add Telit Cinterion LE910C4-WWX new compositions
Greg Kroah-Hartman (1):
Linux 6.1.153
Hangbin Liu (2):
hsr: use rtnl lock when iterating over ports
hsr: use hsr_for_each_port_rtnl in hsr_port_get_hsr
Harry Yoo (1):
mm: introduce and use {pgd,p4d}_populate_kernel()
Hugo Villeneuve (1):
serial: sc16is7xx: fix bug in flow control levels init
Ilya Dryomov (1):
libceph: fix invalid accesses to ceph_connection_v1_info
Jani Nikula (1):
drm/i915/power: fix size for for_each_set_bit() in abox iteration
Jeff LaBundy (1):
Input: iqs7222 - avoid enabling unused interrupts
Jiapeng Chong (2):
hrtimer: Remove unused function
hrtimer: Rename __hrtimer_hres_active() to hrtimer_hres_active()
Jiasheng Jiang (1):
media: mediatek: vcodec: Fix a resource leak related to the scp device in FW initialization
Johan Hovold (2):
phy: tegra: xusb: fix device and OF node leak at probe
phy: ti-pipe3: fix device leak at unbind
Jonathan Curley (1):
NFSv4/flexfiles: Fix layout merge mirror check.
Kim Phillips (1):
KVM: x86: Move open-coded CPUID leaf 0x80000021 EAX bit propagation code
Kohei Enju (1):
igb: fix link test skipping when interface is admin down
Krister Johansen (1):
mptcp: sockopt: make sync_socket_options propagate SOCK_KEEPOPEN
Krzysztof Kozlowski (1):
dt-bindings: serial: brcm,bcm7271-uart: Constrain clocks
Kuniyuki Iwashima (2):
net: Fix null-ptr-deref by sock_lock_init_class_and_name() and rmmod.
tcp_bpf: Call sk_msg_free() when tcp_bpf_send_verdict() fails to allocate psock->cork.
Luo Gengkun (1):
tracing: Fix tracing_marker may trigger page fault during preempt_disable
Mark Tinguely (1):
ocfs2: fix recursive semaphore deadlock in fiemap call
Miaohe Lin (1):
mm/memory-failure: fix VM_BUG_ON_PAGE(PagePoisoned(page)) when unpoison memory
Miaoqian Lin (1):
dmaengine: dw: dmamux: Fix device reference leak in rzn1_dmamux_route_allocate
Michal Schmidt (1):
i40e: fix IRQ freeing in i40e_vsi_request_irq_msix error path
Miklos Szeredi (2):
fuse: check if copy_file_range() returns larger than requested size
fuse: prevent overflow in copy_file_range return value
Murali Karicheri (2):
net: hsr: Add support for MC filtering at the slave device
net: hsr: Add VLAN CTAG filter support
Nathan Chancellor (1):
compiler-clang.h: define __SANITIZE_*__ macros only when undefined
Oleksij Rempel (1):
net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups
Paolo Abeni (1):
Revert "net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups"
Pu Lehui (1):
tracing: Silence warning when chunk allocation fails in trace_pid_write
Quanmin Yan (2):
mm/damon/reclaim: avoid divide-by-zero in damon_reclaim_apply_parameters() mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters()
Ravi Gunasekaran (2):
net: hsr: Disable promiscuous mode in offload mode
net: hsr: hsr_slave: Fix the promiscuous mode in offload mode
Salah Triki (1):
EDAC/altera: Delete an inappropriate dma_free_coherent() call
Srinivas Kandagatla (1):
ASoC: q6apm-dai: schedule all available frames to avoid dsp under-runs
Stanislav Fort (1):
mm/damon/sysfs: fix use-after-free in state_show()
Stefan Wahren (1):
net: fec: Fix possible NPD in fec_enet_phy_reset_after_clk_enable()
Stephan Gerhold (1):
dmaengine: qcom: bam_dma: Fix DT error handling for num-channels/ees
Steven Rostedt (1):
tracing: Do not add length to print format in synthetic events
Tetsuo Handa (2):
can: j1939: j1939_sk_bind(): call j1939_priv_put() immediately when j1939_local_ecu_get() failed
can: j1939: j1939_local_ecu_get(): undo increment when j1939_local_ecu_get() failsTigran Mkrtchyan (1):
flexfiles/pNFS: fix NULL checks on result of ff_layout_choose_ds_for_read
Trond Myklebust (4):
NFSv4: Don't clear capabilities that won't be reset
NFSv4: Clear the NFS_CAP_FS_LOCATIONS flag if it is not set
NFSv4: Clear the NFS_CAP_XATTR flag if not supported by the server Revert "SUNRPC: Don't allow waiting for exiting tasks"
Vishal Moola (Oracle) (1):
mm/khugepaged: convert hpage_collapse_scan_pmd() to use folios
Vladimir Riabchun (1):
ftrace/samples: Fix function size computation
Wei Yang (1):
mm/khugepaged: fix the address passed to notifier on testing young
Xiongfeng Wang (1):
hrtimers: Unconditionally update target CPU base after offline timer migration
Yeoreum Yun (1):
kunit: kasan_test: disable fortify string checker on kasan_strings() test
wangzijie (1):
proc: fix type confusion in pde_set_flags()
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml +1 -1
@@ -41,7 +41,7 @@ properties: - const: dma_intr2 clocks: - minItems: 1 + maxItems: 1 clock-names: const: sw_baud
Documentation/networking/can.rst +1 -1
@@ -740,7 +740,7 @@ The broadcast manager sends responses to user space in the same form: struct timeval ival1, ival2; /* count and subsequent interval */ canid_t can_id; /* unique can_id for task */ __u32 nframes; /* number of can_frames following */ - struct can_frame frames[0]; + struct can_frame frames[]; }; The aligned payload 'frames' uses the same basic CAN frame structure defined
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 1 -SUBLEVEL = 152 +SUBLEVEL = 153 EXTRAVERSION = NAME = Curry Ramen
arch/x86/kvm/cpuid.c +17 -16
@@ -749,6 +749,18 @@ void kvm_set_cpu_caps(void)0 /* SME */ |F (SEV ) |0 /* VM_PAGE_FLUSH */ |F (SEV_ES ) | F(SME_COHERENT)); +kvm_cpu_cap_mask (CPUID_8000_0021_EAX , +BIT (0 )/* NO_NESTED_DATA_BP */ | +BIT (2 )/* LFENCE Always serializing */ |0 /* SmmPgCfgLock */ | +BIT (5 )/* The memory form of VERW mitigates TSA */ | +BIT (6 )/* NULL_SEL_CLR_BASE */ |0 /* PrefetchCtlMsr */ + ); +if (cpu_feature_enabled (X86_FEATURE_LFENCE_RDTSC )) + kvm_cpu_caps[CPUID_8000_0021_EAX ] |=BIT (2 )/* LFENCE Always serializing */ ; +if (!static_cpu_has_bug (X86_BUG_NULL_SEG )) + kvm_cpu_caps[CPUID_8000_0021_EAX ] |=BIT (6 )/* NULL_SEL_CLR_BASE */ ; + kvm_cpu_caps[CPUID_8000_0021_EAX ] |=BIT (9 )/* NO_SMM_CTL_MSR */ ; + kvm_cpu_cap_mask(CPUID_C000_0001_EDX, F(XSTORE) | F(XSTORE_EN) | F(XCRYPT) | F(XCRYPT_EN) | F(ACE2) | F(ACE2_EN) | F(PHE) | F(PHE_EN) |
@@ -758,12 +770,15 @@ void kvm_set_cpu_caps(void)if (cpu_feature_enabled (X86_FEATURE_SRSO_NO ))kvm_cpu_cap_set (X86_FEATURE_SRSO_NO ); -kvm_cpu_cap_mask (CPUID_8000_0021_EAX ,F (VERW_CLEAR )); +kvm_cpu_cap_check_and_set (X86_FEATURE_VERW_CLEAR );kvm_cpu_cap_init_kvm_defined (CPUID_8000_0021_ECX ,F (TSA_SQ_NO ) |F (TSA_L1_NO ) ); +kvm_cpu_cap_check_and_set (X86_FEATURE_TSA_SQ_NO ); +kvm_cpu_cap_check_and_set (X86_FEATURE_TSA_L1_NO ); +/* * Hide RDTSCP and RDPID if either feature is reported as supported but * probing MSR_TSC_AUX failed. This is purely a sanity check and
@@ -1250,21 +1265,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)break ;case 0x80000021 : entry->ebx = entry->edx =0 ; -/* -* Pass down these bits: -* EAX 0 NNDBP, Processor ignores nested data breakpoints -* EAX 2 LAS, LFENCE always serializing -* EAX 6 NSCB, Null selector clear base -* -* Other defined bits are for MSRs that KVM does not expose: -* EAX 3 SPCL, SMM page configuration lock -* EAX 13 PCMSR, Prefetch control MSR -*/ - entry->eax &=BIT (0 ) |BIT (2 ) |BIT (6 ); -if (static_cpu_has (X86_FEATURE_LFENCE_RDTSC )) - entry->eax |=BIT (2 ); -if (!static_cpu_has_bug (X86_BUG_NULL_SEG )) - entry->eax |=BIT (6 ); +cpuid_entry_override (entry,CPUID_8000_0021_EAX );cpuid_entry_override (entry,CPUID_8000_0021_ECX );break ;/*Add support for Centaur's CPUID instruction*/
drivers/dma/dw/rzn1-dmamux.c +11 -4
@@ -46,12 +46,16 @@ static void *rzn1_dmamux_route_allocate(struct of_phandle_args *dma_spec,u32 mask;int ret; -if (dma_spec->args_count !=RNZ1_DMAMUX_NCELLS ) -return ERR_PTR (-EINVAL ); +if (dma_spec->args_count !=RNZ1_DMAMUX_NCELLS ) { + ret = -EINVAL ; + goto put_device; + } map =kzalloc (sizeof (*map),GFP_KERNEL ); -if (!map) -return ERR_PTR (-ENOMEM ); +if (!map) { + ret = -ENOMEM ; + goto put_device; + } chan = dma_spec->args[0 ]; map->req_idx = dma_spec->args[4 ];
@@ -92,12 +96,15 @@ static void *rzn1_dmamux_route_allocate(struct of_phandle_args *dma_spec,if (ret) goto clear_bitmap; +put_device (&pdev->dev);return map; clear_bitmap:clear_bit (map->req_idx, dmamux->used_chans); free_map:kfree (map); +put_device: +put_device (&pdev->dev);return ERR_PTR (ret); }
drivers/dma/idxd/init.c +17 -16
@@ -175,27 +175,30 @@ static int idxd_setup_wqs(struct idxd_device *idxd) idxd->wq_enable_map =bitmap_zalloc_node (idxd->max_wqs,GFP_KERNEL ,dev_to_node (dev));if (!idxd->wq_enable_map) { rc = -ENOMEM ; - goto err_bitmap; + goto err_free_wqs; }for (i =0 ; i < idxd->max_wqs; i++) { wq =kzalloc_node (sizeof (*wq),GFP_KERNEL ,dev_to_node (dev));if (!wq) { rc = -ENOMEM ; - goto err; + goto err_unwind; }idxd_dev_set_type (&wq->idxd_dev,IDXD_DEV_WQ ); conf_dev =wq_confdev (wq); wq->id = i; wq->idxd = idxd; -device_initialize (wq_confdev (wq)); +device_initialize (conf_dev); conf_dev->parent =idxd_confdev (idxd); conf_dev->bus = &dsa_bus_type; conf_dev->type = &idxd_wq_device_type; rc =dev_set_name (conf_dev,"wq%d.%d" , idxd->id, wq->id); -if (rc <0 ) - goto err; +if (rc <0 ) { +put_device (conf_dev); +kfree (wq); + goto err_unwind; + }mutex_init (&wq->wq_lock);init_waitqueue_head (&wq->err_queue);
@@ -206,15 +209,20 @@ static int idxd_setup_wqs(struct idxd_device *idxd) wq->enqcmds_retries =IDXD_ENQCMDS_RETRIES ; wq->wqcfg =kzalloc_node (idxd->wqcfg_size,GFP_KERNEL ,dev_to_node (dev));if (!wq->wqcfg) { +put_device (conf_dev); +kfree (wq); rc = -ENOMEM ; - goto err; + goto err_unwind; }if (idxd->hw.wq_cap.op_config) { wq->opcap_bmap =bitmap_zalloc (IDXD_MAX_OPCAP_BITS ,GFP_KERNEL );if (!wq->opcap_bmap) { +kfree (wq->wqcfg); +put_device (conf_dev); +kfree (wq); rc = -ENOMEM ; - goto err_opcap_bmap; + goto err_unwind; }bitmap_copy (wq->opcap_bmap, idxd->opcap_bmap,IDXD_MAX_OPCAP_BITS ); }
@@ -225,13 +233,7 @@ static int idxd_setup_wqs(struct idxd_device *idxd)return 0 ; -err_opcap_bmap: -kfree (wq->wqcfg); - -err: -put_device (conf_dev); -kfree (wq); - +err_unwind:while (--i >=0 ) { wq = idxd->wqs[i];if (idxd->hw.wq_cap.op_config)
@@ -240,11 +242,10 @@ static int idxd_setup_wqs(struct idxd_device *idxd) conf_dev =wq_confdev (wq);put_device (conf_dev);kfree (wq); - }bitmap_free (idxd->wq_enable_map); -err_bitmap: +err_free_wqs:kfree (idxd->wqs);return rc;
drivers/dma/qcom/bam_dma.c +6 -2
@@ -1277,13 +1277,17 @@ static int bam_dma_probe(struct platform_device *pdev)if (bdev->controlled_remotely || bdev->powered_remotely) { ret =of_property_read_u32 (pdev->dev.of_node,"num-channels" , &bdev->num_channels); -if (ret) +if (ret) {dev_err (bdev->dev,"num-channels unspecified in dt\n" ); +return ret; + } ret =of_property_read_u32 (pdev->dev.of_node,"qcom,num-ees" , &bdev->num_ees); -if (ret) +if (ret) {dev_err (bdev->dev,"num-ees unspecified in dt\n" ); +return ret; + } }if (bdev->controlled_remotely || bdev->powered_remotely)
drivers/dma/ti/edma.c +2 -2
@@ -2072,8 +2072,8 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata,* priority. So Q0 is the highest priority queue and the last queue has * the lowest priority. */ - queue_priority_map =devm_kcalloc (dev, ecc->num_tc +1 ,sizeof (s8), -GFP_KERNEL ); + queue_priority_map =devm_kcalloc (dev, ecc->num_tc +1 , +sizeof (*queue_priority_map),GFP_KERNEL );if (!queue_priority_map)return -ENOMEM ;
drivers/edac/altera_edac.c +0 -1
@@ -127,7 +127,6 @@ static ssize_t altr_sdr_mc_err_inject_write(struct file *file, ptemp =dma_alloc_coherent (mci->pdev,16 , &dma_handle,GFP_KERNEL );if (!ptemp) { -dma_free_coherent (mci->pdev,16 , ptemp, dma_handle);edac_printk (KERN_ERR ,EDAC_MC ,"Inject: Buffer Allocation error\n" );return -ENOMEM ;
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +0 -3
@@ -368,9 +368,6 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring)dma_fence_put (ring->vmid_wait); ring->vmid_wait =NULL ; ring->me =0 ; - -if (!ring->is_mes_queue) - ring->adev->rings[ring->idx] =NULL ; }/**
drivers/gpu/drm/i915/display/intel_display_power.c +3 -3
@@ -1122,7 +1122,7 @@ static void icl_mbus_init(struct drm_i915_private *dev_priv)if (DISPLAY_VER (dev_priv) ==12 ) abox_regs |=BIT (0 ); -for_each_set_bit (i, &abox_regs,sizeof (abox_regs)) +for_each_set_bit (i, &abox_regs,BITS_PER_TYPE (abox_regs))intel_de_rmw (dev_priv,MBUS_ABOX_CTL (i), mask, val); }
@@ -1587,11 +1587,11 @@ static void tgl_bw_buddy_init(struct drm_i915_private *dev_priv)if (table[config].page_mask ==0 ) {drm_dbg (&dev_priv->drm,"Unknown memory configuration; disabling address buddy logic.\n" ); -for_each_set_bit (i, &abox_mask,sizeof (abox_mask)) +for_each_set_bit (i, &abox_mask,BITS_PER_TYPE (abox_mask))intel_de_write (dev_priv,BW_BUDDY_CTL (i),BW_BUDDY_DISABLE ); }else { -for_each_set_bit (i, &abox_mask,sizeof (abox_mask)) { +for_each_set_bit (i, &abox_mask,BITS_PER_TYPE (abox_mask)) {intel_de_write (dev_priv,BW_BUDDY_PAGE_MASK (i), table[config].page_mask);
drivers/input/misc/iqs7222.c +3 -0
@@ -2038,6 +2038,9 @@ static int iqs7222_parse_chan(struct iqs7222_private *iqs7222,if (error)return error; +if (!iqs7222->kp_type[chan_index][i]) +continue ; +if (!dev_desc->event_offset)continue ;
drivers/input/serio/i8042-acpipnpio.h +14 -0
@@ -1155,6 +1155,20 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "XxHP4NAx"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "XxKK4NAx_XxSP4NAx"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, /* * A lot of modern Clevo barebones have touchpad and/or keyboard issues * after suspend fixable with the forcenorestore quirk.
drivers/media/i2c/imx214.c +19 -8
@@ -20,7 +20,9 @@#include <media/v4l2-subdev.h> #define IMX214_DEFAULT_CLK_FREQ 24000000 -#define IMX214_DEFAULT_LINK_FREQ 480000000 +#define IMX214_DEFAULT_LINK_FREQ 600000000 +/* Keep wrong link frequency for backward compatibility */ +#define IMX214_DEFAULT_LINK_FREQ_LEGACY 480000000#define IMX214_DEFAULT_PIXEL_RATE ((IMX214_DEFAULT_LINK_FREQ * 8LL) / 10)#define IMX214_FPS 30#define IMX214_MBUS_CODE MEDIA_BUS_FMT_SRGGB10_1X10
@@ -892,17 +894,26 @@ static int imx214_parse_fwnode(struct device *dev) goto done; } -for (i =0 ; i < bus_cfg.nr_of_link_frequencies; i++) +if (bus_cfg.nr_of_link_frequencies !=1 ) +dev_warn (dev,"Only one link-frequency supported, please review your DT. Continuing anyway\n" ); + +for (i =0 ; i < bus_cfg.nr_of_link_frequencies; i++) {if (bus_cfg.link_frequencies[i] ==IMX214_DEFAULT_LINK_FREQ )break ; - -if (i == bus_cfg.nr_of_link_frequencies) { -dev_err (dev,"link-frequencies %d not supported, Please review your DT\n" , -IMX214_DEFAULT_LINK_FREQ ); - ret = -EINVAL ; - goto done; +if (bus_cfg.link_frequencies[i] == +IMX214_DEFAULT_LINK_FREQ_LEGACY ) { +dev_warn (dev, +"link-frequencies %d not supported, please review your DT. Continuing anyway\n" , +IMX214_DEFAULT_LINK_FREQ ); +break ; + } } +if (i == bus_cfg.nr_of_link_frequencies) + ret =dev_err_probe (dev, -EINVAL , +"link-frequencies %d not supported, please review your DT\n" , +IMX214_DEFAULT_LINK_FREQ ); + done:v4l2_fwnode_endpoint_free (&bus_cfg);fwnode_handle_put (endpoint);
drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_scp.c +3 -1
@@ -65,8 +65,10 @@ struct mtk_vcodec_fw *mtk_vcodec_fw_scp_init(struct mtk_vcodec_dev *dev) } fw =devm_kzalloc (&dev->plat_dev->dev,sizeof (*fw),GFP_KERNEL ); -if (!fw) +if (!fw) { +scp_put (scp);return ERR_PTR (-ENOMEM ); + } fw->type =SCP ; fw->ops = &mtk_vcodec_rproc_msg; fw->scp = scp;
drivers/media/platform/mediatek/vcodec/venc/venc_h264_if.c +5 -1
@@ -611,7 +611,11 @@ static int h264_enc_init(struct mtk_vcodec_ctx *ctx) inst->ctx = ctx; inst->vpu_inst.ctx = ctx; - inst->vpu_inst.id = is_ext ?SCP_IPI_VENC_H264 :IPI_VENC_H264 ; +if (is_ext) + inst->vpu_inst.id =SCP_IPI_VENC_H264 ; +else + inst->vpu_inst.id =IPI_VENC_H264 ; + inst->hw_base =mtk_vcodec_get_reg_addr (inst->ctx,VENC_SYS );mtk_vcodec_debug_enter (inst);
drivers/mtd/nand/raw/atmel/nand-controller.c +14 -4
@@ -1378,13 +1378,23 @@ static int atmel_smc_nand_prepare_smcconf(struct atmel_nand *nand,return ret;/* -* The write cycle timing is directly matching tWC, but is also +* Read setup timing depends on the operation done on the NAND: +* +* NRD_SETUP = max(tAR, tCLR) +*/ + timeps =max (conf->timings.sdr.tAR_min, conf->timings.sdr.tCLR_min); + ncycles =DIV_ROUND_UP (timeps, mckperiodps); + totalcycles += ncycles; + ret =atmel_smc_cs_conf_set_setup (smcconf,ATMEL_SMC_NRD_SHIFT , ncycles); +if (ret) +return ret; + +/* +* The read cycle timing is directly matching tRC, but is also * dependent on the setup and hold timings we calculated earlier, * which gives: * -* NRD_CYCLE = max(tRC, NRD_PULSE + NRD_HOLD) -* -* NRD_SETUP is always 0. +* NRD_CYCLE = max(tRC, NRD_SETUP + NRD_PULSE + NRD_HOLD) */ ncycles =DIV_ROUND_UP (conf->timings.sdr.tRC_min, mckperiodps); ncycles =max (totalcycles, ncycles);
drivers/mtd/nand/raw/stm32_fmc2_nand.c +24 -22
95 lines not on this page · raw message
drivers/net/can/xilinx_can.c +8 -8
@@ -622,14 +622,6 @@ static void xcan_write_frame(struct net_device *ndev, struct sk_buff *skb, dlc |=XCAN_DLCR_EDL_MASK ; } -if (!(priv->devtype.flags &XCAN_FLAG_TX_MAILBOXES ) && - (priv->devtype.flags &XCAN_FLAG_TXFEMP )) -can_put_echo_skb (skb, ndev, priv->tx_head % priv->tx_max,0 ); -else -can_put_echo_skb (skb, ndev,0 ,0 ); - - priv->tx_head++; - priv->write_reg (priv,XCAN_FRAME_ID_OFFSET (frame_offset), id);/* If the CAN frame is RTR frame this write triggers transmission * (not on CAN FD)
@@ -662,6 +654,14 @@ static void xcan_write_frame(struct net_device *ndev, struct sk_buff *skb, data[1]); } } + +if (!(priv->devtype.flags &XCAN_FLAG_TX_MAILBOXES ) && + (priv->devtype.flags &XCAN_FLAG_TXFEMP )) +can_put_echo_skb (skb, ndev, priv->tx_head % priv->tx_max,0 ); +else +can_put_echo_skb (skb, ndev,0 ,0 ); + + priv->tx_head++; }/**
drivers/net/ethernet/freescale/fec_main.c +2 -1
@@ -2137,7 +2137,8 @@ static void fec_enet_phy_reset_after_clk_enable(struct net_device *ndev)*/ phy_dev =of_phy_find_device (fep->phy_node);phy_reset_after_clk_enable (phy_dev); -put_device (&phy_dev->mdio.dev); +if (phy_dev) +put_device (&phy_dev->mdio.dev); } }
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
@@ -4179,7 +4179,7 @@ static int i40e_vsi_request_irq_msix(struct i40e_vsi *vsi, char *basename) irq_num = pf->msix_entries[base + vector].vector;irq_set_affinity_notifier (irq_num,NULL );irq_update_affinity_hint (irq_num,NULL ); -free_irq (irq_num, &vsi->q_vectors[vector]); +free_irq (irq_num, vsi->q_vectors[vector]); }return err; }
drivers/net/ethernet/intel/igb/igb_ethtool.c +1 -4
@@ -2081,11 +2081,8 @@ static void igb_diag_test(struct net_device *netdev, }else {dev_info (&adapter->pdev->dev,"online testing starting\n" ); -/* PHY is powered down when interface is down */ -if (if_running &&igb_link_test (adapter, &data[TEST_LINK ])) +if (igb_link_test (adapter, &data[TEST_LINK ])) eth_test->flags |=ETH_TEST_FL_FAILED ; -else - data[TEST_LINK ] =0 ;/* Online tests aren't run; pass by default */ data[TEST_REG ] =0 ;
drivers/phy/tegra/xusb-tegra210.c +5 -1
@@ -3165,18 +3165,22 @@ tegra210_xusb_padctl_probe(struct device *dev, } pdev =of_find_device_by_node (np); +of_node_put (np);if (!pdev) {dev_warn (dev,"PMC device is not available\n" ); goto out; } -if (!platform_get_drvdata (pdev)) +if (!platform_get_drvdata (pdev)) { +put_device (&pdev->dev);return ERR_PTR (-EPROBE_DEFER ); + } padctl->regmap =dev_get_regmap (&pdev->dev,"usb_sleepwalk" );if (!padctl->regmap)dev_info (dev,"failed to find PMC regmap\n" ); +put_device (&pdev->dev); out:return &padctl->base; }
drivers/phy/ti/phy-ti-pipe3.c +13 -0
@@ -666,12 +666,20 @@ static int ti_pipe3_get_clk(struct ti_pipe3 *phy)return 0 ; } +static void ti_pipe3_put_device (void *_dev) +{ +struct device *dev = _dev; + +put_device (dev); +} +static int ti_pipe3_get_sysctrl (struct ti_pipe3 *phy) {struct device *dev = phy->dev;struct device_node *node = dev->of_node;struct device_node *control_node;struct platform_device *control_pdev; +int ret; phy->phy_power_syscon =syscon_regmap_lookup_by_phandle (node,"syscon-phy-power" );
@@ -703,6 +711,11 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy) } phy->control_dev = &control_pdev->dev; + + ret =devm_add_action_or_reset (dev, ti_pipe3_put_device, + phy->control_dev); +if (ret) +return ret; }if (phy->mode ==PIPE3_MODE_PCIE ) {
drivers/regulator/sy7636a-regulator.c +4 -3
@@ -83,9 +83,11 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)if (!regmap)return -EPROBE_DEFER ; - gdp =devm_gpiod_get (pdev->dev.parent,"epd-pwr-good" ,GPIOD_IN ); +device_set_of_node_from_dev (&pdev->dev, pdev->dev.parent); + + gdp =devm_gpiod_get (&pdev->dev,"epd-pwr-good" ,GPIOD_IN );if (IS_ERR (gdp)) { -dev_err (pdev->dev.parent,"Power good GPIO fault %ld\n" ,PTR_ERR (gdp)); +dev_err (&pdev->dev,"Power good GPIO fault %ld\n" ,PTR_ERR (gdp));return PTR_ERR (gdp); }
@@ -105,7 +107,6 @@ static int sy7636a_regulator_probe(struct platform_device *pdev) } config.dev = &pdev->dev; - config.dev->of_node = pdev->dev.parent->of_node; config.regmap = regmap; rdev =devm_regulator_register (&pdev->dev, &desc, &config);
drivers/soc/qcom/mdt_loader.c +8 -6
@@ -32,18 +32,20 @@ static bool mdt_header_valid(const struct firmware *fw)return false;if (ehdr->e_phentsize !=sizeof (struct elf32_phdr )) -return -EINVAL ; +return false; phend =size_add (size_mul (sizeof (struct elf32_phdr ), ehdr->e_phnum), ehdr->e_phoff);if (phend > fw->size)return false; -if (ehdr->e_shentsize !=sizeof (struct elf32_shdr )) -return -EINVAL ; +if (ehdr->e_shentsize || ehdr->e_shnum) { +if (ehdr->e_shentsize !=sizeof (struct elf32_shdr )) +return false; - shend =size_add (size_mul (sizeof (struct elf32_shdr ), ehdr->e_shnum), ehdr->e_shoff); -if (shend > fw->size) -return false; + shend =size_add (size_mul (sizeof (struct elf32_shdr ), ehdr->e_shnum), ehdr->e_shoff); +if (shend > fw->size) +return false; + }return true; }
drivers/tty/hvc/hvc_console.c +3 -3
@@ -543,10 +543,10 @@ static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count }/* -* Racy, but harmless, kick thread if there is still pending data. +* Kick thread to flush if there's still pending data +* or to wakeup the write queue. */ -if (hp->n_outbuf) -hvc_kick (); +hvc_kick ();return written; }
drivers/tty/serial/sc16is7xx.c +2 -12
@@ -1166,17 +1166,6 @@ static int sc16is7xx_startup(struct uart_port *port)sc16is7xx_port_write (port,SC16IS7XX_FCR_REG ,SC16IS7XX_FCR_FIFO_BIT ); -/* Enable EFR */ -sc16is7xx_port_write (port,SC16IS7XX_LCR_REG , -SC16IS7XX_LCR_CONF_MODE_B ); - -regcache_cache_bypass (one->regmap, true); - -/* Enable write access to enhanced features and internal clock div */ -sc16is7xx_port_update (port,SC16IS7XX_EFR_REG , -SC16IS7XX_EFR_ENABLE_BIT , -SC16IS7XX_EFR_ENABLE_BIT ); -/* Enable TCR/TLR */ sc16is7xx_port_update(port, SC16IS7XX_MCR_REG, SC16IS7XX_MCR_TCRTLR_BIT,
@@ -1188,7 +1177,8 @@ static int sc16is7xx_startup(struct uart_port *port)SC16IS7XX_TCR_RX_RESUME (24 ) | SC16IS7XX_TCR_RX_HALT(48)); -regcache_cache_bypass (one->regmap, false); +/* Disable TCR/TLR access */ +sc16is7xx_port_update (port,SC16IS7XX_MCR_REG ,SC16IS7XX_MCR_TCRTLR_BIT ,0 );/* Now, initialize the UART */ sc16is7xx_port_write (port,SC16IS7XX_LCR_REG ,SC16IS7XX_LCR_WORD_LEN_8 );
drivers/usb/gadget/udc/dummy_hcd.c +4 -4
@@ -764,8 +764,7 @@ static int dummy_dequeue(struct usb_ep *_ep, struct usb_request *_req)if (!dum->driver)return -ESHUTDOWN ; -local_irq_save (flags); -spin_lock (&dum->lock); +spin_lock_irqsave (&dum->lock, flags);list_for_each_entry (iter, &ep->queue, queue) {if (&iter->req != _req)continue ;
@@ -775,15 +774,16 @@ static int dummy_dequeue(struct usb_ep *_ep, struct usb_request *_req) retval =0 ;break ; } -spin_unlock (&dum->lock);if (retval ==0 ) {dev_dbg (udc_dev (dum),"dequeued req %p from %s, len %d buf %p\n" , req, _ep->name, _req->length, _req->buf); +spin_unlock (&dum->lock);usb_gadget_giveback_request (_ep, _req); +spin_lock (&dum->lock); } -local_irq_restore (flags); +spin_unlock_irqrestore (&dum->lock, flags);return retval; }
drivers/usb/serial/option.c +17 -0
@@ -1322,7 +1322,18 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1033, 0xff), /* Telit LE910C1-EUX (ECM) */ .driver_info = NCTRL(0) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1034, 0xff), /* Telit LE910C4-WWX (rmnet) */ + .driver_info = RSVD(2) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1035, 0xff) }, /* Telit LE910C4-WWX (ECM) */ + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1036, 0xff) }, /* Telit LE910C4-WWX */ + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1037, 0xff), /* Telit LE910C4-WWX (rmnet) */ + .driver_info = NCTRL(0) | NCTRL(1) | RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1038, 0xff), /* Telit LE910C4-WWX (rmnet) */ + .driver_info = NCTRL(0) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x103b, 0xff), /* Telit LE910C4-WWX */ + .driver_info = NCTRL(0) | NCTRL(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x103c, 0xff), /* Telit LE910C4-WWX */ + .driver_info = NCTRL(0) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG0), .driver_info = RSVD(0) | RSVD(1) | NCTRL(2) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG1),
@@ -1369,6 +1380,12 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990A (PCIe) */ .driver_info = RSVD(0) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1077, 0xff), /* Telit FN990A (rmnet + audio) */ + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1078, 0xff), /* Telit FN990A (MBIM + audio) */ + .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1079, 0xff), /* Telit FN990A (RNDIS + audio) */ + .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1080, 0xff), /* Telit FE990A (rmnet) */ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1081, 0xff), /* Telit FE990A (MBIM) */
fs/fuse/file.c +4 -1
@@ -3103,7 +3103,7 @@ static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in, .nodeid_out = ff_out->nodeid, .fh_out = ff_out->fh, .off_out = pos_out, - .len = len, + .len = min_t(size_t, len, UINT_MAX & PAGE_MASK), .flags = flags };struct fuse_write_out outarg;
@@ -3169,6 +3169,9 @@ static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in, fc->no_copy_file_range =1 ; err = -EOPNOTSUPP ; } +if (!err && outarg.size > len) + err = -EIO ; +if (err) goto out;
fs/kernfs/file.c +36 -18
167 lines not on this page · raw message
fs/nfs/client.c +2 -0
@@ -859,6 +859,8 @@ static void nfs_server_set_fsinfo(struct nfs_server *server,if (fsinfo->xattr_support) server->caps |=NFS_CAP_XATTR ; +else + server->caps &= ~NFS_CAP_XATTR ;#endif }
fs/nfs/flexfilelayout/flexfilelayout.c +13 -8
@@ -276,7 +276,7 @@ ff_lseg_match_mirrors(struct pnfs_layout_segment *l1, struct pnfs_layout_segment *l2) {const struct nfs4_ff_layout_segment *fl1 =FF_LAYOUT_LSEG (l1); -const struct nfs4_ff_layout_segment *fl2 =FF_LAYOUT_LSEG (l1); +const struct nfs4_ff_layout_segment *fl2 =FF_LAYOUT_LSEG (l2);u32 i;if (fl1->mirror_array_cnt != fl2->mirror_array_cnt)
@@ -756,8 +756,11 @@ ff_layout_choose_ds_for_read(struct pnfs_layout_segment *lseg,continue ;if (check_device && -nfs4_test_deviceid_unavailable (&mirror->mirror_ds->id_node)) +nfs4_test_deviceid_unavailable (&mirror->mirror_ds->id_node)) { +// reinitialize the error state in case if this is the last iteration + ds =ERR_PTR (-EINVAL );continue ; + } *best_idx = idx;break ;
@@ -787,7 +790,7 @@ ff_layout_choose_best_ds_for_read(struct pnfs_layout_segment *lseg,struct nfs4_pnfs_ds *ds; ds =ff_layout_choose_valid_ds_for_read (lseg, start_idx, best_idx); -if (ds) +if (!IS_ERR (ds))return ds;return ff_layout_choose_any_ds_for_read (lseg, start_idx, best_idx); }
@@ -801,7 +804,7 @@ ff_layout_get_ds_for_read(struct nfs_pageio_descriptor *pgio, ds =ff_layout_choose_best_ds_for_read (lseg, pgio->pg_mirror_idx, best_idx); -if (ds || !pgio->pg_mirror_idx) +if (!IS_ERR (ds) || !pgio->pg_mirror_idx)return ds;return ff_layout_choose_best_ds_for_read (lseg,0 , best_idx); }
@@ -859,7 +862,7 @@ ff_layout_pg_init_read(struct nfs_pageio_descriptor *pgio, req->wb_nio =0 ; ds =ff_layout_get_ds_for_read (pgio, &ds_idx); -if (!ds) { +if (IS_ERR (ds)) {if (!ff_layout_no_fallback_to_mds (pgio->pg_lseg)) goto out_mds;pnfs_generic_pg_cleanup (pgio);
@@ -1063,11 +1066,13 @@ static void ff_layout_resend_pnfs_read(struct nfs_pgio_header *hdr) {u32 idx = hdr->pgio_mirror_idx +1 ;u32 new_idx =0 ; +struct nfs4_pnfs_ds *ds; -if (ff_layout_choose_any_ds_for_read (hdr->lseg, idx, &new_idx)) -ff_layout_send_layouterror (hdr->lseg); -else + ds =ff_layout_choose_any_ds_for_read (hdr->lseg, idx, &new_idx); +if (IS_ERR (ds))pnfs_error_mark_layout_for_return (hdr->inode, hdr->lseg); +else +ff_layout_send_layouterror (hdr->lseg);pnfs_read_resend_pnfs (hdr, new_idx); }
fs/nfs/nfs4proc.c +3 -3
@@ -3888,8 +3888,9 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f res.attr_bitmask[2 ] &=FATTR4_WORD2_NFS42_MASK ; }memcpy (server->attr_bitmask, res.attr_bitmask,sizeof (server->attr_bitmask)); - server->caps &= ~(NFS_CAP_ACLS |NFS_CAP_HARDLINKS | -NFS_CAP_SYMLINKS |NFS_CAP_SECURITY_LABEL ); + server->caps &= + ~(NFS_CAP_ACLS |NFS_CAP_HARDLINKS |NFS_CAP_SYMLINKS | +NFS_CAP_SECURITY_LABEL |NFS_CAP_FS_LOCATIONS ); server->fattr_valid =NFS_ATTR_FATTR_V4 ;if (res.attr_bitmask[0 ] &FATTR4_WORD0_ACL && res.acl_bitmask &ACL4_SUPPORT_ALLOW_ACL )
@@ -3957,7 +3958,6 @@ int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle) };int err; -nfs_server_set_init_caps (server); do { err = nfs4_handle_exception(server, _nfs4_server_capabilities(server, fhandle),
fs/ocfs2/extent_map.c +9 -1
@@ -696,6 +696,8 @@ int ocfs2_extent_map_get_blocks(struct inode *inode, u64 v_blkno, u64 *p_blkno,* it not only handles the fiemap for inlined files, but also deals * with the fast symlink, cause they have no difference for extent * mapping per se. +* +* Must be called with ip_alloc_sem semaphore held. */ static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh, struct fiemap_extent_info *fieinfo,
@@ -707,6 +709,7 @@ static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh,u64 phys;u32 flags =FIEMAP_EXTENT_DATA_INLINE |FIEMAP_EXTENT_LAST ;struct ocfs2_inode_info *oi =OCFS2_I (inode); +lockdep_assert_held_read (&oi->ip_alloc_sem); di = (struct ocfs2_dinode *)di_bh->b_data;if (ocfs2_inode_is_fast_symlink (inode))
@@ -722,8 +725,11 @@ static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh, phys += offsetof(struct ocfs2_dinode , id2.i_data.id_data); +/* Release the ip_alloc_sem to prevent deadlock on page fault */ +up_read (&OCFS2_I (inode)->ip_alloc_sem); ret =fiemap_fill_next_extent (fieinfo,0 , phys, id_count, flags); +down_read (&OCFS2_I (inode)->ip_alloc_sem);if (ret <0 )return ret; }
@@ -792,9 +798,11 @@ int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, len_bytes = (u64 )le16_to_cpu (rec.e_leaf_clusters) << osb->s_clustersize_bits; phys_bytes =le64_to_cpu (rec.e_blkno) << osb->sb->s_blocksize_bits; virt_bytes = (u64 )le32_to_cpu (rec.e_cpos) << osb->s_clustersize_bits; - +/* Release the ip_alloc_sem to prevent deadlock on page fault */ +up_read (&OCFS2_I (inode)->ip_alloc_sem); ret =fiemap_fill_next_extent (fieinfo, virt_bytes, phys_bytes, len_bytes, fe_flags); +down_read (&OCFS2_I (inode)->ip_alloc_sem);if (ret)break ;
fs/proc/generic.c +2 -1
@@ -389,7 +389,8 @@ struct proc_dir_entry *proc_register(struct proc_dir_entry *dir,if (proc_alloc_inum (&dp->low_ino)) goto out_free_entry; -pde_set_flags (dp); +if (!S_ISDIR (dp->mode)) +pde_set_flags (dp);write_lock (&proc_subdir_lock); dp->parent = dir;
include/linux/compiler-clang.h +24 -5
@@ -23,23 +23,42 @@#define KASAN_ABI_VERSION 5/* +* Clang 22 added preprocessor macros to match GCC, in hopes of eventually +* dropping __has_feature support for sanitizers: +* https://github.com/llvm/llvm-project/commit/568c23bbd3303518c5056d7f03444dae4fdc8a9c +* Create these macros for older versions of clang so that it is easy to clean +* up once the minimum supported version of LLVM for building the kernel always +* creates these macros. +* * Note: Checking __has_feature(*_sanitizer) is only true if the feature is * enabled. Therefore it is not required to additionally check defined(CONFIG_*) * to avoid adding redundant attributes in other configurations. */ +#if __has_feature (address_sanitizer) && !defined(__SANITIZE_ADDRESS__) +#define __SANITIZE_ADDRESS__ +#endif +#if __has_feature (hwaddress_sanitizer) && !defined(__SANITIZE_HWADDRESS__) +#define __SANITIZE_HWADDRESS__ +#endif +#if __has_feature (thread_sanitizer) && !defined(__SANITIZE_THREAD__) +#define __SANITIZE_THREAD__ +#endif -#if __has_feature (address_sanitizer) ||__has_feature (hwaddress_sanitizer) -/* Emulate GCC's __SANITIZE_ADDRESS__ flag */ +/* +* Treat __SANITIZE_HWADDRESS__ the same as __SANITIZE_ADDRESS__ in the kernel. +*/ +#ifdef __SANITIZE_HWADDRESS__#define __SANITIZE_ADDRESS__ +#endif + +#ifdef __SANITIZE_ADDRESS__#define __no_sanitize_address \ __attribute__((no_sanitize("address", "hwaddress")))#else #define __no_sanitize_address#endif -#if __has_feature (thread_sanitizer) -/* emulate gcc's __SANITIZE_THREAD__ flag */ -#define __SANITIZE_THREAD__ +#ifdef __SANITIZE_THREAD__#define __no_sanitize_thread \ __attribute__((no_sanitize("thread")))#else
include/linux/pgalloc.h new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_PGALLOC_H +#define _LINUX_PGALLOC_H + +#include <linux/pgtable.h> +#include <asm/pgalloc.h> + +/* +* {pgd,p4d}_populate_kernel() are defined as macros to allow +* compile-time optimization based on the configured page table levels. +* Without this, linking may fail because callers (e.g., KASAN) may rely +* on calls to these functions being optimized away when passing symbols +* that exist only for certain page table levels. +*/ +#define pgd_populate_kernel (addr, pgd, p4d) \ + do { \ + pgd_populate(&init_mm, pgd, p4d); \ + if (ARCH_PAGE_TABLE_SYNC_MASK & PGTBL_PGD_MODIFIED) \ + arch_sync_kernel_mappings(addr, addr); \ + } while (0) + +#define p4d_populate_kernel (addr, p4d, pud) \ + do { \ + p4d_populate(&init_mm, p4d, pud); \ + if (ARCH_PAGE_TABLE_SYNC_MASK & PGTBL_P4D_MODIFIED) \ + arch_sync_kernel_mappings(addr, addr); \ + } while (0) + +#endif /* _LINUX_PGALLOC_H */
include/linux/pgtable.h +7 -6
@@ -1474,8 +1474,8 @@ static inline int pmd_protnone(pmd_t pmd)/* * Architectures can set this mask to a combination of PGTBL_P?D_MODIFIED values -* and let generic vmalloc and ioremap code know when arch_sync_kernel_mappings() -* needs to be called. +* and let generic vmalloc, ioremap and page table update code know when +* arch_sync_kernel_mappings() needs to be called. */ #ifndef ARCH_PAGE_TABLE_SYNC_MASK #define ARCH_PAGE_TABLE_SYNC_MASK 0
@@ -1608,10 +1608,11 @@ static inline bool arch_has_pfn_modify_check(void)/* * Page Table Modification bits for pgtbl_mod_mask. * -* These are used by the p?d_alloc_track*() set of functions an in the generic -* vmalloc/ioremap code to track at which page-table levels entries have been -* modified. Based on that the code can better decide when vmalloc and ioremap -* mapping changes need to be synchronized to other page-tables in the system. +* These are used by the p?d_alloc_track*() and p*d_populate_kernel() +* functions in the generic vmalloc, ioremap and page table update code +* to track at which page-table levels entries have been modified. +* Based on that the code can better decide when page table changes need +* to be synchronized to other page-tables in the system. */ #define __PGTBL_PGD_MODIFIED 0#define __PGTBL_P4D_MODIFIED 1
include/net/sock.h +38 -2
@@ -350,6 +350,8 @@ struct sk_filter;* @sk_txtime_unused: unused txtime flags * @ns_tracker: tracker for netns reference * @sk_bind2_node: bind node in the bhash2 table +* @sk_owner: reference to the real owner of the socket that calls +* sock_lock_init_class_and_name(). */ struct sock {/*
@@ -541,6 +543,10 @@ struct sock {struct rcu_head sk_rcu;netns_tracker ns_tracker;struct hlist_node sk_bind2_node; + +#if IS_ENABLED (CONFIG_PROVE_LOCKING ) &&IS_ENABLED (CONFIG_MODULES ) +struct module *sk_owner; +#endif };enum sk_pacing {
@@ -1724,6 +1730,35 @@ static inline void sk_mem_uncharge(struct sock *sk, int size)sk_mem_reclaim (sk); } +#if IS_ENABLED (CONFIG_PROVE_LOCKING ) &&IS_ENABLED (CONFIG_MODULES ) +static inline void sk_owner_set (struct sock *sk,struct module *owner) +{ +__module_get (owner); + sk->sk_owner = owner; +} + +static inline void sk_owner_clear (struct sock *sk) +{ + sk->sk_owner =NULL ; +} + +static inline void sk_owner_put (struct sock *sk) +{ +module_put (sk->sk_owner); +} +#else +static inline void sk_owner_set (struct sock *sk,struct module *owner) +{ +} + +static inline void sk_owner_clear (struct sock *sk) +{ +} + +static inline void sk_owner_put (struct sock *sk) +{ +} +#endif /* * Macro so as to not evaluate some arguments when * lockdep is not enabled.
@@ -1733,13 +1768,14 @@ static inline void sk_mem_uncharge(struct sock *sk, int size)*/ #define sock_lock_init_class_and_name (sk, sname, skey, name, key) \ do { \ + sk_owner_set(sk, THIS_MODULE); \ sk->sk_lock.owned = 0; \ init_waitqueue_head(&sk->sk_lock.wq); \ spin_lock_init(&(sk)->sk_lock.slock); \ debug_check_no_locks_freed((void *)&(sk)->sk_lock, \ - sizeof((sk)->sk_lock)); \ + sizeof((sk)->sk_lock)); \ lockdep_set_class_and_name(&(sk)->sk_lock.slock, \ - (skey), (sname)); \ + (skey), (sname)); \ lockdep_init_map(&(sk)->sk_lock.dep_map, (name), (key), 0); \ } while (0)
kernel/time/hrtimer.c +11 -39
112 lines not on this page · raw message
kernel/trace/trace.c +7 -3
@@ -710,7 +710,10 @@ int trace_pid_write(struct trace_pid_list *filtered_pids,/* copy the current bits to the new max */ ret =trace_pid_list_first (filtered_pids, &pid);while (!ret) { -trace_pid_list_set (pid_list, pid); + ret =trace_pid_list_set (pid_list, pid); +if (ret <0 ) + goto out; + ret =trace_pid_list_next (filtered_pids, pid +1 , &pid); nr_pids++; }
@@ -747,6 +750,7 @@ int trace_pid_write(struct trace_pid_list *filtered_pids,trace_parser_clear (&parser); ret =0 ; } + out:trace_parser_put (&parser);if (ret <0 ) {
@@ -7253,7 +7257,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, entry =ring_buffer_event_data (event); entry->ip = _THIS_IP_; - len =__copy_from_user_inatomic (&entry->buf, ubuf, cnt); + len =copy_from_user_nofault (&entry->buf, ubuf, cnt);if (len) {memcpy (&entry->buf,FAULTED_STR ,FAULTED_SIZE ); cnt =FAULTED_SIZE ;
@@ -7328,7 +7332,7 @@ tracing_mark_raw_write(struct file *filp, const char __user *ubuf, entry =ring_buffer_event_data (event); - len =__copy_from_user_inatomic (&entry->id, ubuf, cnt); + len =copy_from_user_nofault (&entry->id, ubuf, cnt);if (len) { entry->id =-1 ;memcpy (&entry->buf,FAULTED_STR ,FAULTED_SIZE );
kernel/trace/trace_events_synth.c +0 -2
@@ -383,13 +383,11 @@ static enum print_line_t print_synth_event(struct trace_iterator *iter, str_field = (char *)entry + data_offset;trace_seq_printf (s, print_fmt, se->fields[i]->name, -STR_VAR_LEN_MAX , str_field, i == se->n_fields -1 ?"" :" " ); n_u64++; }else {trace_seq_printf (s, print_fmt, se->fields[i]->name, -STR_VAR_LEN_MAX , (char *)&entry->fields[n_u64], i == se->n_fields -1 ?"" :" " ); n_u64 +=STR_VAR_LEN_MAX /sizeof (u64);
mm/damon/lru_sort.c +3 -0
@@ -203,6 +203,9 @@ static int damon_lru_sort_apply_parameters(void)unsigned int hot_thres, cold_thres;int err =0 ; +if (!damon_lru_sort_mon_attrs.sample_interval) +return -EINVAL ; + err =damon_set_attrs (ctx, &damon_lru_sort_mon_attrs);if (err)return err;
mm/damon/reclaim.c +3 -0
@@ -157,6 +157,9 @@ static int damon_reclaim_apply_parameters(void)struct damos *scheme, *old_scheme;int err =0 ; +if (!damon_reclaim_mon_attrs.aggr_interval) +return -EINVAL ; + err =damon_set_attrs (ctx, &damon_reclaim_mon_attrs);if (err)return err;
mm/damon/sysfs.c +9 -5
@@ -2093,14 +2093,18 @@ static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr, {struct damon_sysfs_kdamond *kdamond =container_of (kobj, struct damon_sysfs_kdamond, kobj); -struct damon_ctx *ctx = kdamond->damon_ctx; -bool running; +struct damon_ctx *ctx; +bool running = false; -if (!ctx) - running = false; -else +if (!mutex_trylock (&damon_sysfs_lock)) +return -EBUSY ; + + ctx = kdamond->damon_ctx; +if (ctx) running =damon_sysfs_ctx_running (ctx); +mutex_unlock (&damon_sysfs_lock); +return sysfs_emit (buf,"%s\n" , running ? damon_sysfs_cmd_strs[DAMON_SYSFS_CMD_ON ] : damon_sysfs_cmd_strs[DAMON_SYSFS_CMD_OFF ]);
mm/kasan/init.c +6 -6
@@ -13,9 +13,9 @@#include <linux/mm.h> #include <linux/pfn.h> #include <linux/slab.h> +#include <linux/pgalloc.h> #include <asm/page.h> -#include <asm/pgalloc.h> #include "kasan.h"
@@ -188,7 +188,7 @@ static int __ref zero_p4d_populate(pgd_t *pgd, unsigned long addr,pud_t *pud;pmd_t *pmd; -p4d_populate (&init_mm, p4d, +p4d_populate_kernel (addr, p4d,lm_alias (kasan_early_shadow_pud)); pud =pud_offset (p4d, addr); pud_populate(&init_mm, pud,
@@ -207,7 +207,7 @@ static int __ref zero_p4d_populate(pgd_t *pgd, unsigned long addr,if (!p)return -ENOMEM ; }else { -p4d_populate (&init_mm, p4d, +p4d_populate_kernel (addr, p4d,early_alloc (PAGE_SIZE ,NUMA_NO_NODE )); } }
@@ -247,10 +247,10 @@ int __ref kasan_populate_early_shadow(const void *shadow_start,* puds,pmds, so pgd_populate(), pud_populate() * is noops. */ -pgd_populate (&init_mm, pgd, +pgd_populate_kernel (addr, pgd,lm_alias (kasan_early_shadow_p4d)); p4d =p4d_offset (pgd, addr); -p4d_populate (&init_mm, p4d, +p4d_populate_kernel (addr, p4d,lm_alias (kasan_early_shadow_pud)); pud =pud_offset (p4d, addr); pud_populate(&init_mm, pud,
@@ -269,7 +269,7 @@ int __ref kasan_populate_early_shadow(const void *shadow_start,if (!p)return -ENOMEM ; }else { -pgd_populate (&init_mm, pgd, +pgd_populate_kernel (addr, pgd,early_alloc (PAGE_SIZE ,NUMA_NO_NODE )); } }
mm/kasan/kasan_test.c +1 -0
@@ -993,6 +993,7 @@ static void kasan_strings(struct kunit *test) ptr =kmalloc (size,GFP_KERNEL | __GFP_ZERO);KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ptr); +OPTIMIZER_HIDE_VAR (ptr);kfree (ptr);
mm/khugepaged.c +11 -11
@@ -1140,6 +1140,7 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm,int result =SCAN_FAIL , referenced =0 ;int none_or_zero =0 , shared =0 ;struct page *page =NULL ; +struct folio *folio =NULL ;unsigned long _address;spinlock_t *ptl;int node =NUMA_NO_NODE , unmapped =0 ;
@@ -1221,29 +1222,28 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm, } } - page =compound_head (page); - + folio =page_folio (page);/* * Record which node the original page is from and save this * information to cc->node_load[]. * Khugepaged will allocate hugepage from the node has the max * hit record. */ - node =page_to_nid (page); + node =folio_nid (folio);if (hpage_collapse_scan_abort (node, cc)) { result =SCAN_SCAN_ABORT ; goto out_unmap; } cc->node_load[node]++; -if (!PageLRU (page)) { +if (!folio_test_lru (folio)) { result =SCAN_PAGE_LRU ; goto out_unmap; } -if (PageLocked (page)) { +if (folio_test_locked (folio)) { result =SCAN_PAGE_LOCK ; goto out_unmap; } -if (!PageAnon (page)) { +if (!folio_test_anon (folio)) { result =SCAN_PAGE_ANON ; goto out_unmap; }
@@ -1265,7 +1265,7 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm,* has excessive GUP pins (i.e. 512). Anyway the same check * will be done again later the risk seems low. */ -if (!is_refcount_suitable (page)) { +if (!is_refcount_suitable (&folio->page)) { result =SCAN_PAGE_COUNT ; goto out_unmap; }
@@ -1275,9 +1275,9 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm,* enough young pte to justify collapsing the page */ if (cc->is_khugepaged && - (pte_young (pteval) ||page_is_young (page) || -PageReferenced (page) ||mmu_notifier_test_young (vma->vm_mm, - address))) + (pte_young (pteval) ||folio_test_young (folio) || +folio_test_referenced (folio) || +mmu_notifier_test_young (vma->vm_mm, _address))) referenced++; }if (!writable) {
@@ -1298,7 +1298,7 @@ static int hpage_collapse_scan_pmd(struct mm_struct *mm, *mmap_locked = false; } out: -trace_mm_khugepaged_scan_pmd (mm, page, writable, referenced, +trace_mm_khugepaged_scan_pmd (mm, &folio->page, writable, referenced, none_or_zero, result, unmapped);return result; }
mm/memory-failure.c +3 -4
@@ -2346,10 +2346,9 @@ int unpoison_memory(unsigned long pfn) static DEFINE_RATELIMIT_STATE(unpoison_rs, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST); -if (!pfn_valid (pfn)) -return -ENXIO ; - - p =pfn_to_page (pfn); + p =pfn_to_online_page (pfn); +if (!p) +return -EIO ; page =compound_head (p);mutex_lock (&mf_mutex);
mm/percpu.c +3 -3
@@ -3172,7 +3172,7 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size,#endif /* BUILD_EMBED_FIRST_CHUNK */ #ifdef BUILD_PAGE_FIRST_CHUNK -#include <asm/pgalloc.h> +#include <linux/pgalloc.h> #ifndef P4D_TABLE_SIZE #define P4D_TABLE_SIZE PAGE_SIZE
@@ -3202,7 +3202,7 @@ void __init __weak pcpu_populate_pte(unsigned long addr) new =memblock_alloc (P4D_TABLE_SIZE ,P4D_TABLE_SIZE );if (!new) goto err_alloc; -pgd_populate (&init_mm, pgd, new); +pgd_populate_kernel (addr, pgd, new); } p4d =p4d_offset (pgd, addr);
@@ -3212,7 +3212,7 @@ void __init __weak pcpu_populate_pte(unsigned long addr) new =memblock_alloc (PUD_TABLE_SIZE ,PUD_TABLE_SIZE );if (!new) goto err_alloc; -p4d_populate (&init_mm, p4d, new); +p4d_populate_kernel (addr, p4d, new); } pud =pud_offset (p4d, addr);
mm/sparse-vmemmap.c +3 -3
@@ -27,9 +27,9 @@#include <linux/spinlock.h> #include <linux/vmalloc.h> #include <linux/sched.h> +#include <linux/pgalloc.h> #include <asm/dma.h> -#include <asm/pgalloc.h> /* * Allocate a block of memory to be used to back the virtual memory map
@@ -215,7 +215,7 @@ p4d_t * __meminit vmemmap_p4d_populate(pgd_t *pgd, unsigned long addr, int node)void *p =vmemmap_alloc_block_zero (PAGE_SIZE , node);if (!p)return NULL ; -p4d_populate (&init_mm, p4d, p); +p4d_populate_kernel (addr, p4d, p); }return p4d; }
@@ -227,7 +227,7 @@ pgd_t * __meminit vmemmap_pgd_populate(unsigned long addr, int node)void *p =vmemmap_alloc_block_zero (PAGE_SIZE , node);if (!p)return NULL ; -pgd_populate (&init_mm, pgd, p); +pgd_populate_kernel (addr, pgd, p); }return pgd; }
net/can/j1939/bus.c +4 -1
@@ -290,8 +290,11 @@ int j1939_local_ecu_get(struct j1939_priv *priv, name_t name, u8 sa)if (!ecu) ecu =j1939_ecu_create_locked (priv, name); err =PTR_ERR_OR_ZERO (ecu); -if (err) +if (err) { +if (j1939_address_is_unicast (sa)) + priv->ents[sa].nusers--; goto done; + } ecu->nusers++;/* TODO: do we care if ecu->addr != sa? */
net/can/j1939/socket.c +3 -0
@@ -520,6 +520,9 @@ static int j1939_sk_bind(struct socket *sock, struct sockaddr *uaddr, int len) ret =j1939_local_ecu_get (priv, jsk->addr.src_name, jsk->addr.sa);if (ret) {j1939_netdev_stop (priv); + jsk->priv =NULL ; +synchronize_rcu (); +j1939_priv_put (priv); goto out_release_sock; }
net/ceph/messenger.c +4 -3
@@ -1453,7 +1453,7 @@ static void con_fault_finish(struct ceph_connection *con)* in case we faulted due to authentication, invalidate our * current tickets so that we can get new ones. */ -if (con->v1.auth_retry) { +if (!ceph_msgr2 (from_msgr (con->msgr)) && con->v1.auth_retry) {dout ("auth_retry %d, invalidating\n" , con->v1.auth_retry);if (con->ops->invalidate_authorizer) con->ops->invalidate_authorizer (con);
@@ -1643,9 +1643,10 @@ static void clear_standby(struct ceph_connection *con) {/* come back from STANDBY? */ if (con->state ==CEPH_CON_S_STANDBY ) { -dout ("clear_standby %p and ++connect_seq\n" , con); +dout ("clear_standby %p\n" , con); con->state =CEPH_CON_S_PREOPEN ; - con->v1.connect_seq++; +if (!ceph_msgr2 (from_msgr (con->msgr))) + con->v1.connect_seq++;WARN_ON (ceph_con_flag_test (con,CEPH_CON_F_WRITE_PENDING ));WARN_ON (ceph_con_flag_test (con,CEPH_CON_F_KEEPALIVE_PENDING )); }
net/core/sock.c +5 -0
@@ -1985,6 +1985,8 @@ int sock_getsockopt(struct socket *sock, int level, int optname,*/ static inline void sock_lock_init (struct sock *sk) { +sk_owner_clear (sk); +if (sk->sk_kern_sock) sock_lock_init_class_and_name( sk,
@@ -2080,6 +2082,9 @@ static void sk_prot_free(struct proto *prot, struct sock *sk)cgroup_sk_free (&sk->sk_cgrp_data);mem_cgroup_sk_free (sk);security_sk_free (sk); + +sk_owner_put (sk); +if (slab !=NULL )kmem_cache_free (slab, sk);else
net/hsr/hsr_device.c +157 -6
229 lines not on this page · raw message
net/hsr/hsr_main.c +2 -2
@@ -22,7 +22,7 @@ static bool hsr_slave_empty(struct hsr_priv *hsr) {struct hsr_port *port; -hsr_for_each_port (hsr, port) +hsr_for_each_port_rtnl (hsr, port)if (port->type !=HSR_PT_MASTER )return false;return true;
@@ -125,7 +125,7 @@ struct hsr_port *hsr_port_get_hsr(struct hsr_priv *hsr, enum hsr_port_type pt) {struct hsr_port *port; -hsr_for_each_port (hsr, port) +hsr_for_each_port_rtnl (hsr, port)if (port->type == pt)return port;return NULL ;
net/hsr/hsr_main.h +4 -0
@@ -202,6 +202,7 @@ struct hsr_priv {u8 net_id;/* for PRP, it occupies most significant 3 bits * of lan_id */ +bool fwd_offloaded;/* Forwarding offloaded to HW */ unsigned char sup_multicast_addr[ETH_ALEN ]__aligned(sizeof(u16)) ;/* Align to u16 boundary to avoid unaligned access * in ether_addr_equal
@@ -214,6 +215,9 @@ struct hsr_priv {#define hsr_for_each_port (hsr, port) \ list_for_each_entry_rcu((port), &(hsr)->ports, port_list) +#define hsr_for_each_port_rtnl (hsr, port) \ + list_for_each_entry_rcu((port), &(hsr)->ports, port_list, lockdep_rtnl_is_held()) +struct hsr_port *hsr_port_get_hsr (struct hsr_priv *hsr,enum hsr_port_type pt);/* Caller must ensure skb is a valid HSR frame */
net/hsr/hsr_slave.c +13 -5
@@ -137,9 +137,14 @@ static int hsr_portdev_setup(struct hsr_priv *hsr, struct net_device *dev,struct hsr_port *master;int res; - res =dev_set_promiscuity (dev,1 ); -if (res) -return res; +/* Don't use promiscuous mode for offload since L2 frame forward +* happens at the offloaded hardware. +*/ +if (!port->hsr->fwd_offloaded) { + res =dev_set_promiscuity (dev,1 ); +if (res) +return res; + } master =hsr_port_get_hsr (hsr,HSR_PT_MASTER ); hsr_dev = master->dev;
@@ -158,7 +163,9 @@ static int hsr_portdev_setup(struct hsr_priv *hsr, struct net_device *dev, fail_rx_handler:netdev_upper_dev_unlink (dev, hsr_dev); fail_upper_dev_link: -dev_set_promiscuity (dev,-1 ); +if (!port->hsr->fwd_offloaded) +dev_set_promiscuity (dev,-1 ); +return res; }
@@ -219,7 +226,8 @@ void hsr_del_port(struct hsr_port *port)netdev_update_features (master->dev);dev_set_mtu (master->dev,hsr_get_max_mtu (hsr));netdev_rx_handler_unregister (port->dev); -dev_set_promiscuity (port->dev,-1 ); +if (!port->hsr->fwd_offloaded) +dev_set_promiscuity (port->dev,-1 );netdev_upper_dev_unlink (port->dev, master->dev); }
net/ipv4/ip_tunnel_core.c +6 -0
@@ -203,6 +203,9 @@ static int iptunnel_pmtud_build_icmp(struct sk_buff *skb, int mtu)if (!pskb_may_pull (skb,ETH_HLEN +sizeof (struct iphdr )))return -EINVAL ; +if (skb_is_gso (skb)) +skb_gso_reset (skb); +skb_copy_bits (skb,skb_mac_offset (skb), &eh,ETH_HLEN );pskb_pull (skb,ETH_HLEN );skb_reset_network_header (skb);
@@ -297,6 +300,9 @@ static int iptunnel_pmtud_build_icmpv6(struct sk_buff *skb, int mtu)if (!pskb_may_pull (skb,ETH_HLEN +sizeof (struct ipv6hdr )))return -EINVAL ; +if (skb_is_gso (skb)) +skb_gso_reset (skb); +skb_copy_bits (skb,skb_mac_offset (skb), &eh,ETH_HLEN );pskb_pull (skb,ETH_HLEN );skb_reset_network_header (skb);
net/ipv4/tcp_bpf.c +4 -1
@@ -403,8 +403,11 @@ static int tcp_bpf_send_verdict(struct sock *sk, struct sk_psock *psock,if (!psock->cork) { psock->cork =kzalloc (sizeof (*psock->cork),GFP_ATOMIC | __GFP_NOWARN); -if (!psock->cork) +if (!psock->cork) { +sk_msg_free (sk, msg); + *copied =0 ;return -ENOMEM ; + } }memcpy (psock->cork, msg,sizeof (*msg));return 0 ;
net/mptcp/sockopt.c +5 -6
@@ -1347,13 +1347,12 @@ static void sync_socket_options(struct mptcp_sock *msk, struct sock *ssk) {static const unsigned int tx_rx_locks =SOCK_RCVBUF_LOCK |SOCK_SNDBUF_LOCK ;struct sock *sk = (struct sock *)msk; +bool keep_open; -if (ssk->sk_prot->keepalive) { -if (sock_flag (sk,SOCK_KEEPOPEN )) - ssk->sk_prot->keepalive (ssk,1 ); -else - ssk->sk_prot->keepalive (ssk,0 ); - } + keep_open =sock_flag (sk,SOCK_KEEPOPEN ); +if (ssk->sk_prot->keepalive) + ssk->sk_prot->keepalive (ssk, keep_open); +sock_valbool_flag (ssk,SOCK_KEEPOPEN , keep_open); ssk->sk_priority = sk->sk_priority; ssk->sk_bound_dev_if = sk->sk_bound_dev_if;
net/sunrpc/sched.c +0 -2
@@ -276,8 +276,6 @@ EXPORT_SYMBOL_GPL(rpc_destroy_wait_queue);static int rpc_wait_bit_killable (struct wait_bit_key *key,int mode) { -if (unlikely (current->flags &PF_EXITING )) -return -EINTR ;schedule ();if (signal_pending_state (mode, current))return -ERESTARTSYS ;
samples/ftrace/ftrace-direct-modify.c +1 -1
@@ -36,8 +36,8 @@ asm (" movq %rsp, %rbp\n" " call my_direct_func1\n" " leave\n" -" .size my_tramp1, .-my_tramp1\n" ASM_RET +" .size my_tramp1, .-my_tramp1\n" " .type my_tramp2, @function\n" " .globl my_tramp2\n"
sound/soc/qcom/qdsp6/q6apm-dai.c +23 -5
@@ -52,6 +52,7 @@ struct q6apm_dai_rtd {uint16_t bits_per_sample;uint16_t source;/* Encoding source bit mask */ uint16_t session_id; +snd_pcm_uframes_t queue_ptr;enum stream_state state;struct q6apm_graph *graph;spinlock_t lock;
@@ -114,8 +115,6 @@ static void event_handler(uint32_t opcode, uint32_t token, uint32_t *payload, vo prtd->pos += prtd->pcm_count;spin_unlock_irqrestore (&prtd->lock, flags);snd_pcm_period_elapsed (substream); -if (prtd->state ==Q6APM_STREAM_RUNNING ) -q6apm_write_async (prtd->graph, prtd->pcm_count,0 ,0 ,0 );break ;case APM_CLIENT_EVENT_DATA_READ_DONE :
@@ -209,6 +208,27 @@ static int q6apm_dai_prepare(struct snd_soc_component *component,return 0 ; } +static int q6apm_dai_ack (struct snd_soc_component *component,struct snd_pcm_substream *substream) +{ +struct snd_pcm_runtime *runtime = substream->runtime; +struct q6apm_dai_rtd *prtd = runtime->private_data; +int i, ret =0 , avail_periods; + +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) { + avail_periods = (runtime->control->appl_ptr - prtd->queue_ptr)/runtime->period_size; +for (i =0 ; i < avail_periods; i++) { + ret =q6apm_write_async (prtd->graph, prtd->pcm_count,0 ,0 ,0 ); +if (ret <0 ) { +dev_err (component->dev,"Error queuing playback buffer %d\n" , ret); +return ret; + } + prtd->queue_ptr += runtime->period_size; + } + } + +return ret; +} +static int q6apm_dai_trigger (struct snd_soc_component *component,struct snd_pcm_substream *substream,int cmd) {
@@ -220,9 +240,6 @@ static int q6apm_dai_trigger(struct snd_soc_component *component,case SNDRV_PCM_TRIGGER_START :case SNDRV_PCM_TRIGGER_RESUME :case SNDRV_PCM_TRIGGER_PAUSE_RELEASE : -/* start writing buffers for playback only as we already queued capture buffers */ -if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) - ret =q6apm_write_async (prtd->graph, prtd->pcm_count,0 ,0 ,0 );break ;case SNDRV_PCM_TRIGGER_STOP :/* TODO support be handled via SoftPause Module */
@@ -396,6 +413,7 @@ static const struct snd_soc_component_driver q6apm_fe_dai_component = { .hw_params = q6apm_dai_hw_params, .pointer = q6apm_dai_pointer, .trigger = q6apm_dai_trigger, + .ack = q6apm_dai_ack, };static int q6apm_dai_probe (struct platform_device *pdev)