Linux 6.12.48
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.12.48 kernel.
All users of the 6.12 kernel series must upgrade.
The updated 6.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.12.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/filesystems/nfs/localio.rst | 13 Documentation/netlink/specs/mptcp_pm.yaml | 52 +- Documentation/networking/can.rst | 2 Makefile | 2 arch/riscv/include/asm/compat.h | 1 arch/s390/kernel/perf_cpum_cf.c | 4 arch/s390/kernel/perf_pai_crypto.c | 4 arch/s390/kernel/perf_pai_ext.c | 2 arch/x86/kernel/cpu/topology_amd.c | 25 - arch/x86/kernel/vmlinux.lds.S | 10 drivers/dma-buf/Kconfig | 1 drivers/dma-buf/udmabuf.c | 22 - drivers/dma/dw/rzn1-dmamux.c | 15 drivers/dma/idxd/init.c | 39 - 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/amd/amdgpu/vcn_v3_0.c | 12 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 64 +- drivers/gpu/drm/amd/amdgpu/vi.c | 7 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c | 7 drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c | 6 drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c | 8 drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 10 drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c | 2 drivers/gpu/drm/i915/display/intel_display_power.c | 6 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 16 drivers/gpu/drm/mediatek/mtk_drm_drv.c | 11 drivers/gpu/drm/panthor/panthor_drv.c | 2 drivers/gpu/drm/xe/tests/xe_bo.c | 2 drivers/gpu/drm/xe/tests/xe_dma_buf.c | 10 drivers/gpu/drm/xe/xe_bo.c | 16 drivers/gpu/drm/xe/xe_bo.h | 2 drivers/gpu/drm/xe/xe_dma_buf.c | 2 drivers/i2c/busses/i2c-i801.c | 2 drivers/input/misc/iqs7222.c | 3 drivers/input/serio/i8042-acpipnpio.h | 14 drivers/mtd/nand/raw/atmel/nand-controller.c | 16 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 46 +- drivers/mtd/nand/spi/winbond.c | 37 + 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/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_matcher.c | 24 - drivers/net/phy/mdio_bus.c | 4 drivers/nvme/host/pci.c | 3 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c | 4 drivers/phy/tegra/xusb-tegra210.c | 6 drivers/phy/ti/phy-omap-usb2.c | 13 drivers/phy/ti/phy-ti-pipe3.c | 13 drivers/regulator/sy7636a-regulator.c | 7 drivers/tty/hvc/hvc_console.c | 6 drivers/tty/serial/sc16is7xx.c | 14 drivers/usb/gadget/function/f_midi2.c | 11 drivers/usb/gadget/udc/dummy_hcd.c | 8 drivers/usb/host/xhci-mem.c | 2 drivers/usb/serial/option.c | 17 drivers/usb/typec/tcpm/tcpm.c | 12 fs/btrfs/extent_io.c | 72 ++- fs/btrfs/inode.c | 12 fs/btrfs/qgroup.c | 6 fs/ceph/debugfs.c | 14 fs/ceph/dir.c | 17 fs/ceph/file.c | 24 - fs/ceph/inode.c | 88 +++- fs/ceph/mds_client.c | 172 ++++---- fs/ceph/mds_client.h | 18 fs/ext4/namei.c | 14 fs/fhandle.c | 8 fs/fuse/file.c | 5 fs/fuse/passthrough.c | 5 fs/kernfs/file.c | 58 +- fs/nfs/client.c | 2 fs/nfs/direct.c | 22 - fs/nfs/file.c | 21 fs/nfs/flexfilelayout/flexfilelayout.c | 21 fs/nfs/inode.c | 4 fs/nfs/internal.h | 17 fs/nfs/io.c | 55 +- fs/nfs/localio.c | 125 ++++- fs/nfs/nfs42proc.c | 2 fs/nfs/nfs4file.c | 2 fs/nfs/nfs4proc.c | 7 fs/nfs/write.c | 1 fs/ocfs2/extent_map.c | 10 fs/proc/generic.c | 3 include/linux/compiler-clang.h | 29 + include/linux/fs.h | 10 include/linux/nfs_xdr.h | 1 include/linux/pgalloc.h | 29 + include/linux/pgtable.h | 13 include/net/netfilter/nf_tables.h | 11 include/net/netfilter/nf_tables_core.h | 49 +- include/net/netns/nftables.h | 1 include/trace/events/dma.h | 153 ++++++- include/uapi/linux/mptcp_pm.h | 50 +- kernel/bpf/core.c | 16 kernel/bpf/crypto.c | 2 kernel/bpf/helpers.c | 7 kernel/dma/debug.c | 135 +++--- kernel/dma/debug.h | 20 kernel/dma/mapping.c | 41 + kernel/time/hrtimer.c | 11 kernel/trace/fgraph.c | 3 kernel/trace/trace.c | 10 mm/Kconfig | 2 mm/damon/core.c | 4 mm/damon/lru_sort.c | 5 mm/damon/reclaim.c | 5 mm/damon/sysfs.c | 14 mm/hugetlb.c | 9 mm/kasan/init.c | 12 mm/kasan/kasan_test_c.c | 1 mm/khugepaged.c | 4 mm/memory-failure.c | 20 mm/percpu.c | 6 mm/sparse-vmemmap.c | 6 net/bridge/br.c | 7 net/can/j1939/bus.c | 5 net/can/j1939/socket.c | 3 net/ceph/messenger.c | 7 net/hsr/hsr_device.c | 97 ++++ net/hsr/hsr_main.c | 4 net/hsr/hsr_main.h | 3 net/ipv4/ip_tunnel_core.c | 6 net/ipv4/tcp_bpf.c | 5 net/mptcp/sockopt.c | 11 net/netfilter/nf_tables_api.c | 123 +++-- net/netfilter/nft_dynset.c | 5 net/netfilter/nft_lookup.c | 67 ++- net/netfilter/nft_objref.c | 5 net/netfilter/nft_set_bitmap.c | 11 net/netfilter/nft_set_hash.c | 54 +- net/netfilter/nft_set_pipapo.c | 214 +++------- net/netfilter/nft_set_pipapo_avx2.c | 27 - net/netfilter/nft_set_rbtree.c | 46 +- net/netlink/genetlink.c | 3 net/sunrpc/sched.c | 2 net/sunrpc/xprtsock.c | 6 samples/ftrace/ftrace-direct-modify.c | 2 sound/pci/hda/patch_realtek.c | 1 145 files changed, 1896 insertions(+), 988 deletions(-)
Alan Stern (1):
USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels
Alex Deucher (2):
drm/amd/display: use udelay rather than fsleep drm/amdgpu: fix a memory leak in fence cleanup when unloading
Alex Markuze (2):
ceph: fix race condition validating r_parent before applying state
ceph: fix race condition where r_parent becomes stale before sending message
Alex Tran (1):
docs: networking: can: change bcm_msg_head frames member to support flexible array
Alexander Sverdlin (1):
mtd: nand: raw: atmel: Respect tAR, tCLR in read setup timing
Alok Tiwari (1):
genetlink: fix genl_bind() invoking bind() after -EPERM
Amir Goldstein (2):
fhandle: use more consistent rules for decoding file handle from userns
fuse: do not allow mapping a non-regular backing file
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
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
Aurabindo Pillai (1):
Revert "drm/amd/display: Optimize cursor position updates"
Baochen Qiang (1):
dma-debug: don't enforce dma mapping check on noncoherent allocations
Boris Burkov (2):
btrfs: fix squota compressed stats leak
btrfs: use readahead_expand() on compressed extents
Buday Csaba (1):
net: mdiobus: release reset_gpio in mdiobus_unregister_device()
Chen Ridong (1):
kernfs: Fix UAF in polling when open file is released
Chia-I Wu (1):
drm/panthor: validate group queue count
Chiasheng Lee (1):
i2c: i801: Hide Intel Birch Stream SoC TCO WDT
Christoffer Sandberg (1):
Input: i8042 - add TUXEDO InfinityBook Pro Gen10 AMD to i8042 quirk table
Christoph Hellwig (1):
dma-debug: store a phys_addr_t in struct dma_debug_entry
Christophe Kerello (2):
mtd: rawnand: stm32_fmc2: avoid overlapping mappings on ECC buffer
mtd: rawnand: stm32_fmc2: fix ECC overwrite
Dan Carpenter (1):
dmaengine: idxd: Fix double free in idxd_setup_wqs()
Daniel Borkmann (1):
bpf: Fix out-of-bounds dynptr write in bpf_crypto_crypt
David Rosca (3):
drm/amdgpu: Add back JPEG to video caps for carrizo and newer drm/amdgpu/vcn: Allow limiting ctx to instance 0 for AV1 at any time drm/amdgpu/vcn4: Fix IB parsing with multiple engine info packages
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
Fedor Pchelkin (1):
dma-debug: fix physical address calculation for struct dma_debug_entry
Florian Westphal (10):
netfilter: nft_set_pipapo: remove unused arguments
netfilter: nft_set: remove one argument from lookup and update functions
netfilter: nft_set_pipapo: merge pipapo_get/lookup
netfilter: nft_set_pipapo: don't return bogus extension pointer
netfilter: nft_set_pipapo: don't check genbit from packetpath lookups
netfilter: nft_set_rbtree: continue traversal if element is inactive
netfilter: nf_tables: place base_seq in struct net
netfilter: nf_tables: make nft_set_do_lookup available unconditionally
netfilter: nf_tables: restart set lookup on base_seq change
netfilter: nft_set_pipapo: fix null deref for empty set
Greg Kroah-Hartman (1):
Linux 6.12.48
Guenter Roeck (2):
trace/fgraph: Fix error handling
x86: disable image size check for test builds
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()
Huan Yang (1):
Revert "udmabuf: fix vmap_udmabuf error page set"
Hugo Villeneuve (1):
serial: sc16is7xx: fix bug in flow control levels init
Ilya Dryomov (1):
libceph: fix invalid accesses to ceph_connection_v1_info
Jakub Kicinski (1):
netlink: specs: mptcp: replace underscores with dashes in names
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
Jeongjun Park (1):
mm/hugetlb: add missing hugetlb_lock in __unmap_hugepage_range()
Johan Hovold (4):
drm/mediatek: fix potential OF node use-after-free
phy: tegra: xusb: fix device and OF node leak at probe
phy: ti: omap-usb2: fix device leak at unbind
phy: ti-pipe3: fix device leak at unbind
Jonathan Curley (1):
NFSv4/flexfiles: Fix layout merge mirror check.
Justin Worrell (1):
SUNRPC: call xs_sock_process_cmsg for all cmsg
K Prateek Nayak (1):
x86/cpu/topology: Always try cpu_parse_topology_ext() on AMD/Hygon
KaFai Wan (1):
bpf: Allow fall back to interpreter for programs with stack size <= 512
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 (1):
tcp_bpf: Call sk_msg_free() when tcp_bpf_send_verdict() fails to allocate psock->cork.
Kyle Meyer (1):
mm/memory-failure: fix redundant updates for already poisoned pages
Linus Torvalds (1):
Disable SLUB_TINY for build testing
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
Mathias Nyman (1):
xhci: fix memory leak regression when freeing xhci vdev devices depth first
Matthieu Baerts (NGI0) (3):
netlink: specs: mptcp: add missing 'server-side' attr
netlink: specs: mptcp: clearly mention attributes
netlink: specs: mptcp: fix if-idx attribute type
Maurizio Lombardi (1):
nvme-pci: skip nvme_write_sq_db on empty rqlist
Max Kellermann (1):
fs/nfs/io: make nfs_start_io_*() killable
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
Mike Snitzer (2):
nfs/localio: remove extra indirect nfs_to call to check {read,write}_iter nfs/localio: add direct IO enablement with sync and async IO support
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 (1):
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
Omar Sandoval (1):
btrfs: fix subvolume deletion lockup caused by inodes xarray race
Palmer Dabbelt (1):
RISC-V: Remove unnecessary include from compat.h
Paolo Abeni (1):
Revert "net: usb: asix: ax88772: drop phylink use in PM to avoid MDIO runtime PM wakeups"
Peilin Ye (1):
bpf: Tell memcg to use allow_spinning=false path in bpf_timer_init()
Pengyu Luo (1):
phy: qualcomm: phy-qcom-eusb2-repeater: fix override properties
Petr Machata (1):
net: bridge: Bounce invalid boolopts
Phil Sutter (1):
netfilter: nf_tables: Reintroduce shortened deletion notifications
Pu Lehui (1):
tracing: Silence warning when chunk allocation fails in trace_pid_write
Qu Wenruo (1):
btrfs: fix corruption reading compressed range when block size is smaller than page size
Quanmin Yan (2):
mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters() mm/damon/reclaim: avoid divide-by-zero in damon_reclaim_apply_parameters()
RD Babiera (1):
usb: typec: tcpm: properly deliver cable vdms to altmode drivers
Salah Triki (1):
EDAC/altera: Delete an inappropriate dma_free_coherent() call
Sang-Heon Jeon (1):
mm/damon/core: set quota->charged_from to jiffies at first charge window
Santhosh Kumar K (1):
mtd: spinand: winbond: Fix oob_layout for W25N01JW
Scott Mayhew (1):
nfs/localio: restore creds before releasing pageio data
Sean Anderson (4):
dma-mapping: trace dma_alloc/free direction
dma-mapping: use trace_dma_alloc for dma_alloc* instead of using trace_dma_map
dma-mapping: trace more error paths
dma-mapping: fix swapped dir/flags arguments to trace_dma_alloc_sgt_err
Srinivasan Shanmugam (1):
drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed
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
Takashi Iwai (3):
ALSA: hda/realtek: Fix built-in mic assignment on ASUS VivoBook X515UA
usb: gadget: midi2: Fix missing UMP group attributes initialization
usb: gadget: midi2: Fix MIDI2 IN EP max packet size
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() failsTheodore Ts'o (1):
ext4: introduce linear search for dentries
Thomas Hellström (1):
drm/xe: Attempt to bring bos back to VRAM after eviction
Thomas Richter (2):
s390/pai: Deny all events not handled by this PMU s390/cpum_cf: Deny all sampling events by counter PMU
Tigran Mkrtchyan (1):
flexfiles/pNFS: fix NULL checks on result of ff_layout_choose_ds_for_read
Trond Myklebust (10):
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 NFS_CAP_OPEN_XOR and NFS_CAP_DELEGTIME if not supported
NFSv4: Clear the NFS_CAP_XATTR flag if not supported by the server
NFS: Serialise O_DIRECT i/o and truncate()
NFSv4.2: Serialise O_DIRECT i/o and fallocate()
NFSv4.2: Serialise O_DIRECT i/o and clone range
NFSv4.2: Serialise O_DIRECT i/o and copy range
NFS: nfs_invalidate_folio() must observe the offset and size arguments Revert "SUNRPC: Don't allow waiting for exiting tasks"
Umesh Nerlige Ramappa (1):
drm/i915/pmu: Fix zero delta busyness issue
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
Yevgeny Kliteynik (1):
net/mlx5: HWS, change error flow on matcher disconnect
Yi Sun (2):
dmaengine: idxd: Remove improper idxd_free
dmaengine: idxd: Fix refcount underflow on module unload
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/filesystems/nfs/localio.rst +13 -0
@@ -306,6 +306,19 @@ is issuing IO to the underlying local filesystem that it is sharing with the NFS server. See: fs/nfs/localio.c:nfs_local_doio() and fs/nfs/localio.c:nfs_local_commit(). +With normal NFS that makes use of RPC to issue IO to the server, if an +application uses O_DIRECT the NFS client will bypass the pagecache but +the NFS server will not. Because the NFS server's use of buffered IO +affords applications to be less precise with their alignment when +issuing IO to the NFS client. LOCALIO can be configured to use O_DIRECT +semantics by setting the 'localio_O_DIRECT_semantics' nfs module +parameter to Y, e.g.: + + echo Y > /sys/module/nfs/parameters/localio_O_DIRECT_semantics + +Once enabled, it will cause LOCALIO to use O_DIRECT semantics (this may +cause IO to fail if applications do not properly align their IO). + Security ========
Documentation/netlink/specs/mptcp_pm.yaml +27 -25
100 lines not on this page · raw message
Documentation/networking/can.rst +1 -1
@@ -742,7 +742,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 = 12 -SUBLEVEL = 47 +SUBLEVEL = 48 EXTRAVERSION = NAME = Baby Opossum Posse
arch/riscv/include/asm/compat.h +0 -1
@@ -9,7 +9,6 @@*/ #include <linux/types.h> #include <linux/sched.h> -#include <linux/sched/task_stack.h> #include <asm-generic/compat.h> static inline int is_compat_task (void )
arch/s390/kernel/perf_cpum_cf.c +2 -2
@@ -761,8 +761,6 @@ static int __hw_perf_event_init(struct perf_event *event, unsigned int type)break ;case PERF_TYPE_HARDWARE : -if (is_sampling_event (event))/* No sampling support */ -return -ENOENT ; ev = attr->config;if (!attr->exclude_user && attr->exclude_kernel) {/*
@@ -860,6 +858,8 @@ static int cpumf_pmu_event_init(struct perf_event *event)unsigned int type = event->attr.type;int err = -ENOENT ; +if (is_sampling_event (event))/* No sampling support */ +return err;if (type ==PERF_TYPE_HARDWARE || type ==PERF_TYPE_RAW ) err =__hw_perf_event_init (event, type);else if (event->pmu->type == type)
arch/s390/kernel/perf_pai_crypto.c +2 -2
@@ -286,10 +286,10 @@ static int paicrypt_event_init(struct perf_event *event)/* PAI crypto PMU registered as PERF_TYPE_RAW, check event type */ if (a->type !=PERF_TYPE_RAW && event->pmu->type != a->type)return -ENOENT ; -/* PAI crypto event must be in valid range */ +/* PAI crypto event must be in valid range, try others if not */ if (a->config <PAI_CRYPTO_BASE || a->config >PAI_CRYPTO_BASE + paicrypt_cnt) -return -EINVAL ; +return -ENOENT ;/* Allow only CRYPTO_ALL for sampling */ if (a->sample_period && a->config !=PAI_CRYPTO_BASE )return -EINVAL ;
arch/s390/kernel/perf_pai_ext.c +1 -1
@@ -266,7 +266,7 @@ static int paiext_event_valid(struct perf_event *event) event->hw.config_base = offsetof(struct paiext_cb , acc);return 0 ; } -return -EINVAL ; +return -ENOENT ; }/* Might be called on different CPU than the one the event is intended for. */
arch/x86/kernel/cpu/topology_amd.c +14 -11
@@ -174,24 +174,27 @@ static void topoext_fixup(struct topo_scan *tscan)static void parse_topology_amd (struct topo_scan *tscan) { -bool has_topoext = false; -/* -* If the extended topology leaf 0x8000_001e is available -* try to get SMT, CORE, TILE, and DIE shifts from extended +* Try to get SMT, CORE, TILE, and DIE shifts from extended * CPUID leaf 0x8000_0026 on supported processors first. If * extended CPUID leaf 0x8000_0026 is not supported, try to -* get SMT and CORE shift from leaf 0xb first, then try to -* get the CORE shift from leaf 0x8000_0008. +* get SMT and CORE shift from leaf 0xb. If either leaf is +* available, cpu_parse_topology_ext() will return true. */ -if (cpu_feature_enabled (X86_FEATURE_TOPOEXT )) - has_topoext =cpu_parse_topology_ext (tscan); +bool has_xtopology =cpu_parse_topology_ext (tscan); -if (!has_topoext && !parse_8000_0008 (tscan)) +/* +* If XTOPOLOGY leaves (0x26/0xb) are not available, try to +* get the CORE shift from leaf 0x8000_0008 first. +*/ +if (!has_xtopology && !parse_8000_0008 (tscan))return ; -/* Prefer leaf 0x8000001e if available */ -if (parse_8000_001e (tscan, has_topoext)) +/* +* Prefer leaf 0x8000001e if available to get the SMT shift and +* the initial APIC ID if XTOPOLOGY leaves are not available. +*/ +if (parse_8000_001e (tscan, has_xtopology))return ;/* Try the NODEID MSR */
arch/x86/kernel/vmlinux.lds.S +9 -1
@@ -486,10 +486,18 @@ SECTIONS } /* - * The ASSERT() sink to . is intentional, for binutils 2.14 compatibility: + * COMPILE_TEST kernels can be large - CONFIG_KASAN, for example, can cause + * this. Let's assume that nobody will be running a COMPILE_TEST kernel and + * let's assert that fuller build coverage is more valuable than being able to + * run a COMPILE_TEST kernel. + */ +#ifndef CONFIG_COMPILE_TEST +/* + * The ASSERT() sync to . is intentional, for binutils 2.14 compatibility: */ . = ASSERT((_end - LOAD_OFFSET <= KERNEL_IMAGE_SIZE), "kernel image bigger than KERNEL_IMAGE_SIZE"); +#endif /* needed for Clang - see arch/x86/entry/entry.S */ PROVIDE(__ref_stack_chk_guard = __stack_chk_guard);
drivers/dma-buf/Kconfig +0 -1
@@ -36,7 +36,6 @@ config UDMABUF depends on DMA_SHARED_BUFFER depends on MEMFD_CREATE || COMPILE_TEST depends on MMU - select VMAP_PFN help A driver to let userspace turn memfd regions into dma-bufs. Qemu can use this to create host dmabufs for guest framebuffers.
drivers/dma-buf/udmabuf.c +7 -15
@@ -74,29 +74,21 @@ static int mmap_udmabuf(struct dma_buf *buf, struct vm_area_struct *vma)static int vmap_udmabuf (struct dma_buf *buf,struct iosys_map *map) {struct udmabuf *ubuf = buf->priv; -unsigned long *pfns; +struct page **pages;void *vaddr;pgoff_t pg;dma_resv_assert_held (buf->resv); -/** -* HVO may free tail pages, so just use pfn to map each folio -* into vmalloc area. -*/ - pfns =kvmalloc_array (ubuf->pagecount,sizeof (*pfns),GFP_KERNEL ); -if (!pfns) + pages =kvmalloc_array (ubuf->pagecount,sizeof (*pages),GFP_KERNEL ); +if (!pages)return -ENOMEM ; -for (pg =0 ; pg < ubuf->pagecount; pg++) { -unsigned long pfn =folio_pfn (ubuf->folios[pg]); - - pfn += ubuf->offsets[pg] >>PAGE_SHIFT ; - pfns[pg] = pfn; - } +for (pg =0 ; pg < ubuf->pagecount; pg++) + pages[pg] = &ubuf->folios[pg]->page; - vaddr =vmap_pfn (pfns, ubuf->pagecount,PAGE_KERNEL ); -kvfree (pfns); + vaddr =vm_map_ram (pages, ubuf->pagecount,-1 ); +kvfree (pages);if (!vaddr)return -EINVAL ;
drivers/dma/dw/rzn1-dmamux.c +11 -4
@@ -48,12 +48,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 ];
@@ -94,12 +98,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 +21 -18
@@ -187,27 +187,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);
@@ -218,15 +221,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 ); }
@@ -237,13 +245,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)
@@ -252,11 +254,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;
@@ -918,10 +919,12 @@ static void idxd_remove(struct pci_dev *pdev)device_unregister (idxd_confdev (idxd));idxd_shutdown (pdev);idxd_device_remove_debugfs (idxd); -idxd_cleanup (idxd); +perfmon_pmu_remove (idxd); +idxd_cleanup_interrupts (idxd); +if (device_pasid_enabled (idxd)) +idxd_disable_system_pasid (idxd);pci_iounmap (pdev, idxd->reg_base);put_device (idxd_confdev (idxd)); -idxd_free (idxd);pci_disable_device (pdev); }
drivers/dma/qcom/bam_dma.c +6 -2
@@ -1283,13 +1283,17 @@ static int bam_dma_probe(struct platform_device *pdev)if (!bdev->bamclk) { 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; + } } ret =clk_prepare_enable (bdev->bamclk);
drivers/dma/ti/edma.c +2 -2
@@ -2063,8 +2063,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
@@ -128,7 +128,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
@@ -400,9 +400,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/amd/amdgpu/vcn_v3_0.c +8 -4
@@ -1813,15 +1813,19 @@ static int vcn_v3_0_limit_sched(struct amdgpu_cs_parser *p, struct amdgpu_job *job) {struct drm_gpu_scheduler **scheds; - -/* The create msg must be in the first IB submitted */ -if (atomic_read (&job->base.entity->fence_seq)) -return -EINVAL ; +struct dma_fence *fence;/* if VCN0 is harvested, we can't support AV1 */ if (p->adev->vcn.harvest_config &AMDGPU_VCN_HARVEST_VCN0 )return -EINVAL ; +/* wait for all jobs to finish before switching to instance 0 */ + fence =amdgpu_ctx_get_fence (p->ctx, job->base.entity, ~0ull ); +if (fence) { +dma_fence_wait (fence, false); +dma_fence_put (fence); + } + scheds = p->adev->gpu_sched[AMDGPU_HW_IP_VCN_DEC ] [AMDGPU_RING_PRIO_DEFAULT ].sched;drm_sched_entity_modify_sched (job->base.entity, scheds,1 );
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +29 -35
99 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/vi.c +7 -0
@@ -239,6 +239,13 @@ static const struct amdgpu_video_codec_info cz_video_codecs_decode_array[] = .max_pixels_per_frame = 4096 * 4096, .max_level = 186, }, + { + .codec_type = AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG, + .max_width = 4096, + .max_height = 4096, + .max_pixels_per_frame = 4096 * 4096, + .max_level = 0, + }, }; static const struct amdgpu_video_codecs cz_video_codecs_decode =
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -0
@@ -11483,6 +11483,11 @@ static bool amdgpu_dm_crtc_mem_type_changed(struct drm_device *dev, new_plane_state =drm_atomic_get_plane_state (state, plane); old_plane_state =drm_atomic_get_plane_state (state, plane); +if (IS_ERR (new_plane_state) ||IS_ERR (old_plane_state)) { +DRM_ERROR ("Failed to get plane state for plane %s\n" , plane->name); +return false; + } +if (old_plane_state->fb && new_plane_state->fb &&get_mem_type (old_plane_state->fb) !=get_mem_type (new_plane_state->fb))return true;
drivers/gpu/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c +3 -4
@@ -483,11 +483,10 @@ void dpp1_set_cursor_position(if (src_y_offset + cursor_height <=0 ) cur_en =0 ;/* not visible beyond top edge*/ -if (dpp_base->pos.cur0_ctl.bits.cur0_enable != cur_en) { -REG_UPDATE (CURSOR0_CONTROL ,CUR0_ENABLE , cur_en); +REG_UPDATE (CURSOR0_CONTROL , +CUR0_ENABLE , cur_en); - dpp_base->pos.cur0_ctl.bits.cur0_enable = cur_en; - } + dpp_base->pos.cur0_ctl.bits.cur0_enable = cur_en; } void dpp1_cnv_set_optional_cursor_attributes(
drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c +2 -4
@@ -155,11 +155,9 @@ void dpp401_set_cursor_position(struct dcn401_dpp *dpp =TO_DCN401_DPP (dpp_base);uint32_t cur_en = pos->enable ?1 :0 ; -if (dpp_base->pos.cur0_ctl.bits.cur0_enable != cur_en) { -REG_UPDATE (CURSOR0_CONTROL ,CUR0_ENABLE , cur_en); +REG_UPDATE (CURSOR0_CONTROL ,CUR0_ENABLE , cur_en); - dpp_base->pos.cur0_ctl.bits.cur0_enable = cur_en; - } + dpp_base->pos.cur0_ctl.bits.cur0_enable = cur_en; } void dpp401_set_optional_cursor_attributes(
drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c +3 -5
@@ -1044,13 +1044,11 @@ void hubp2_cursor_set_position(if (src_y_offset + cursor_height <=0 ) cur_en =0 ;/* not visible beyond top edge*/ -if (hubp->pos.cur_ctl.bits.cur_enable != cur_en) { -if (cur_en &®_READ (CURSOR_SURFACE_ADDRESS ) ==0 ) - hubp->funcs->set_cursor_attributes (hubp, &hubp->curs_attr); +if (cur_en &®_READ (CURSOR_SURFACE_ADDRESS ) ==0 ) + hubp->funcs->set_cursor_attributes (hubp, &hubp->curs_attr); -REG_UPDATE (CURSOR_CONTROL , +REG_UPDATE (CURSOR_CONTROL ,CURSOR_ENABLE , cur_en); - } REG_SET_2(CURSOR_POSITION, 0, CURSOR_X_POSITION, pos->x,
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +4 -6
@@ -718,13 +718,11 @@ void hubp401_cursor_set_position(dc_fixpt_from_int (dst_x_offset), param->h_scale_ratio)); -if (hubp->pos.cur_ctl.bits.cur_enable != cur_en) { -if (cur_en &®_READ (CURSOR_SURFACE_ADDRESS ) ==0 ) - hubp->funcs->set_cursor_attributes (hubp, &hubp->curs_attr); +if (cur_en &®_READ (CURSOR_SURFACE_ADDRESS ) ==0 ) + hubp->funcs->set_cursor_attributes (hubp, &hubp->curs_attr); -REG_UPDATE (CURSOR_CONTROL , -CURSOR_ENABLE , cur_en); - } +REG_UPDATE (CURSOR_CONTROL , +CURSOR_ENABLE , cur_en); REG_SET_2(CURSOR_POSITION, 0, CURSOR_X_POSITION, x_pos,
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +1 -1
@@ -945,7 +945,7 @@ enum dc_status dcn20_enable_stream_timing(return DC_ERROR_UNEXPECTED ; } -fsleep (stream->timing.v_total * (stream->timing.h_total *10000u / stream->timing.pix_clk_100hz)); +udelay (stream->timing.v_total * (stream->timing.h_total *10000u / stream->timing.pix_clk_100hz)); params.vertical_total_min = stream->adjust.v_total_min; params.vertical_total_max = stream->adjust.v_total_max;
drivers/gpu/drm/i915/display/intel_display_power.c +3 -3
@@ -1150,7 +1150,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); }
@@ -1603,11 +1603,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/gpu/drm/i915/gt/uc/intel_guc_submission.c +16 -0
@@ -1469,6 +1469,19 @@ static void __reset_guc_busyness_stats(struct intel_guc *guc)spin_unlock_irqrestore (&guc->timestamp.lock, flags); } +static void __update_guc_busyness_running_state (struct intel_guc *guc) +{ +struct intel_gt *gt =guc_to_gt (guc); +struct intel_engine_cs *engine; +enum intel_engine_id id; +unsigned long flags; + +spin_lock_irqsave (&guc->timestamp.lock, flags); +for_each_engine (engine, gt, id) + engine->stats.guc.running = false; +spin_unlock_irqrestore (&guc->timestamp.lock, flags); +} +static void __update_guc_busyness_stats (struct intel_guc *guc) {struct intel_gt *gt =guc_to_gt (guc);
@@ -1619,6 +1632,9 @@ void intel_guc_busyness_park(struct intel_gt *gt)if (!guc_submission_initialized (guc))return ; +/* Assume no engines are running and set running state to false */ +__update_guc_busyness_running_state (guc); +/* * There is a race with suspend flow where the worker runs after suspend * and causes an unclaimed register access warning. Cancel the worker
drivers/gpu/drm/mediatek/mtk_drm_drv.c +5 -6
@@ -381,11 +381,11 @@ static bool mtk_drm_get_all_drm_priv(struct device *dev) of_id =of_match_node (mtk_drm_of_ids, node);if (!of_id) - goto next_put_node; +continue ; pdev =of_find_device_by_node (node);if (!pdev) - goto next_put_node; +continue ; drm_dev =device_find_child (&pdev->dev,NULL , mtk_drm_match);if (!drm_dev)
@@ -411,11 +411,10 @@ static bool mtk_drm_get_all_drm_priv(struct device *dev) next_put_device_pdev_dev:put_device (&pdev->dev); -next_put_node: -of_node_put (node); - -if (cnt ==MAX_CRTC ) +if (cnt ==MAX_CRTC ) { +of_node_put (node);break ; + } }if (drm_priv->data->mmsys_dev_num == cnt) {
drivers/gpu/drm/panthor/panthor_drv.c +1 -1
@@ -1023,7 +1023,7 @@ static int panthor_ioctl_group_create(struct drm_device *ddev, void *data,struct drm_panthor_queue_create *queue_args;int ret; -if (!args->queues.count) +if (!args->queues.count || args->queues.count >MAX_CS_PER_CSG )return -EINVAL ; ret =PANTHOR_UOBJ_GET_ARRAY (queue_args, &args->queues);
drivers/gpu/drm/xe/tests/xe_bo.c +1 -1
@@ -222,7 +222,7 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc }xe_bo_lock (external, false); - err =xe_bo_pin_external (external); + err =xe_bo_pin_external (external, false);xe_bo_unlock (external);if (err) { KUNIT_FAIL(test, "external bo pin err=%pe\n",
drivers/gpu/drm/xe/tests/xe_dma_buf.c +1 -9
@@ -89,15 +89,7 @@ static void check_residency(struct kunit *test, struct xe_bo *exported,return ; } -/* -* If on different devices, the exporter is kept in system if -* possible, saving a migration step as the transfer is just -* likely as fast from system memory. -*/ -if (params->mem_mask &XE_BO_FLAG_SYSTEM ) -KUNIT_EXPECT_TRUE (test,xe_bo_is_mem_type (exported,XE_PL_TT )); -else -KUNIT_EXPECT_TRUE (test,xe_bo_is_mem_type (exported, mem_type)); +KUNIT_EXPECT_TRUE (test,xe_bo_is_mem_type (exported, mem_type));if (params->force_different_devices)KUNIT_EXPECT_TRUE (test,xe_bo_is_mem_type (imported,XE_PL_TT ));
drivers/gpu/drm/xe/xe_bo.c +12 -4
@@ -157,6 +157,8 @@ static void try_add_system(struct xe_device *xe, struct xe_bo *bo, bo->placements[*c] = (struct ttm_place ) { .mem_type =XE_PL_TT , + .flags = (bo_flags &XE_BO_FLAG_VRAM_MASK ) ? +TTM_PL_FLAG_FALLBACK :0 , }; *c +=1 ; }
@@ -1743,6 +1745,7 @@ uint64_t vram_region_gpu_offset(struct ttm_resource *res)/** * xe_bo_pin_external - pin an external BO * @bo: buffer object to be pinned +* @in_place: Pin in current placement, don't attempt to migrate. * * Pin an external (not tied to a VM, can be exported via dma-buf / prime FD) * BO. Unique call compared to xe_bo_pin as this function has it own set of
@@ -1750,7 +1753,7 @@ uint64_t vram_region_gpu_offset(struct ttm_resource *res)* * Returns 0 for success, negative error code otherwise. */ -int xe_bo_pin_external (struct xe_bo *bo) +int xe_bo_pin_external (struct xe_bo *bo,bool in_place) {struct xe_device *xe =xe_bo_device (bo);int err;
@@ -1759,9 +1762,11 @@ int xe_bo_pin_external(struct xe_bo *bo)xe_assert (xe,xe_bo_is_user (bo));if (!xe_bo_is_pinned (bo)) { - err =xe_bo_validate (bo,NULL , false); -if (err) -return err; +if (!in_place) { + err =xe_bo_validate (bo,NULL , false); +if (err) +return err; + }if (xe_bo_is_vram (bo)) {spin_lock (&xe->pinned.lock);
@@ -1913,6 +1918,9 @@ int xe_bo_validate(struct xe_bo *bo, struct xe_vm *vm, bool allow_res_evict) .no_wait_gpu = false, }; +if (xe_bo_is_pinned (bo)) +return 0 ; +if (vm) {lockdep_assert_held (&vm->lock);xe_vm_assert_held (vm);
drivers/gpu/drm/xe/xe_bo.h +1 -1
@@ -173,7 +173,7 @@ static inline void xe_bo_unlock_vm_held(struct xe_bo *bo) } } -int xe_bo_pin_external (struct xe_bo *bo); +int xe_bo_pin_external (struct xe_bo *bo,bool in_place);int xe_bo_pin (struct xe_bo *bo);void xe_bo_unpin_external (struct xe_bo *bo);void xe_bo_unpin (struct xe_bo *bo);
drivers/gpu/drm/xe/xe_dma_buf.c +1 -1
@@ -72,7 +72,7 @@ static int xe_dma_buf_pin(struct dma_buf_attachment *attach)return ret; } - ret =xe_bo_pin_external (bo); + ret =xe_bo_pin_external (bo, true);xe_assert (xe, !ret);return 0 ;
drivers/i2c/busses/i2c-i801.c +1 -1
@@ -1057,7 +1057,7 @@ static const struct pci_device_id i801_ids[] = { { PCI_DEVICE_DATA(INTEL, METEOR_LAKE_P_SMBUS, FEATURES_ICH5 | FEATURE_TCO_CNL) }, { PCI_DEVICE_DATA(INTEL, METEOR_LAKE_SOC_S_SMBUS, FEATURES_ICH5 | FEATURE_TCO_CNL) }, { PCI_DEVICE_DATA(INTEL, METEOR_LAKE_PCH_S_SMBUS, FEATURES_ICH5 | FEATURE_TCO_CNL) }, - { PCI_DEVICE_DATA(INTEL, BIRCH_STREAM_SMBUS, FEATURES_ICH5 | FEATURE_TCO_CNL) }, + { PCI_DEVICE_DATA(INTEL, BIRCH_STREAM_SMBUS, FEATURES_ICH5) }, { PCI_DEVICE_DATA(INTEL, ARROW_LAKE_H_SMBUS, FEATURES_ICH5 | FEATURE_TCO_CNL) }, { PCI_DEVICE_DATA(INTEL, PANTHER_LAKE_H_SMBUS, FEATURES_ICH5 | FEATURE_TCO_CNL) }, { PCI_DEVICE_DATA(INTEL, PANTHER_LAKE_P_SMBUS, FEATURES_ICH5 | FEATURE_TCO_CNL) },
drivers/input/misc/iqs7222.c +3 -0
@@ -2430,6 +2430,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/mtd/nand/raw/atmel/nand-controller.c +13 -3
@@ -1377,14 +1377,24 @@ static int atmel_smc_nand_prepare_smcconf(struct atmel_nand *nand,if (ret)return ret; +/* +* 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/mtd/nand/spi/winbond.c +36 -1
@@ -122,6 +122,41 @@ static const struct mtd_ooblayout_ops w25n02kv_ooblayout = { .free = w25n02kv_ooblayout_free, }; +static int w25n01jw_ooblayout_ecc (struct mtd_info *mtd,int section, +struct mtd_oob_region *region) +{ +if (section >3 ) +return -ERANGE ; + + region->offset = (16 * section) +12 ; + region->length =4 ; + +return 0 ; +} + +static int w25n01jw_ooblayout_free (struct mtd_info *mtd,int section, +struct mtd_oob_region *region) +{ +if (section >3 ) +return -ERANGE ; + + region->offset = (16 * section); + region->length =12 ; + +/* Extract BBM */ +if (!section) { + region->offset +=2 ; + region->length -=2 ; + } + +return 0 ; +} + +static const struct mtd_ooblayout_ops w25n01jw_ooblayout = { + .ecc = w25n01jw_ooblayout_ecc, + .free = w25n01jw_ooblayout_free, +}; +static int w25n02kv_ecc_get_status (struct spinand_device *spinand,u8 status) {
@@ -206,7 +241,7 @@ static const struct spinand_info winbond_spinand_table[] = { &write_cache_variants, &update_cache_variants), 0, - SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL)), + SPINAND_ECCINFO(&w25n01jw_ooblayout, NULL)), SPINAND_INFO("W25N02JWZEIF", SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xbf, 0x22), NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 2, 1),
drivers/net/can/xilinx_can.c +8 -8
@@ -690,14 +690,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)
@@ -730,6 +722,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
@@ -2356,7 +2356,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
@@ -4206,7 +4206,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/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws_matcher.c +8 -16
@@ -165,14 +165,14 @@ static int hws_matcher_disconnect(struct mlx5hws_matcher *matcher) next->match_ste.rtc_0_id, next->match_ste.rtc_1_id);if (ret) { -mlx5hws_err (tbl->ctx,"Failed to disconnect matcher\n" ); - goto matcher_reconnect; +mlx5hws_err (tbl->ctx,"Fatal error, failed to disconnect matcher\n" ); +return ret; } }else { ret =mlx5hws_table_connect_to_miss_table (tbl, tbl->default_miss.miss_tbl);if (ret) { -mlx5hws_err (tbl->ctx,"Failed to disconnect last matcher\n" ); - goto matcher_reconnect; +mlx5hws_err (tbl->ctx,"Fatal error, failed to disconnect last matcher\n" ); +return ret; } }
@@ -180,27 +180,19 @@ static int hws_matcher_disconnect(struct mlx5hws_matcher *matcher)if (prev_ft_id == tbl->ft_id) { ret =mlx5hws_table_update_connected_miss_tables (tbl);if (ret) { -mlx5hws_err (tbl->ctx,"Fatal error, failed to update connected miss table\n" ); - goto matcher_reconnect; +mlx5hws_err (tbl->ctx, +"Fatal error, failed to update connected miss table\n" ); +return ret; } } ret =mlx5hws_table_ft_set_default_next_ft (tbl, prev_ft_id);if (ret) {mlx5hws_err (tbl->ctx,"Fatal error, failed to restore matcher ft default miss\n" ); - goto matcher_reconnect; +return ret; }return 0 ; - -matcher_reconnect: -if (list_empty (&tbl->matchers_list) || !prev) -list_add (&matcher->list_node, &tbl->matchers_list); -else -/* insert after prev matcher */ -list_add (&matcher->list_node, &prev->list_node); - -return ret; } static void hws_matcher_set_rtc_attr_sz(struct mlx5hws_matcher *matcher,
drivers/net/phy/mdio_bus.c +1 -3
@@ -97,6 +97,7 @@ int mdiobus_unregister_device(struct mdio_device *mdiodev)if (mdiodev->bus->mdio_map[mdiodev->addr] != mdiodev)return -EINVAL ; +gpiod_put (mdiodev->reset_gpio);reset_control_put (mdiodev->reset_ctrl); mdiodev->bus->mdio_map[mdiodev->addr] =NULL ;
@@ -814,9 +815,6 @@ void mdiobus_unregister(struct mii_bus *bus)if (!mdiodev)continue ; -if (mdiodev->reset_gpio) -gpiod_put (mdiodev->reset_gpio); - mdiodev->device_remove (mdiodev); mdiodev->device_free (mdiodev); }
drivers/nvme/host/pci.c +3 -0
@@ -989,6 +989,9 @@ static void nvme_submit_cmds(struct nvme_queue *nvmeq, struct rq_list *rqlist) {struct request *req; +if (rq_list_empty (rqlist)) +return ; +spin_lock (&nvmeq->sq_lock);while ((req =rq_list_pop (rqlist))) {struct nvme_iod *iod =blk_mq_rq_to_pdu (req);
drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c +2 -2
@@ -127,13 +127,13 @@ static int eusb2_repeater_init(struct phy *phy) rptr->cfg->init_tbl[i].value);/* Override registers from devicetree values */ -if (!of_property_read_u8 (np,"qcom,tune-usb2-amplitude" , &val)) +if (!of_property_read_u8 (np,"qcom,tune-usb2-preem" , &val))regmap_write (regmap, base +EUSB2_TUNE_USB2_PREEM , val);if (!of_property_read_u8 (np,"qcom,tune-usb2-disc-thres" , &val))regmap_write (regmap, base +EUSB2_TUNE_HSDISC , val); -if (!of_property_read_u8 (np,"qcom,tune-usb2-preem" , &val)) +if (!of_property_read_u8 (np,"qcom,tune-usb2-amplitude" , &val))regmap_write (regmap, base +EUSB2_TUNE_IUSB2 , val);/* Wait for status OK */
drivers/phy/tegra/xusb-tegra210.c +5 -1
@@ -3164,18 +3164,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-omap-usb2.c +13 -0
@@ -363,6 +363,13 @@ static void omap_usb2_init_errata(struct omap_usb *phy) phy->flags |=OMAP_USB2_DISABLE_CHRG_DET ; } +static void omap_usb2_put_device (void *_dev) +{ +struct device *dev = _dev; + +put_device (dev); +} +static int omap_usb2_probe (struct platform_device *pdev) {struct omap_usb *phy;
@@ -373,6 +380,7 @@ static int omap_usb2_probe(struct platform_device *pdev)struct device_node *control_node;struct platform_device *control_pdev;const struct usb_phy_data *phy_data; +int ret; phy_data =device_get_match_data (&pdev->dev);if (!phy_data)
@@ -423,6 +431,11 @@ static int omap_usb2_probe(struct platform_device *pdev)return -EINVAL ; } phy->control_dev = &control_pdev->dev; + + ret =devm_add_action_or_reset (&pdev->dev, omap_usb2_put_device, + phy->control_dev); +if (ret) +return ret; }else { if (of_property_read_u32_index(node, "syscon-phy-power", 1,
drivers/phy/ti/phy-ti-pipe3.c +13 -0
@@ -667,12 +667,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" );
@@ -704,6 +712,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/tty/hvc/hvc_console.c +3 -3
@@ -543,10 +543,10 @@ static ssize_t hvc_write(struct tty_struct *tty, const u8 *buf, size_t 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
@@ -1161,17 +1161,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,
@@ -1183,7 +1172,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/function/f_midi2.c +9 -2
@@ -1601,6 +1601,7 @@ static int f_midi2_create_card(struct f_midi2 *midi2)strscpy (fb->info.name,ump_fb_name (b),sizeof (fb->info.name)); } +snd_ump_update_group_attrs (ump); }for (i =0 ; i < midi2->num_eps; i++) {
@@ -1738,9 +1739,12 @@ static int f_midi2_create_usb_configs(struct f_midi2 *midi2,case USB_SPEED_HIGH : midi2_midi1_ep_out_desc.wMaxPacketSize =cpu_to_le16 (512 ); midi2_midi1_ep_in_desc.wMaxPacketSize =cpu_to_le16 (512 ); -for (i =0 ; i < midi2->num_eps; i++) +for (i =0 ; i < midi2->num_eps; i++) { midi2_midi2_ep_out_desc[i].wMaxPacketSize =cpu_to_le16 (512 ); + midi2_midi2_ep_in_desc[i].wMaxPacketSize = +cpu_to_le16 (512 ); + } fallthrough;case USB_SPEED_FULL : midi1_in_eps = midi2_midi1_ep_in_descs;
@@ -1749,9 +1753,12 @@ static int f_midi2_create_usb_configs(struct f_midi2 *midi2,case USB_SPEED_SUPER : midi2_midi1_ep_out_desc.wMaxPacketSize =cpu_to_le16 (1024 ); midi2_midi1_ep_in_desc.wMaxPacketSize =cpu_to_le16 (1024 ); -for (i =0 ; i < midi2->num_eps; i++) +for (i =0 ; i < midi2->num_eps; i++) { midi2_midi2_ep_out_desc[i].wMaxPacketSize =cpu_to_le16 (1024 ); + midi2_midi2_ep_in_desc[i].wMaxPacketSize = +cpu_to_le16 (1024 ); + } midi1_in_eps = midi2_midi1_ep_in_ss_descs; midi1_out_eps = midi2_midi1_ep_out_ss_descs;break ;
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/host/xhci-mem.c +1 -1
@@ -939,7 +939,7 @@ static void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_i out:/* we are now at a leaf device */ xhci_debugfs_remove_slot (xhci, slot_id); -xhci_free_virt_device (xhci, vdev, slot_id); +xhci_free_virt_device (xhci, xhci->devs[slot_id], slot_id); } int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id,
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) */
drivers/usb/typec/tcpm/tcpm.c +8 -4
@@ -2375,17 +2375,21 @@ static void tcpm_handle_vdm_request(struct tcpm_port *port,case ADEV_NONE :break ;case ADEV_NOTIFY_USB_AND_QUEUE_VDM : -WARN_ON (typec_altmode_notify (adev,TYPEC_STATE_USB ,NULL )); -typec_altmode_vdm (adev, p[0 ], &p[1 ], cnt); +if (rx_sop_type ==TCPC_TX_SOP_PRIME ) { +typec_cable_altmode_vdm (adev,TYPEC_PLUG_SOP_P , p[0 ], &p[1 ], cnt); + }else { +WARN_ON (typec_altmode_notify (adev,TYPEC_STATE_USB ,NULL )); +typec_altmode_vdm (adev, p[0 ], &p[1 ], cnt); + }break ;case ADEV_QUEUE_VDM : -if (response_tx_sop_type ==TCPC_TX_SOP_PRIME ) +if (rx_sop_type ==TCPC_TX_SOP_PRIME )typec_cable_altmode_vdm (adev,TYPEC_PLUG_SOP_P , p[0 ], &p[1 ], cnt);else typec_altmode_vdm (adev, p[0 ], &p[1 ], cnt);break ;case ADEV_QUEUE_VDM_SEND_EXIT_MODE_ON_FAIL : -if (response_tx_sop_type ==TCPC_TX_SOP_PRIME ) { +if (rx_sop_type ==TCPC_TX_SOP_PRIME ) {if (typec_cable_altmode_vdm (adev,TYPEC_PLUG_SOP_P , p[0 ], &p[1 ], cnt)) { int svdm_version = typec_get_cable_svdm_version(
fs/btrfs/extent_io.c +62 -10
130 lines not on this page · raw message
fs/btrfs/inode.c +11 -1
@@ -5634,7 +5634,17 @@ static void btrfs_del_inode_from_root(struct btrfs_inode *inode)bool empty = false;xa_lock (&root->inodes); - entry =__xa_erase (&root->inodes,btrfs_ino (inode)); +/* +* This btrfs_inode is being freed and has already been unhashed at this +* point. It's possible that another btrfs_inode has already been +* allocated for the same inode and inserted itself into the root, so +* don't delete it in that case. +* +* Note that this shouldn't need to allocate memory, so the gfp flags +* don't really matter. +*/ + entry =__xa_cmpxchg (&root->inodes,btrfs_ino (inode), inode,NULL , +GFP_ATOMIC );if (entry == inode) empty =xa_empty (&root->inodes);xa_unlock (&root->inodes);
fs/btrfs/qgroup.c +4 -2
@@ -1501,6 +1501,7 @@ static int __qgroup_excl_accounting(struct btrfs_fs_info *fs_info, u64 ref_root,struct btrfs_qgroup *qgroup;LIST_HEAD (qgroup_list);u64 num_bytes = src->excl; +u64 num_bytes_cmpr = src->excl_cmpr;int ret =0 ; qgroup =find_qgroup_rb (fs_info, ref_root);
@@ -1512,11 +1513,12 @@ static int __qgroup_excl_accounting(struct btrfs_fs_info *fs_info, u64 ref_root,struct btrfs_qgroup_list *glist; qgroup->rfer += sign * num_bytes; - qgroup->rfer_cmpr += sign * num_bytes; + qgroup->rfer_cmpr += sign * num_bytes_cmpr;WARN_ON (sign <0 && qgroup->excl < num_bytes); +WARN_ON (sign <0 && qgroup->excl_cmpr < num_bytes_cmpr); qgroup->excl += sign * num_bytes; - qgroup->excl_cmpr += sign * num_bytes; + qgroup->excl_cmpr += sign * num_bytes_cmpr;if (sign >0 )qgroup_rsv_add_by_qgroup (fs_info, qgroup, src);
fs/ceph/debugfs.c +6 -8
@@ -55,8 +55,6 @@ static int mdsc_show(struct seq_file *s, void *p)struct ceph_mds_client *mdsc = fsc->mdsc;struct ceph_mds_request *req;struct rb_node *rp; -int pathlen =0 ; -u64 pathbase;char *path;mutex_lock (&mdsc->mutex);
@@ -81,8 +79,8 @@ static int mdsc_show(struct seq_file *s, void *p)if (req->r_inode) {seq_printf (s," #%llx" ,ceph_ino (req->r_inode)); }else if (req->r_dentry) { - path =ceph_mdsc_build_path (mdsc, req->r_dentry, &pathlen, - &pathbase,0 ); +struct ceph_path_info path_info; + path =ceph_mdsc_build_path (mdsc, req->r_dentry, &path_info,0 );if (IS_ERR (path)) path =NULL ;spin_lock (&req->r_dentry->d_lock);
@@ -91,7 +89,7 @@ static int mdsc_show(struct seq_file *s, void *p) req->r_dentry, path ? path : "");spin_unlock (&req->r_dentry->d_lock); -ceph_mdsc_free_path (path, pathlen); +ceph_mdsc_free_path_info (&path_info); }else if (req->r_path1) {seq_printf (s," #%llx/%s" , req->r_ino1.ino, req->r_path1);
@@ -100,8 +98,8 @@ static int mdsc_show(struct seq_file *s, void *p) }if (req->r_old_dentry) { - path =ceph_mdsc_build_path (mdsc, req->r_old_dentry, &pathlen, - &pathbase,0 ); +struct ceph_path_info path_info; + path =ceph_mdsc_build_path (mdsc, req->r_old_dentry, &path_info,0 );if (IS_ERR (path)) path =NULL ;spin_lock (&req->r_old_dentry->d_lock);
@@ -111,7 +109,7 @@ static int mdsc_show(struct seq_file *s, void *p) req->r_old_dentry, path ? path : "");spin_unlock (&req->r_old_dentry->d_lock); -ceph_mdsc_free_path (path, pathlen); +ceph_mdsc_free_path_info (&path_info); }else if (req->r_path2 && req->r_op !=CEPH_MDS_OP_SYMLINK ) {if (req->r_ino2.ino) seq_printf(s, " #%llx/%s", req->r_ino2.ino,
fs/ceph/dir.c +7 -10
@@ -1263,10 +1263,8 @@ static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc,/* If op failed, mark everyone involved for errors */ if (result) { -int pathlen =0 ; -u64 base =0 ; -char *path =ceph_mdsc_build_path (mdsc, dentry, &pathlen, - &base,0 ); +struct ceph_path_info path_info = {0 }; +char *path =ceph_mdsc_build_path (mdsc, dentry, &path_info,0 );/* mark error on parent + clear complete */ mapping_set_error (req->r_parent->i_mapping, result);
@@ -1280,8 +1278,8 @@ static void ceph_async_unlink_cb(struct ceph_mds_client *mdsc,mapping_set_error (req->r_old_inode->i_mapping, result);pr_warn_client (cl,"failure path=(%llx)%s result=%d!\n" , - base,IS_ERR (path) ?"<<bad>>" : path, result); -ceph_mdsc_free_path (path, pathlen); + path_info.vino.ino,IS_ERR (path) ?"<<bad>>" : path, result); +ceph_mdsc_free_path_info (&path_info); } out:iput (req->r_old_inode);
@@ -1339,8 +1337,6 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry)int err = -EROFS ;int op;char *path; -int pathlen; -u64 pathbase;if (ceph_snap (dir) ==CEPH_SNAPDIR ) {/* rmdir .snap/foo is RMSNAP */
@@ -1359,14 +1355,15 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry)if (!dn) { try_async = false; }else { - path =ceph_mdsc_build_path (mdsc, dn, &pathlen, &pathbase,0 ); +struct ceph_path_info path_info; + path =ceph_mdsc_build_path (mdsc, dn, &path_info,0 );if (IS_ERR (path)) { try_async = false; err =0 ; }else { err =ceph_mds_check_access (mdsc, path,MAY_WRITE ); } -ceph_mdsc_free_path (path, pathlen); +ceph_mdsc_free_path_info (&path_info);dput (dn);/* For none EACCES cases will let the MDS do the mds auth check */
fs/ceph/file.c +10 -14
@@ -368,8 +368,6 @@ int ceph_open(struct inode *inode, struct file *file)int flags, fmode, wanted;struct dentry *dentry;char *path; -int pathlen; -u64 pathbase;bool do_sync = false;int mask =MAY_READ ;
@@ -399,14 +397,15 @@ int ceph_open(struct inode *inode, struct file *file)if (!dentry) { do_sync = true; }else { - path =ceph_mdsc_build_path (mdsc, dentry, &pathlen, &pathbase,0 ); +struct ceph_path_info path_info; + path =ceph_mdsc_build_path (mdsc, dentry, &path_info,0 );if (IS_ERR (path)) { do_sync = true; err =0 ; }else { err =ceph_mds_check_access (mdsc, path, mask); } -ceph_mdsc_free_path (path, pathlen); +ceph_mdsc_free_path_info (&path_info);dput (dentry);/* For none EACCES cases will let the MDS do the mds auth check */
@@ -614,15 +613,13 @@ static void ceph_async_create_cb(struct ceph_mds_client *mdsc,mapping_set_error (req->r_parent->i_mapping, result);if (result) { -int pathlen =0 ; -u64 base =0 ; -char *path =ceph_mdsc_build_path (mdsc, req->r_dentry, &pathlen, - &base,0 ); +struct ceph_path_info path_info = {0 }; +char *path =ceph_mdsc_build_path (mdsc, req->r_dentry, &path_info,0 );pr_warn_client (cl,"async create failure path=(%llx)%s result=%d!\n" , - base,IS_ERR (path) ?"<<bad>>" : path, result); -ceph_mdsc_free_path (path, pathlen); + path_info.vino.ino,IS_ERR (path) ?"<<bad>>" : path, result); +ceph_mdsc_free_path_info (&path_info);ceph_dir_clear_complete (req->r_parent);if (!d_unhashed (dentry))
@@ -791,8 +788,6 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,int mask;int err;char *path; -int pathlen; -u64 pathbase; doutc(cl, "%p %llx.%llx dentry %p '%pd' %s flags %d mode 0%o\n", dir, ceph_vinop(dir), dentry, dentry,
@@ -814,7 +809,8 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,if (!dn) { try_async = false; }else { - path =ceph_mdsc_build_path (mdsc, dn, &pathlen, &pathbase,0 ); +struct ceph_path_info path_info; + path =ceph_mdsc_build_path (mdsc, dn, &path_info,0 );if (IS_ERR (path)) { try_async = false; err =0 ;
@@ -826,7 +822,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, mask |=MAY_WRITE ; err =ceph_mds_check_access (mdsc, path, mask); } -ceph_mdsc_free_path (path, pathlen); +ceph_mdsc_free_path_info (&path_info);dput (dn);/* For none EACCES cases will let the MDS do the mds auth check */
fs/ceph/inode.c +72 -16
172 lines not on this page · raw message
fs/ceph/mds_client.c +105 -67
343 lines not on this page · raw message
fs/ceph/mds_client.h +14 -4
@@ -612,14 +612,24 @@ extern int ceph_mds_check_access(struct ceph_mds_client *mdsc, char *tpath,extern void ceph_mdsc_pre_umount (struct ceph_mds_client *mdsc); -static inline void ceph_mdsc_free_path (char *path,int len) +/* +* Structure to group path-related output parameters for build_*_path functions +*/ +struct ceph_path_info { +const char *path; +int pathlen; +struct ceph_vino vino; +bool freepath; +}; + +static inline void ceph_mdsc_free_path_info (const struct ceph_path_info *path_info) { -if (!IS_ERR_OR_NULL (path)) -__putname (path - (PATH_MAX -1 - len)); +if (path_info && path_info->freepath && !IS_ERR_OR_NULL (path_info->path)) +__putname ((char *)path_info->path - (PATH_MAX -1 - path_info->pathlen)); }extern char *ceph_mdsc_build_path (struct ceph_mds_client *mdsc, -struct dentry *dentry,int *plen,u64 *base, +struct dentry *dentry,struct ceph_path_info *path_info,int for_wire);extern void __ceph_mdsc_drop_dentry_lease (struct dentry *dentry);
fs/ext4/namei.c +10 -4
@@ -1462,7 +1462,8 @@ static bool ext4_match(struct inode *parent,* sure cf_name was properly initialized before * considering the calculated hash. */ -if (IS_ENCRYPTED (parent) && fname->cf_name.name && +if (sb_no_casefold_compat_fallback (parent->i_sb) && +IS_ENCRYPTED (parent) && fname->cf_name.name && (fname->hinfo.hash !=EXT4_DIRENT_HASH (de) || fname->hinfo.minor_hash !=EXT4_DIRENT_MINOR_HASH (de)))return false;
@@ -1595,10 +1596,15 @@ static struct buffer_head *__ext4_find_entry(struct inode *dir,* return. Otherwise, fall back to doing a search the * old fashioned way. */ -if (!IS_ERR (ret) ||PTR_ERR (ret) !=ERR_BAD_DX_DIR ) +if (IS_ERR (ret) &&PTR_ERR (ret) ==ERR_BAD_DX_DIR ) +dxtrace (printk (KERN_DEBUG "ext4_find_entry: dx failed, " +"falling back\n" )); +else if (!sb_no_casefold_compat_fallback (dir->i_sb) && + *res_dir ==NULL &&IS_CASEFOLDED (dir)) +dxtrace (printk (KERN_DEBUG "ext4_find_entry: casefold " +"failed, falling back\n" )); +else goto cleanup_and_exit; -dxtrace (printk (KERN_DEBUG "ext4_find_entry: dx failed, " -"falling back\n" )); ret =NULL ; } nblocks = dir->i_size >>EXT4_BLOCK_SIZE_BITS (sb);
fs/fhandle.c +8 -0
@@ -176,6 +176,14 @@ static int vfs_dentry_acceptable(void *context, struct dentry *dentry)if (!ctx->flags)return 1 ; +/* +* Verify that the decoded dentry itself has a valid id mapping. +* In case the decoded dentry is the mountfd root itself, this +* verifies that the mountfd inode itself has a valid id mapping. +*/ +if (!privileged_wrt_inode_uidgid (user_ns, idmap,d_inode (dentry))) +return 0 ; +/* * It's racy as we're not taking rename_lock but we're able to ignore * permissions and we just need an approximation whether we were able
fs/fuse/file.c +4 -1
@@ -3229,7 +3229,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;
@@ -3295,6 +3295,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/fuse/passthrough.c +5 -0
@@ -233,6 +233,11 @@ int fuse_backing_open(struct fuse_conn *fc, struct fuse_backing_map *map)if (!file) goto out; +/* read/write/splice/mmap passthrough only relevant for regular files */ + res =d_is_dir (file->f_path.dentry) ? -EISDIR : -EINVAL ; +if (!d_is_reg (file->f_path.dentry)) + goto out_fput; + backing_sb =file_inode (file)->i_sb; res = -ELOOP ;if (backing_sb->s_stack_depth >= fc->max_stack_depth)
fs/kernfs/file.c +38 -20
183 lines not on this page · raw message
fs/nfs/client.c +2 -0
@@ -881,6 +881,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/direct.c +19 -3
@@ -320,6 +320,7 @@ static void nfs_read_sync_pgio_error(struct list_head *head, int error)static void nfs_direct_pgio_init (struct nfs_pgio_header *hdr) {get_dreq (hdr->dreq); +set_bit (NFS_IOHDR_ODIRECT , &hdr->flags); }static const struct nfs_pgio_completion_ops nfs_direct_read_completion_ops = {
@@ -471,8 +472,16 @@ ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter,if (user_backed_iter (iter)) dreq->flags =NFS_ODIRECT_SHOULD_DIRTY ; -if (!swap) -nfs_start_io_direct (inode); +if (!swap) { + result =nfs_start_io_direct (inode); +if (result) { +/* release the reference that would usually be +* consumed by nfs_direct_read_schedule_iovec() +*/ +nfs_direct_req_release (dreq); + goto out_release; + } + }NFS_I (inode)->read_io += count; requested =nfs_direct_read_schedule_iovec (dreq, iter, iocb->ki_pos);
@@ -1030,7 +1039,14 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter, requested =nfs_direct_write_schedule_iovec (dreq, iter, pos,FLUSH_STABLE ); }else { -nfs_start_io_direct (inode); + result =nfs_start_io_direct (inode); +if (result) { +/* release the reference that would usually be +* consumed by nfs_direct_write_schedule_iovec() +*/ +nfs_direct_req_release (dreq); + goto out_release; + } requested =nfs_direct_write_schedule_iovec (dreq, iter, pos,FLUSH_COND_STABLE );
fs/nfs/file.c +15 -6
@@ -167,7 +167,10 @@ nfs_file_read(struct kiocb *iocb, struct iov_iter *to) iocb->ki_filp, iov_iter_count(to), (unsigned long) iocb->ki_pos); -nfs_start_io_read (inode); + result =nfs_start_io_read (inode); +if (result) +return result; + result =nfs_revalidate_mapping (inode, iocb->ki_filp->f_mapping);if (!result) { result =generic_file_read_iter (iocb, to);
@@ -188,7 +191,10 @@ nfs_file_splice_read(struct file *in, loff_t *ppos, struct pipe_inode_info *pipedprintk ("NFS: splice_read(%pD2, %zu@%llu)\n" , in, len, *ppos); -nfs_start_io_read (inode); + result =nfs_start_io_read (inode); +if (result) +return result; + result =nfs_revalidate_mapping (inode, in->f_mapping);if (!result) { result =filemap_splice_read (in, ppos, pipe, len, flags);
@@ -431,10 +437,11 @@ static void nfs_invalidate_folio(struct folio *folio, size_t offset,dfprintk (PAGECACHE ,"NFS: invalidate_folio(%lu, %zu, %zu)\n" , folio->index, offset, length); -if (offset !=0 || length <folio_size (folio)) -return ;/* Cancel any unstarted writes on this page */ -nfs_wb_folio_cancel (inode, folio); +if (offset !=0 || length <folio_size (folio)) +nfs_wb_folio (inode, folio); +else +nfs_wb_folio_cancel (inode, folio);folio_wait_private_2 (folio);/* [DEPRECATED] */ trace_nfs_invalidate_folio (inode,folio_pos (folio) + offset, length); }
@@ -669,7 +676,9 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from)nfs_clear_invalid_mapping (file->f_mapping); since =filemap_sample_wb_err (file->f_mapping); -nfs_start_io_write (inode); + error =nfs_start_io_write (inode); +if (error) +return error; result =generic_write_checks (iocb, from);if (result >0 ) result =generic_perform_write (iocb, from);
fs/nfs/flexfilelayout/flexfilelayout.c +13 -8
@@ -292,7 +292,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)
@@ -772,8 +772,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 ;
@@ -803,7 +806,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); }
@@ -817,7 +820,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); }
@@ -867,7 +870,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);
@@ -1071,11 +1074,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/inode.c +3 -1
@@ -761,8 +761,10 @@ nfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,trace_nfs_setattr_enter (inode);/* Write all dirty data */ -if (S_ISREG (inode->i_mode)) +if (S_ISREG (inode->i_mode)) { +nfs_file_block_o_direct (NFS_I (inode));nfs_sync_inode (inode); + } fattr =nfs_alloc_fattr_with_label (NFS_SERVER (inode));if (fattr ==NULL ) {
fs/nfs/internal.h +14 -3
@@ -6,6 +6,7 @@#include "nfs4_fs.h" #include <linux/fs_context.h> #include <linux/security.h> +#include <linux/compiler_attributes.h> #include <linux/crc32.h> #include <linux/sunrpc/addr.h> #include <linux/nfs_page.h>
@@ -516,11 +517,11 @@ extern const struct netfs_request_ops nfs_netfs_ops;#endif /* io.c */ -extern void nfs_start_io_read (struct inode *inode); +extern __must_check int nfs_start_io_read (struct inode *inode);extern void nfs_end_io_read (struct inode *inode); -extern void nfs_start_io_write (struct inode *inode); +extern __must_check int nfs_start_io_write (struct inode *inode);extern void nfs_end_io_write (struct inode *inode); -extern void nfs_start_io_direct (struct inode *inode); +extern __must_check int nfs_start_io_direct (struct inode *inode);extern void nfs_end_io_direct (struct inode *inode);static inline bool nfs_file_io_is_buffered (struct nfs_inode *nfsi)
@@ -528,6 +529,16 @@ static inline bool nfs_file_io_is_buffered(struct nfs_inode *nfsi)return test_bit (NFS_INO_ODIRECT , &nfsi->flags) ==0 ; } +/* Must be called with exclusively locked inode->i_rwsem */ +static inline void nfs_file_block_o_direct (struct nfs_inode *nfsi) +{ +if (test_bit (NFS_INO_ODIRECT , &nfsi->flags)) { +clear_bit (NFS_INO_ODIRECT , &nfsi->flags); +inode_dio_wait (&nfsi->vfs_inode); + } +} + +/* namespace.c */ #define NFS_PATH_CANONICAL 1 extern char *nfs_path(char **p, struct dentry *dentry,
fs/nfs/io.c +34 -21
98 lines not on this page · raw message
fs/nfs/localio.c +103 -22
108 lines not on this page · raw message
include/net/netfilter/nf_tables_core.h +25 -24
49 lines not on this page · raw message
include/trace/events/dma.h +145 -8
153 lines not on this page · raw message
include/uapi/linux/mptcp_pm.h +26 -24
50 lines not on this page · raw message
kernel/dma/debug.c +84 -51
135 lines not on this page · raw message
kernel/dma/mapping.c +27 -14
41 lines not on this page · raw message
net/hsr/hsr_device.c +89 -8
97 lines not on this page · raw message
net/netfilter/nf_tables_api.c +79 -44
123 lines not on this page · raw message
net/netfilter/nft_lookup.c +52 -15
67 lines not on this page · raw message
net/netfilter/nft_set_hash.c +24 -30
54 lines not on this page · raw message
net/netfilter/nft_set_pipapo.c +78 -136
214 lines not on this page · raw message
net/netfilter/nft_set_rbtree.c +22 -24
46 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.