Linux 6.6.99
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.6.99 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.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/bpf/map_hash.rst | 8 Documentation/bpf/map_lru_hash_update.dot | 6 Makefile | 2 arch/um/drivers/vector_kern.c | 42 -- arch/x86/Kconfig | 2 arch/x86/include/asm/msr-index.h | 1 arch/x86/kernel/cpu/amd.c | 7 arch/x86/kernel/cpu/mce/amd.c | 28 - arch/x86/kernel/cpu/mce/core.c | 8 arch/x86/kernel/cpu/mce/intel.c | 1 arch/x86/kvm/svm/sev.c | 4 arch/x86/kvm/xen.c | 15 crypto/ecc.c | 2 drivers/acpi/battery.c | 19 - drivers/atm/idt77252.c | 5 drivers/block/nbd.c | 6 drivers/block/ublk_drv.c | 3 drivers/char/ipmi/ipmi_msghandler.c | 3 drivers/gpu/drm/drm_framebuffer.c | 31 + drivers/gpu/drm/drm_gem.c | 74 +++- drivers/gpu/drm/drm_internal.h | 2 drivers/gpu/drm/exynos/exynos7_drm_decon.c | 4 drivers/gpu/drm/tegra/nvdec.c | 6 drivers/gpu/drm/ttm/ttm_bo_util.c | 13 drivers/hid/hid-ids.h | 6 drivers/hid/hid-lenovo.c | 8 drivers/hid/hid-multitouch.c | 8 drivers/hid/hid-quirks.c | 3 drivers/input/keyboard/atkbd.c | 3 drivers/md/md-bitmap.c | 3 drivers/md/raid1.c | 1 drivers/md/raid10.c | 10 drivers/net/can/m_can/m_can.c | 2 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c | 2 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 2 drivers/net/ethernet/ibm/ibmvnic.h | 8 drivers/net/ethernet/microsoft/mana/gdma_main.c | 3 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 24 - drivers/net/ethernet/xilinx/ll_temac_main.c | 2 drivers/net/phy/microchip.c | 2 drivers/net/phy/smsc.c | 57 +++ drivers/net/usb/qmi_wwan.c | 1 drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 6 drivers/pinctrl/pinctrl-amd.c | 11 drivers/pinctrl/qcom/pinctrl-msm.c | 20 + drivers/pwm/pwm-mediatek.c | 13 drivers/tty/vt/vt.c | 1 drivers/usb/cdns3/cdnsp-debug.h | 358 ++++++++++----------- drivers/usb/cdns3/cdnsp-ep0.c | 18 - drivers/usb/cdns3/cdnsp-gadget.c | 6 drivers/usb/cdns3/cdnsp-gadget.h | 11 drivers/usb/cdns3/cdnsp-ring.c | 27 - drivers/usb/dwc3/core.c | 9 drivers/usb/dwc3/gadget.c | 22 - drivers/usb/gadget/function/u_serial.c | 12 fs/btrfs/btrfs_inode.h | 2 fs/btrfs/free-space-tree.c | 16 fs/btrfs/inode.c | 18 - fs/btrfs/transaction.c | 2 fs/btrfs/tree-log.c | 331 +++++++++++-------- fs/erofs/data.c | 2 fs/eventpoll.c | 12 fs/proc/inode.c | 2 fs/proc/proc_sysctl.c | 18 - fs/proc/task_mmu.c | 14 fs/smb/client/cifsglob.h | 3 fs/smb/client/cifsproto.h | 13 fs/smb/client/connect.c | 47 +- fs/smb/client/dfs.c | 73 ++-- fs/smb/client/dfs.h | 42 +- fs/smb/client/dfs_cache.c | 186 ++++++---- fs/smb/client/fs_context.h | 1 fs/smb/client/misc.c | 9 fs/smb/client/namespace.c | 2 fs/smb/server/smb2pdu.c | 29 - fs/smb/server/transport_rdma.c | 5 fs/smb/server/vfs.c | 1 include/drm/drm_file.h | 3 include/drm/drm_framebuffer.h | 7 include/drm/spsc_queue.h | 4 include/linux/math.h | 12 include/linux/mm.h | 5 include/net/af_vsock.h | 2 include/net/netfilter/nf_flow_table.h | 2 io_uring/opdef.c | 1 kernel/bpf/bpf_lru_list.c | 9 kernel/bpf/bpf_lru_list.h | 1 kernel/events/core.c | 6 kernel/rseq.c | 60 ++- lib/maple_tree.c | 14 mm/kasan/report.c | 13 mm/vmalloc.c | 22 - net/appletalk/ddp.c | 1 net/atm/clip.c | 64 ++- net/bluetooth/hci_event.c | 39 -- net/bluetooth/hci_sync.c | 215 +++++++----- net/ipv4/tcp.c | 2 net/ipv6/addrconf.c | 9 net/netlink/af_netlink.c | 82 ++-- net/rxrpc/call_accept.c | 4 net/sched/sch_api.c | 23 - net/tipc/topsrv.c | 2 net/vmw_vsock/af_vsock.c | 57 ++- net/wireless/util.c | 52 ++- scripts/gdb/linux/constants.py.in | 7 scripts/gdb/linux/interrupts.py | 16 scripts/gdb/linux/mapletree.py | 252 ++++++++++++++ scripts/gdb/linux/xarray.py | 28 + sound/pci/hda/patch_realtek.c | 1 sound/soc/amd/yc/acp6x-mach.c | 7 sound/soc/codecs/cs35l56-shared.c | 2 sound/soc/fsl/fsl_asrc.c | 3 tools/arch/x86/include/asm/msr-index.h | 1 tools/build/feature/Makefile | 25 + tools/include/linux/kallsyms.h | 4 tools/perf/Makefile.perf | 27 + tools/testing/selftests/bpf/test_lru_map.c | 105 +++--- 117 files changed, 1937 insertions(+), 1031 deletions(-)
Achill Gilgenast (1):
kallsyms: fix build without execinfo
Akira Inoue (1):
HID: lenovo: Add support for ThinkPad X1 Tablet Thin Keyboard Gen2
Al Viro (2):
fix proc_sys_compare() handling of in-lookup dentries
ksmbd: fix a mount write count leak in ksmbd_vfs_kern_path_locked()
Alexander Gordeev (1):
mm/vmalloc: leave lazy MMU mode on PTE mapping error
Alok Tiwari (1):
net: ll_temac: Fix missing tx_pending check in ethtools_set_ringparam()
Baolin Wang (1):
mm: fix the inaccurate memory statistics issue for users
Bartosz Golaszewski (1):
pinctrl: qcom: msm: mark certain pins as invalid for interrupts
Chao Yu (1):
erofs: fix to add missing tracepoint in erofs_read_folio()
Chia-Lin Kao (AceLan) (1):
HID: quirks: Add quirk for 2 Chicony Electronics HP 5MP Cameras
Christian Eggers (1):
Bluetooth: HCI: Set extended advertising data synchronously
Christian König (1):
drm/ttm: fix error handling in ttm_buffer_object_transfer
Dan Carpenter (1):
ipmi:msghandler: Fix potential memory corruption in ipmi_create_user()
Daniil Dulov (1):
wifi: zd1211rw: Fix potential NULL pointer dereference in zd_mac_tx_to_dev()
David Howells (2):
rxrpc: Fix bug due to prealloc collision
rxrpc: Fix oops due to non-existence of prealloc backlog struct
David Woodhouse (1):
KVM: x86/xen: Allow 'out of range' event channel ports in IRQ routing table.
Eric Dumazet (1):
netfilter: flowtable: account for Ethernet header in nf_flow_pppoe_proto()
EricChan (1):
net: stmmac: Fix interrupt handling for level-triggered mode in DWC_XGMAC2
Fengnan Chang (1):
io_uring: make fallocate be hashed work
Filipe Manana (6):
btrfs: remove noinline from btrfs_update_inode()
btrfs: remove redundant root argument from btrfs_update_inode_fallback()
btrfs: remove redundant root argument from fixup_inode_link_count()
btrfs: return a btrfs_inode from btrfs_iget_logging()
btrfs: fix inode lookup error handling during log replay
btrfs: fix assertion when building free space tree
Florian Fainelli (3):
scripts/gdb: fix interrupts display after MCP on x86 scripts/gdb: de-reference per-CPU MCE interrupts scripts/gdb: fix interrupts.py after maple tree conversion
Greg Kroah-Hartman (1):
Linux 6.6.99
Guillaume Nault (1):
gre: Fix IPv6 multicast route creation.
Hans de Goede (1):
Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID
Håkon Bugge (1):
md/md-bitmap: fix GPF in bitmap_get_stats()
JP Kobryn (1):
x86/mce: Make sure CMCI banks are cleared during shutdown on Intel
Jakub Kicinski (1):
netlink: make sure we allow at least one dump skb
Jann Horn (1):
x86/mm: Disable hugetlb page table sharing on 32-bit
Jiayuan Chen (1):
tcp: Correct signedness in skb remaining space calculation
Kaustabh Chakraborty (1):
drm/exynos: exynos7_drm_decon: add vblank check in IRQ handling
Kito Xu (1):
net: appletalk: Fix device refcount leak in atrtr_create()
Kuen-Han Tsai (3):
usb: gadget: u_serial: Fix race condition in TTY wakeup Revert "usb: gadget: u_serial: Add null pointer check in gs_start_io"
usb: dwc3: Abort suspend on soft disconnect failure
Kuniyuki Iwashima (6):
netlink: Fix wraparounds of sk->sk_rmem_alloc.
tipc: Fix use-after-free in tipc_conn_close().
atm: clip: Fix potential null-ptr-deref in to_atmarpd().
atm: clip: Fix memory leak of struct clip_vcc.
atm: clip: Fix infinite recursive call of clip_push().
netlink: Fix rmem check in netlink_broadcast_deliver().
Lee Jones (1):
usb: cdnsp: Replace snprintf() with the safer scnprintf() variant
Leo Yan (1):
perf: build: Setup PKG_CONFIG_LIBDIR for cross compilation
Liam R. Howlett (1):
maple_tree: fix MA_STATE_PREALLOC flag in mas_preallocate()
Linus Torvalds (1):
eventpoll: don't decrement ep refcount while still holding the ep mutex
Long Li (1):
net: mana: Record doorbell physical address in PF mode
Luiz Augusto von Dentz (2):
Bluetooth: hci_sync: Fix not disabling advertising instance
Bluetooth: hci_event: Fix not marking Broadcast Sink BIS as connected
Lukas Wunner (1):
crypto: ecdsa - Harden against integer overflows in DIV_ROUND_UP()
Luo Gengkun (1):
perf/core: Fix the WARN_ON_ONCE is out of lock protected region
Mario Limonciello (1):
pinctrl: amd: Clear GPIO debounce for suspend
Mathy Vanhoef (1):
wifi: prevent A-MSDU attacks in mesh networks
Matthew Brost (1):
drm/sched: Increment job count before swapping tail spsc queue
Michael Jeanson (1):
rseq: Fix segfault on registration when rseq_cs is non-zero
Michal Luczaj (3):
vsock: Fix transport_{g2h,h2g} TOCTOU
vsock: Fix transport_* TOCTOU
vsock: Fix IOCTL_VM_SOCKETS_GET_LOCAL_CID to check also transport_local
Mikhail Paulyshka (1):
x86/rdrand: Disable RDSEED on AMD Cyan Skillfish
Mikko Perttunen (1):
drm/tegra: nvdec: Fix dma_alloc_coherent error check
Mingming Cao (1):
ibmvnic: Fix hardcoded NUM_RX_STATS/NUM_TX_STATS with dynamic sizeof
Namjae Jeon (1):
ksmbd: fix potential use-after-free in oplock/lease break ack
Nicolas Pitre (1):
vt: add missing notification when switching back to text mode
Nigel Croxon (1):
raid10: cleanup memleak at raid10_make_request
Oleksij Rempel (4):
net: phy: smsc: Fix Auto-MDIX configuration when disabled by strap
net: phy: smsc: Force predictable MDI-X state on LAN87xx
net: phy: smsc: Fix link failure in forced mode with Auto-MDIX
net: phy: microchip: limit 100M workaround to link-down events on LAN88xx
Paulo Alcantara (3):
smb: client: avoid unnecessary reconnects when refreshing referrals
smb: client: fix DFS interlink failover
smb: client: fix potential race in cifs_put_tcon()
Pawel Laszczak (2):
usb:cdnsp: remove TRB_FLUSH_ENDPOINT command
usb: cdnsp: Fix issue with CV Bad Descriptor test
Peter Zijlstra (1):
perf: Revert to requiring CAP_SYS_ADMIN for uprobes
Rafael J. Wysocki (1):
Revert "ACPI: battery: negate current when discharging"
Richard Fitzgerald (1):
ASoC: cs35l56: probe() should fail if the device ID is not recognized
Ronnie Sahlberg (1):
ublk: sanity check add_dev input for underflow
Sean Christopherson (1):
KVM: SVM: Reject SEV{-ES} intra host migration if vCPU creation is in-flight
Sean Nyekjaer (1):
can: m_can: m_can_handle_lost_msg(): downgrade msg lost in rx message to debug level
Shengjiu Wang (1):
ASoC: fsl_asrc: use internal measured ratio for non-ideal ratio mode
Shravya KN (1):
bnxt_en: Fix DCB ETS validation
Shyam Prasad N (1):
cifs: all initializations for tcon should happen in tcon_info_alloc
Simona Vetter (1):
drm/gem: Fix race in drm_gem_handle_create_tail()
Somnath Kotur (1):
bnxt_en: Set DMA unmap len correctly for XDP_REDIRECT
Stefan Metzmacher (1):
smb: server: make use of rdma_destroy_qp()
Stefano Garzarella (1):
vsock: fix vsock_proto declaration
Thomas Fourier (1):
atm: idt77252: Add missing `dma_map_error()`
Thomas Zimmermann (2):
drm/gem: Acquire references on GEM handles for framebuffers drm/framebuffer: Acquire internal references on GEM handles
Tiwei Bie (1):
um: vector: Reduce stack usage in vector_eth_configure()
Uwe Kleine-König (1):
pwm: mediatek: Ensure to disable clocks in error path
Victor Nogueira (1):
net/sched: Abort __tc_modify_qdisc if parent class does not exist
Wang Jinchao (1):
md/raid1: Fix stack memory use after return in raid1_reshape
Wei Yang (1):
maple_tree: fix mt_destroy_walk() on root leaf node
Willem de Bruijn (2):
bpf: Adjust free target to avoid global starvation of LRU map selftests/bpf: adapt one more case in test_lru_map to the new target_free
Xiaowei Li (1):
net: usb: qmi_wwan: add SIMCom 8230C composition
Yasmin Fitzgerald (1):
ALSA: hda/realtek - Enable mute LED on HP Pavilion Laptop 15-eg100
Yazen Ghannam (3):
x86/mce/amd: Add default names for MCA banks and blocks x86/mce/amd: Fix threshold limit reset
x86/mce: Don't remove sysfs if thresholding sysfs init fails
Yeoreum Yun (1):
kasan: remove kasan_find_vm_area() to prevent possible deadlock
Yue Haibing (1):
atm: clip: Fix NULL pointer dereference in vcc_sendmsg()
Yuzuru10 (1):
ASoC: amd: yc: add quirk for Acer Nitro ANV15-41 internal mic
Zhang Heng (1):
HID: Add IGNORE quirk for SMARTLINKTECHNOLOGY
Zheng Qixing (1):
nbd: fix uaf in nbd_genl_connect() error path
Greg Kroah-Hartman
maintainerDocumentation/bpf/map_hash.rst +7 -1
@@ -233,10 +233,16 @@ attempts in order to enforce the LRU property which have increasing impacts on other CPUs involved in the following operation attempts: - Attempt to use CPU-local state to batch operations -- Attempt to fetch free nodes from global lists +- Attempt to fetch ``target_free`` free nodes from global lists - Attempt to pull any node from a global list and remove it from the hashmap - Attempt to pull any node from any CPU's list and remove it from the hashmap +The number of nodes to borrow from the global list in a batch, ``target_free``, +depends on the size of the map. Larger batch size reduces lock contention, but +may also exhaust the global structure. The value is computed at map init to +avoid exhaustion, by limiting aggregate reservation by all CPUs to half the map +size. With a minimum of a single element and maximum budget of 128 at a time. + This algorithm is described visually in the following diagram. See the description in commit 3a08c2fd7634 ("bpf: LRU List") for a full explanation of the corresponding operations:
Documentation/bpf/map_lru_hash_update.dot +3 -3
@@ -35,18 +35,18 @@ digraph { fn_bpf_lru_list_pop_free_to_local [shape=rectangle,fillcolor=2, label="Flush local pending, Rotate Global list, move - LOCAL_FREE_TARGET + target_free from global -> local"] // Also corresponds to: // fn__local_list_flush() // fn_bpf_lru_list_rotate() fn___bpf_lru_node_move_to_free[shape=diamond,fillcolor=2, - label="Able to free\nLOCAL_FREE_TARGET\nnodes?"] + label="Able to free\ntarget_free\nnodes?"] fn___bpf_lru_list_shrink_inactive [shape=rectangle,fillcolor=3, label="Shrink inactive list up to remaining - LOCAL_FREE_TARGET + target_free (global LRU -> local)"] fn___bpf_lru_list_shrink [shape=diamond,fillcolor=2, label="> 0 entries in\nlocal free list?"]
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 6 -SUBLEVEL = 98 +SUBLEVEL = 99 EXTRAVERSION = NAME = Pinguïn Aangedreven
arch/um/drivers/vector_kern.c +13 -29
48 lines not on this page · raw message
arch/x86/Kconfig +1 -1
@@ -128,7 +128,7 @@ config X86 select ARCH_WANTS_DYNAMIC_TASK_STRUCT select ARCH_WANTS_NO_INSTR select ARCH_WANT_GENERAL_HUGETLB - select ARCH_WANT_HUGE_PMD_SHARE + select ARCH_WANT_HUGE_PMD_SHARE if X86_64 select ARCH_WANT_LD_ORPHAN_WARN select ARCH_WANT_OPTIMIZE_DAX_VMEMMAP if X86_64 select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP if X86_64
arch/x86/include/asm/msr-index.h +1 -0
@@ -575,6 +575,7 @@#define MSR_AMD64_OSVW_STATUS 0xc0010141#define MSR_AMD_PPIN_CTL 0xc00102f0#define MSR_AMD_PPIN 0xc00102f1 +#define MSR_AMD64_CPUID_FN_7 0xc0011002#define MSR_AMD64_CPUID_FN_1 0xc0011004#define MSR_AMD64_LS_CFG 0xc0011020#define MSR_AMD64_DC_CFG 0xc0011022
arch/x86/kernel/cpu/amd.c +7 -0
@@ -1154,6 +1154,13 @@ static void init_amd_zen2(struct cpuinfo_x86 *c) {fix_erratum_1386 (c);zen2_zenbleed_check (c); + +/* Disable RDSEED on AMD Cyan Skillfish because of an error. */ +if (c->x86_model ==0x47 && c->x86_stepping ==0x0 ) { +clear_cpu_cap (c,X86_FEATURE_RDSEED ); +msr_clear_bit (MSR_AMD64_CPUID_FN_7 ,18 ); +pr_emerg ("RDSEED is not reliable on this platform; disabling.\n" ); + } }static void init_amd_zen3 (struct cpuinfo_x86 *c)
arch/x86/kernel/cpu/mce/amd.c +17 -11
@@ -335,7 +335,6 @@ static void smca_configure(unsigned int bank, unsigned int cpu)struct thresh_restart {struct threshold_block *b; -int reset;int set_lvt_off;int lvt_off;u16 old_limit;
@@ -430,13 +429,13 @@ static void threshold_restart_bank(void *_tr)rdmsr (tr->b->address, lo, hi); -if (tr->b->threshold_limit < (hi &THRESHOLD_MAX )) - tr->reset =1 ;/* limit cannot be lower than err count */ - -if (tr->reset) {/* reset err count and overflow bit */ - hi = - (hi & ~(MASK_ERR_COUNT_HI |MASK_OVERFLOW_HI )) | - (THRESHOLD_MAX - tr->b->threshold_limit); +/* +* Reset error count and overflow bit. +* This is done during init or after handling an interrupt. +*/ +if (hi &MASK_OVERFLOW_HI || tr->set_lvt_off) { + hi &= ~(MASK_ERR_COUNT_HI |MASK_OVERFLOW_HI ); + hi |=THRESHOLD_MAX - tr->b->threshold_limit; }else if (tr->old_limit) {/* change limit w/o reset */ int new_count = (hi &THRESHOLD_MAX ) + (tr->old_limit - tr->b->threshold_limit);
@@ -1049,13 +1048,20 @@ static const char *get_name(unsigned int cpu, unsigned int bank, struct threshol } bank_type =smca_get_bank_type (cpu, bank); -if (bank_type >=N_SMCA_BANK_TYPES ) -return NULL ;if (b && (bank_type ==SMCA_UMC || bank_type ==SMCA_UMC_V2 )) {if (b->block <ARRAY_SIZE (smca_umc_block_names))return smca_umc_block_names[b->block]; -return NULL ; + } + +if (b && b->block) { +snprintf (buf_mcatype,MAX_MCATYPE_NAME_LEN ,"th_block_%u" , b->block); +return buf_mcatype; + } + +if (bank_type >=N_SMCA_BANK_TYPES ) { +snprintf (buf_mcatype,MAX_MCATYPE_NAME_LEN ,"th_bank_%u" , bank); +return buf_mcatype; }if (per_cpu (smca_bank_counts, cpu)[bank_type] ==1 )
arch/x86/kernel/cpu/mce/core.c +1 -7
@@ -2704,15 +2704,9 @@ static int mce_cpu_dead(unsigned int cpu)static int mce_cpu_online (unsigned int cpu) {struct timer_list *t =this_cpu_ptr (&mce_timer); -int ret;mce_device_create (cpu); - - ret =mce_threshold_create_device (cpu); -if (ret) { -mce_device_remove (cpu); -return ret; - } +mce_threshold_create_device (cpu);mce_reenable_cpu ();mce_start_timer (t);return 0 ;
arch/x86/kernel/cpu/mce/intel.c +1 -0
@@ -517,6 +517,7 @@ void mce_intel_feature_init(struct cpuinfo_x86 *c)void mce_intel_feature_clear (struct cpuinfo_x86 *c) {intel_clear_lmce (); +cmci_clear (); }bool intel_filter_mce (struct mce *m)
arch/x86/kvm/svm/sev.c +4 -0
@@ -1782,6 +1782,10 @@ static int sev_check_source_vcpus(struct kvm *dst, struct kvm *src)struct kvm_vcpu *src_vcpu;unsigned long i; +if (src->created_vcpus !=atomic_read (&src->online_vcpus) || + dst->created_vcpus !=atomic_read (&dst->online_vcpus)) +return -EBUSY ; +if (!sev_es_guest (src))return 0 ;
arch/x86/kvm/xen.c +13 -2
@@ -1737,8 +1737,19 @@ int kvm_xen_setup_evtchn(struct kvm *kvm, {struct kvm_vcpu *vcpu; -if (ue->u.xen_evtchn.port >=max_evtchn_port (kvm)) -return -EINVAL ; +/* +* Don't check for the port being within range of max_evtchn_port(). +* Userspace can configure what ever targets it likes; events just won't +* be delivered if/while the target is invalid, just like userspace can +* configure MSIs which target non-existent APICs. +* +* This allow on Live Migration and Live Update, the IRQ routing table +* can be restored *independently* of other things like creating vCPUs, +* without imposing an ordering dependency on userspace. In this +* particular case, the problematic ordering would be with setting the +* Xen 'long mode' flag, which changes max_evtchn_port() to allow 4096 +* instead of 1024 event channels. +*/ /* We only support 2 level event channels for now */ if (ue->u.xen_evtchn.priority !=KVM_IRQ_ROUTING_XEN_EVTCHN_PRIO_2LEVEL )
crypto/ecc.c +1 -1
@@ -69,7 +69,7 @@ EXPORT_SYMBOL(ecc_get_curve);void ecc_digits_from_bytes (const u8 *in,unsigned int nbytes,u64 *out,unsigned int ndigits) { -int diff = ndigits -DIV_ROUND_UP (nbytes,sizeof (u64)); +int diff = ndigits -DIV_ROUND_UP_POW2 (nbytes,sizeof (u64));unsigned int o = nbytes &7 ;__be64 msd =0 ;
drivers/acpi/battery.c +3 -16
@@ -243,23 +243,10 @@ static int acpi_battery_get_property(struct power_supply *psy,break ;case POWER_SUPPLY_PROP_CURRENT_NOW :case POWER_SUPPLY_PROP_POWER_NOW : -if (battery->rate_now ==ACPI_BATTERY_VALUE_UNKNOWN ) { +if (battery->rate_now ==ACPI_BATTERY_VALUE_UNKNOWN ) ret = -ENODEV ; -break ; - } - - val->intval = battery->rate_now *1000 ; -/* -* When discharging, the current should be reported as a -* negative number as per the power supply class interface -* definition. -*/ -if (psp ==POWER_SUPPLY_PROP_CURRENT_NOW && - (battery->state &ACPI_BATTERY_STATE_DISCHARGING ) && -acpi_battery_handle_discharging (battery) - ==POWER_SUPPLY_STATUS_DISCHARGING ) - val->intval = -val->intval; - +else + val->intval = battery->rate_now *1000 ;break ;case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN :case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN :
drivers/atm/idt77252.c +5 -0
@@ -852,6 +852,8 @@ queue_skb(struct idt77252_dev *card, struct vc_map *vc,IDT77252_PRV_PADDR (skb) =dma_map_single (&card->pcidev->dev, skb->data, skb->len,DMA_TO_DEVICE ); +if (dma_mapping_error (&card->pcidev->dev,IDT77252_PRV_PADDR (skb))) +return -ENOMEM ; error = -EINVAL ;
@@ -1857,6 +1859,8 @@ add_rx_skb(struct idt77252_dev *card, int queue, paddr =dma_map_single (&card->pcidev->dev, skb->data,skb_end_pointer (skb) - skb->data,DMA_FROM_DEVICE ); +if (dma_mapping_error (&card->pcidev->dev, paddr)) + goto outpoolrm;IDT77252_PRV_PADDR (skb) = paddr;if (push_rx_skb (card, skb, queue)) {
@@ -1871,6 +1875,7 @@ add_rx_skb(struct idt77252_dev *card, int queue,dma_unmap_single (&card->pcidev->dev,IDT77252_PRV_PADDR (skb),skb_end_pointer (skb) - skb->data,DMA_FROM_DEVICE ); +outpoolrm: handle =IDT77252_PRV_POOL (skb); card->sbpool[POOL_QUEUE (handle)].skb[POOL_INDEX (handle)] =NULL ;
drivers/block/nbd.c +3 -3
@@ -2120,9 +2120,7 @@ static int nbd_genl_connect(struct sk_buff *skb, struct genl_info *info) goto out; } } - ret =nbd_start_device (nbd); -if (ret) - goto out; +if (info->attrs[NBD_ATTR_BACKEND_IDENTIFIER ]) { nbd->backend =nla_strdup (info->attrs[NBD_ATTR_BACKEND_IDENTIFIER ],GFP_KERNEL );
@@ -2138,6 +2136,8 @@ static int nbd_genl_connect(struct sk_buff *skb, struct genl_info *info) goto out; }set_bit (NBD_RT_HAS_BACKEND_FILE , &config->runtime_flags); + + ret =nbd_start_device (nbd); out:mutex_unlock (&nbd->config_lock);if (!ret) {
drivers/block/ublk_drv.c +2 -1
@@ -2323,7 +2323,8 @@ static int ublk_ctrl_add_dev(struct io_uring_cmd *cmd)if (copy_from_user (&info, argp,sizeof (info)))return -EFAULT ; -if (info.queue_depth >UBLK_MAX_QUEUE_DEPTH || info.nr_hw_queues >UBLK_MAX_NR_QUEUES ) +if (info.queue_depth >UBLK_MAX_QUEUE_DEPTH || !info.queue_depth || + info.nr_hw_queues >UBLK_MAX_NR_QUEUES || !info.nr_hw_queues)return -EINVAL ;if (capable (CAP_SYS_ADMIN ))
drivers/char/ipmi/ipmi_msghandler.c +2 -1
@@ -1241,7 +1241,7 @@ int ipmi_create_user(unsigned int if_num, }/* Not found, return an error */ rv = -EINVAL ; - goto out_kfree; + goto out_unlock; found:if (atomic_add_return (1 , &intf->nr_users) > max_users) {
@@ -1283,6 +1283,7 @@ int ipmi_create_user(unsigned int if_num, out_kfree:atomic_dec (&intf->nr_users); +out_unlock:srcu_read_unlock (&ipmi_interfaces_srcu, index);vfree (new_user);return rv;
drivers/gpu/drm/drm_framebuffer.c +29 -2
@@ -844,11 +844,23 @@ void drm_framebuffer_free(struct kref *kref)int drm_framebuffer_init (struct drm_device *dev,struct drm_framebuffer *fb,const struct drm_framebuffer_funcs *funcs) { +unsigned int i;int ret; +bool exists;if (WARN_ON_ONCE (fb->dev != dev || !fb->format))return -EINVAL ; +for (i =0 ; i < fb->format->num_planes; i++) { +if (drm_WARN_ON_ONCE (dev, fb->internal_flags &DRM_FRAMEBUFFER_HAS_HANDLE_REF (i))) + fb->internal_flags &= ~DRM_FRAMEBUFFER_HAS_HANDLE_REF (i); +if (fb->obj[i]) { + exists =drm_gem_object_handle_get_if_exists_unlocked (fb->obj[i]); +if (exists) + fb->internal_flags |=DRM_FRAMEBUFFER_HAS_HANDLE_REF (i); + } + } +INIT_LIST_HEAD (&fb->filp_head); fb->funcs = funcs;
@@ -857,7 +869,7 @@ int drm_framebuffer_init(struct drm_device *dev, struct drm_framebuffer *fb, ret =__drm_mode_object_add (dev, &fb->base,DRM_MODE_OBJECT_FB , false, drm_framebuffer_free);if (ret) - goto out; + goto err;mutex_lock (&dev->mode_config.fb_lock); dev->mode_config.num_fb++;
@@ -865,7 +877,16 @@ int drm_framebuffer_init(struct drm_device *dev, struct drm_framebuffer *fb,mutex_unlock (&dev->mode_config.fb_lock);drm_mode_object_register (dev, &fb->base); -out: + +return 0 ; + +err: +for (i =0 ; i < fb->format->num_planes; i++) { +if (fb->internal_flags &DRM_FRAMEBUFFER_HAS_HANDLE_REF (i)) { +drm_gem_object_handle_put_unlocked (fb->obj[i]); + fb->internal_flags &= ~DRM_FRAMEBUFFER_HAS_HANDLE_REF (i); + } + }return ret; }EXPORT_SYMBOL (drm_framebuffer_init);
@@ -942,6 +963,12 @@ EXPORT_SYMBOL(drm_framebuffer_unregister_private);void drm_framebuffer_cleanup (struct drm_framebuffer *fb) {struct drm_device *dev = fb->dev; +unsigned int i; + +for (i =0 ; i < fb->format->num_planes; i++) { +if (fb->internal_flags &DRM_FRAMEBUFFER_HAS_HANDLE_REF (i)) +drm_gem_object_handle_put_unlocked (fb->obj[i]); + }mutex_lock (&dev->mode_config.fb_lock);list_del (&fb->head);
drivers/gpu/drm/drm_gem.c +64 -10
117 lines not on this page · raw message
drivers/gpu/drm/drm_internal.h +2 -0
@@ -155,6 +155,8 @@ void drm_sysfs_lease_event(struct drm_device *dev);/* drm_gem.c */ int drm_gem_init (struct drm_device *dev); +bool drm_gem_object_handle_get_if_exists_unlocked (struct drm_gem_object *obj); +void drm_gem_object_handle_put_unlocked (struct drm_gem_object *obj);int drm_gem_handle_create_tail (struct drm_file *file_priv,struct drm_gem_object *obj,u32 *handlep);
drivers/gpu/drm/exynos/exynos7_drm_decon.c +4 -0
@@ -601,6 +601,10 @@ static irqreturn_t decon_irq_handler(int irq, void *dev_id)if (!ctx->drm_dev) goto out; +/* check if crtc and vblank have been initialized properly */ +if (!drm_dev_has_vblank (ctx->drm_dev)) + goto out; +if (!ctx->i80_if) {drm_crtc_handle_vblank (&ctx->crtc->base);
drivers/gpu/drm/tegra/nvdec.c +2 -4
@@ -261,10 +261,8 @@ static int nvdec_load_falcon_firmware(struct nvdec *nvdec)if (!client->group) { virt =dma_alloc_coherent (nvdec->dev, size, &iova,GFP_KERNEL ); - - err =dma_mapping_error (nvdec->dev, iova); -if (err <0 ) -return err; +if (!virt) +return -ENOMEM ; }else { virt =tegra_drm_alloc (tegra, size, &iova);if (IS_ERR (virt))
drivers/gpu/drm/ttm/ttm_bo_util.c +7 -6
@@ -254,6 +254,13 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, ret =dma_resv_trylock (&fbo->base.base._resv);WARN_ON (!ret); + ret =dma_resv_reserve_fences (&fbo->base.base._resv,1 ); +if (ret) { +dma_resv_unlock (&fbo->base.base._resv); +kfree (fbo); +return ret; + } +if (fbo->base.resource) {ttm_resource_set_bo (fbo->base.resource, &fbo->base); bo->resource =NULL ;
@@ -262,12 +269,6 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, fbo->base.bulk_move =NULL ; } - ret =dma_resv_reserve_fences (&fbo->base.base._resv,1 ); -if (ret) { -kfree (fbo); -return ret; - } -ttm_bo_get (bo); fbo->bo = bo;
drivers/hid/hid-ids.h +6 -0
@@ -305,6 +305,8 @@#define USB_DEVICE_ID_ASUS_AK1D 0x1125#define USB_DEVICE_ID_CHICONY_TOSHIBA_WT10A 0x1408#define USB_DEVICE_ID_CHICONY_ACER_SWITCH12 0x1421 +#define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA 0xb824 +#define USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2 0xb82c#define USB_VENDOR_ID_CHUNGHWAT 0x2247#define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH 0x0001
@@ -807,6 +809,7 @@#define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067#define USB_DEVICE_ID_LENOVO_X1_COVER 0x6085#define USB_DEVICE_ID_LENOVO_X1_TAB 0x60a3 +#define USB_DEVICE_ID_LENOVO_X1_TAB2 0x60a4#define USB_DEVICE_ID_LENOVO_X1_TAB3 0x60b5#define USB_DEVICE_ID_LENOVO_X12_TAB 0x60fe#define USB_DEVICE_ID_LENOVO_X12_TAB2 0x61ae
@@ -1501,4 +1504,7 @@#define USB_VENDOR_ID_SIGNOTEC 0x2133#define USB_DEVICE_ID_SIGNOTEC_VIEWSONIC_PD1011 0x0018 +#define USB_VENDOR_ID_SMARTLINKTECHNOLOGY 0x4c4a +#define USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155 0x4155 +#endif
drivers/hid/hid-lenovo.c +8 -0
@@ -473,6 +473,7 @@ static int lenovo_input_mapping(struct hid_device *hdev,return lenovo_input_mapping_tp10_ultrabook_kbd (hdev, hi, field, usage, bit, max);case USB_DEVICE_ID_LENOVO_X1_TAB : +case USB_DEVICE_ID_LENOVO_X1_TAB2 :case USB_DEVICE_ID_LENOVO_X1_TAB3 :return lenovo_input_mapping_x1_tab_kbd (hdev, hi, field, usage, bit, max);default :
@@ -587,6 +588,7 @@ static ssize_t attr_fn_lock_store(struct device *dev,break ;case USB_DEVICE_ID_LENOVO_TP10UBKBD :case USB_DEVICE_ID_LENOVO_X1_TAB : +case USB_DEVICE_ID_LENOVO_X1_TAB2 :case USB_DEVICE_ID_LENOVO_X1_TAB3 : ret =lenovo_led_set_tp10ubkbd (hdev,TP10UBKBD_FN_LOCK_LED , value);if (ret)
@@ -782,6 +784,7 @@ static int lenovo_event(struct hid_device *hdev, struct hid_field *field,return lenovo_event_cptkbd (hdev, field, usage, value);case USB_DEVICE_ID_LENOVO_TP10UBKBD :case USB_DEVICE_ID_LENOVO_X1_TAB : +case USB_DEVICE_ID_LENOVO_X1_TAB2 :case USB_DEVICE_ID_LENOVO_X1_TAB3 :return lenovo_event_tp10ubkbd (hdev, field, usage, value);default :
@@ -1065,6 +1068,7 @@ static int lenovo_led_brightness_set(struct led_classdev *led_cdev,break ;case USB_DEVICE_ID_LENOVO_TP10UBKBD :case USB_DEVICE_ID_LENOVO_X1_TAB : +case USB_DEVICE_ID_LENOVO_X1_TAB2 :case USB_DEVICE_ID_LENOVO_X1_TAB3 : ret =lenovo_led_set_tp10ubkbd (hdev, tp10ubkbd_led[led_nr], value);break ;
@@ -1296,6 +1300,7 @@ static int lenovo_probe(struct hid_device *hdev,break ;case USB_DEVICE_ID_LENOVO_TP10UBKBD :case USB_DEVICE_ID_LENOVO_X1_TAB : +case USB_DEVICE_ID_LENOVO_X1_TAB2 :case USB_DEVICE_ID_LENOVO_X1_TAB3 : ret =lenovo_probe_tp10ubkbd (hdev);break ;
@@ -1383,6 +1388,7 @@ static void lenovo_remove(struct hid_device *hdev)break ;case USB_DEVICE_ID_LENOVO_TP10UBKBD :case USB_DEVICE_ID_LENOVO_X1_TAB : +case USB_DEVICE_ID_LENOVO_X1_TAB2 :case USB_DEVICE_ID_LENOVO_X1_TAB3 :lenovo_remove_tp10ubkbd (hdev);break ;
@@ -1433,6 +1439,8 @@ static const struct hid_device_id lenovo_devices[] = {*/ {HID_DEVICE (BUS_USB ,HID_GROUP_GENERIC , USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X1_TAB) }, + { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, + USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X1_TAB2) }, { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X1_TAB3) }, { }
drivers/hid/hid-multitouch.c +7 -1
@@ -2110,12 +2110,18 @@ static const struct hid_device_id mt_devices[] = { HID_DEVICE(BUS_I2C, HID_GROUP_GENERIC, USB_VENDOR_ID_LG, I2C_DEVICE_ID_LG_7010) }, -/* Lenovo X1 TAB Gen 2 */ +/* Lenovo X1 TAB Gen 1 */ { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,HID_DEVICE (BUS_USB ,HID_GROUP_MULTITOUCH_WIN_8 ,USB_VENDOR_ID_LENOVO , USB_DEVICE_ID_LENOVO_X1_TAB) }, + /* Lenovo X1 TAB Gen 2 */ + { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT, +HID_DEVICE (BUS_USB ,HID_GROUP_MULTITOUCH_WIN_8 , +USB_VENDOR_ID_LENOVO , + USB_DEVICE_ID_LENOVO_X1_TAB2) }, + /* Lenovo X1 TAB Gen 3 */ { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT, HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8,
drivers/hid/hid-quirks.c +3 -0
@@ -747,6 +747,8 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) }, { HID_USB_DEVICE(USB_VENDOR_ID_AXENTIA, USB_DEVICE_ID_AXENTIA_FM_RADIO) }, { HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) }, + { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA) }, + { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_HP_5MP_CAMERA2) }, { HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI4713) },
@@ -894,6 +896,7 @@ static const struct hid_device_id hid_ignore_list[] = {#endif { HID_USB_DEVICE(USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K) }, { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_HP_5MP_CAMERA_5473) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SMARTLINKTECHNOLOGY, USB_DEVICE_ID_SMARTLINKTECHNOLOGY_4155) }, { } };
drivers/input/keyboard/atkbd.c +2 -1
@@ -826,7 +826,7 @@ static int atkbd_probe(struct atkbd *atkbd)if (atkbd_skip_getid (atkbd)) { atkbd->id =0xab83 ; -return 0 ; + goto deactivate_kbd; }/*
@@ -863,6 +863,7 @@ static int atkbd_probe(struct atkbd *atkbd)return -1 ; } +deactivate_kbd:/* * Make sure nothing is coming from the keyboard and disturbs our * internal state.
drivers/md/md-bitmap.c +1 -2
@@ -2119,8 +2119,7 @@ int md_bitmap_get_stats(struct bitmap *bitmap, struct md_bitmap_stats *stats)if (!bitmap)return -ENOENT ; -if (!bitmap->mddev->bitmap_info.external && - !bitmap->storage.sb_page) +if (!bitmap->storage.sb_page)return -EINVAL ; sb =kmap_local_page (bitmap->storage.sb_page); stats->sync_size =le64_to_cpu (sb->sync_size);
drivers/md/raid1.c +1 -0
@@ -3297,6 +3297,7 @@ static int raid1_reshape(struct mddev *mddev)/* ok, everything is stopped */ oldpool = conf->r1bio_pool; conf->r1bio_pool = newpool; +init_waitqueue_head (&conf->r1bio_pool.wait);for (d = d2 =0 ; d < conf->raid_disks; d++) {struct md_rdev *rdev = conf->mirrors[d].rdev;
drivers/md/raid10.c +8 -2
@@ -1205,8 +1205,11 @@ static void raid10_read_request(struct mddev *mddev, struct bio *bio,rcu_read_unlock (); } -if (!regular_request_wait (mddev, conf, bio, r10_bio->sectors)) +if (!regular_request_wait (mddev, conf, bio, r10_bio->sectors)) { +raid_end_bio_io (r10_bio);return ; + } + rdev =read_balance (conf, r10_bio, &max_sectors);if (!rdev) {if (err_rdev) {
@@ -1428,8 +1431,11 @@ static void raid10_write_request(struct mddev *mddev, struct bio *bio, } sectors = r10_bio->sectors; -if (!regular_request_wait (mddev, conf, bio, sectors)) +if (!regular_request_wait (mddev, conf, bio, sectors)) { +raid_end_bio_io (r10_bio);return ; + } + if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery) && (mddev->reshape_backwards ? (bio->bi_iter.bi_sector < conf->reshape_safe &&
drivers/net/can/m_can/m_can.c +1 -1
@@ -606,7 +606,7 @@ static int m_can_handle_lost_msg(struct net_device *dev)struct can_frame *frame;u32 timestamp =0 ; -netdev_err (dev,"msg lost in rxf0\n" ); +netdev_dbg (dev,"msg lost in rxf0\n" ); stats->rx_errors++; stats->rx_over_errors++;
drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c +2 -0
@@ -487,7 +487,9 @@ static int bnxt_ets_validate(struct bnxt *bp, struct ieee_ets *ets, u8 *tc)if ((ets->tc_tx_bw[i] || ets->tc_tsa[i]) && i > bp->max_tc)return -EINVAL ; + } +for (i =0 ; i < max_tc; i++) {switch (ets->tc_tsa[i]) {case IEEE_8021QAZ_TSA_STRICT :break ;
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c +1 -1
@@ -115,7 +115,7 @@ static void __bnxt_xmit_xdp_redirect(struct bnxt *bp, tx_buf->action =XDP_REDIRECT ; tx_buf->xdpf = xdpf;dma_unmap_addr_set (tx_buf, mapping, mapping); -dma_unmap_len_set (tx_buf, len,0 ); +dma_unmap_len_set (tx_buf, len, len); }void bnxt_tx_int_xdp (struct bnxt *bp,struct bnxt_napi *bnapi,int budget)
drivers/net/ethernet/ibm/ibmvnic.h +6 -2
@@ -211,7 +211,6 @@ struct ibmvnic_statistics {u8 reserved[72 ]; } __packed__aligned(8) ; -#define NUM_TX_STATS 3struct ibmvnic_tx_queue_stats {u64 batched_packets;u64 direct_packets;
@@ -219,13 +218,18 @@ struct ibmvnic_tx_queue_stats {u64 dropped_packets; }; -#define NUM_RX_STATS 3 +#define NUM_TX_STATS \ + (sizeof(struct ibmvnic_tx_queue_stats) / sizeof(u64)) +struct ibmvnic_rx_queue_stats {u64 packets;u64 bytes;u64 interrupts; }; +#define NUM_RX_STATS \ + (sizeof(struct ibmvnic_rx_queue_stats) / sizeof(u64)) +struct ibmvnic_acl_buffer {__be32 len;__be32 version;
drivers/net/ethernet/microsoft/mana/gdma_main.c +3 -0
@@ -28,6 +28,9 @@ static void mana_gd_init_pf_regs(struct pci_dev *pdev) gc->db_page_base = gc->bar0_va +mana_gd_r64 (gc,GDMA_PF_REG_DB_PAGE_OFF ); + gc->phys_db_page_base = gc->bar0_pa + +mana_gd_r64 (gc,GDMA_PF_REG_DB_PAGE_OFF ); + sriov_base_off =mana_gd_r64 (gc,GDMA_SRIOV_REG_CFG_BASE_OFF ); sriov_base_va = gc->bar0_va + sriov_base_off;
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +11 -13
@@ -364,19 +364,17 @@ static int dwxgmac2_dma_interrupt(struct stmmac_priv *priv, }/* TX/RX NORMAL interrupts */ -if (likely (intr_status &XGMAC_NIS )) { -if (likely (intr_status &XGMAC_RI )) { -u64_stats_update_begin (&stats->syncp); -u64_stats_inc (&stats->rx_normal_irq_n[chan]); -u64_stats_update_end (&stats->syncp); - ret |= handle_rx; - } -if (likely (intr_status & (XGMAC_TI |XGMAC_TBU ))) { -u64_stats_update_begin (&stats->syncp); -u64_stats_inc (&stats->tx_normal_irq_n[chan]); -u64_stats_update_end (&stats->syncp); - ret |= handle_tx; - } +if (likely (intr_status &XGMAC_RI )) { +u64_stats_update_begin (&stats->syncp); +u64_stats_inc (&stats->rx_normal_irq_n[chan]); +u64_stats_update_end (&stats->syncp); + ret |= handle_rx; + } +if (likely (intr_status & (XGMAC_TI |XGMAC_TBU ))) { +u64_stats_update_begin (&stats->syncp); +u64_stats_inc (&stats->tx_normal_irq_n[chan]); +u64_stats_update_end (&stats->syncp); + ret |= handle_tx; }/* Clear interrupts */
drivers/net/ethernet/xilinx/ll_temac_main.c +1 -1
@@ -1309,7 +1309,7 @@ ll_temac_ethtools_set_ringparam(struct net_device *ndev,if (ering->rx_pending >RX_BD_NUM_MAX || ering->rx_mini_pending || ering->rx_jumbo_pending || - ering->rx_pending >TX_BD_NUM_MAX ) + ering->tx_pending >TX_BD_NUM_MAX )return -EINVAL ;if (netif_running (ndev))
drivers/net/phy/microchip.c +1 -1
@@ -310,7 +310,7 @@ static void lan88xx_link_change_notify(struct phy_device *phydev)* As workaround, set to 10 before setting to 100 * at forced 100 F/H mode. */ -if (!phydev->autoneg && phydev->speed ==100 ) { +if (phydev->state ==PHY_NOLINK && !phydev->autoneg && phydev->speed ==100 ) {/* disable phy interrupt */ temp =phy_read (phydev,LAN88XX_INT_MASK ); temp &= ~LAN88XX_INT_MASK_MDINTPIN_EN_ ;
drivers/net/phy/smsc.c +52 -5
89 lines not on this page · raw message
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1432,6 +1432,7 @@ static const struct usb_device_id products[] = { {QMI_QUIRK_SET_DTR(0x22de, 0x9051, 2)}, /* Hucom Wireless HM-211S/K */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ {QMI_QUIRK_SET_DTR(0x1e0e, 0x9001, 5)}, /* SIMCom 7100E, 7230E, 7600E ++ */ + {QMI_QUIRK_SET_DTR(0x1e0e, 0x9071, 3)}, /* SIMCom 8230C ++ */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0121, 4)}, /* Quectel EC21 Mini PCIe */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0191, 4)}, /* Quectel EG91 */ {QMI_QUIRK_SET_DTR(0x2c7c, 0x0195, 4)}, /* Quectel EG95 */
drivers/net/wireless/zydas/zd1211rw/zd_mac.c +5 -1
@@ -583,7 +583,11 @@ void zd_mac_tx_to_dev(struct sk_buff *skb, int error)skb_queue_tail (q, skb);while (skb_queue_len (q) >ZD_MAC_MAX_ACK_WAITERS ) { -zd_mac_tx_status (hw,skb_dequeue (q), + skb =skb_dequeue (q); +if (!skb) +break ; + +zd_mac_tx_status (hw, skb, mac->ack_pending ? mac->ack_signal :0 ,NULL ); mac->ack_pending =0 ;
drivers/pinctrl/pinctrl-amd.c +11 -0
@@ -933,6 +933,17 @@ static int amd_gpio_suspend_hibernate_common(struct device *dev, bool is_suspend pin, is_suspend ? "suspend" : "hibernate"); } +/* +* debounce enabled over suspend has shown issues with a GPIO +* being unable to wake the system, as we're only interested in +* the actual wakeup event, clear it. +*/ +if (gpio_dev->saved_regs[i] & (DB_CNTRl_MASK <<DB_CNTRL_OFF )) { +amd_gpio_set_debounce (gpio_dev, pin,0 ); +pm_pr_dbg ("Clearing debounce for GPIO #%d during %s.\n" , + pin, is_suspend ?"suspend" :"hibernate" ); + } +raw_spin_unlock_irqrestore (&gpio_dev->lock, flags); }
drivers/pinctrl/qcom/pinctrl-msm.c +20 -0
@@ -1031,6 +1031,25 @@ static bool msm_gpio_needs_dual_edge_parent_workaround(struct irq_data *d,test_bit (d->hwirq, pctrl->skip_wake_irqs); } +static void msm_gpio_irq_init_valid_mask (struct gpio_chip *gc, +unsigned long *valid_mask, +unsigned int ngpios) +{ +struct msm_pinctrl *pctrl =gpiochip_get_data (gc); +const struct msm_pingroup *g; +int i; + +bitmap_fill (valid_mask, ngpios); + +for (i =0 ; i < ngpios; i++) { + g = &pctrl->soc->groups[i]; + +if (g->intr_detection_width !=1 && + g->intr_detection_width !=2 ) +clear_bit (i, valid_mask); + } +} +static int msm_gpio_irq_set_type (struct irq_data *d,unsigned int type) {struct gpio_chip *gc =irq_data_get_irq_chip_data (d);
@@ -1392,6 +1411,7 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl) girq->default_type =IRQ_TYPE_NONE ; girq->handler = handle_bad_irq; girq->parents[0 ] = pctrl->irq; + girq->init_valid_mask = msm_gpio_irq_init_valid_mask; ret =gpiochip_add_data (&pctrl->chip, pctrl);if (ret) {
drivers/pwm/pwm-mediatek.c +8 -5
@@ -133,8 +133,10 @@ static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm,return ret; clk_rate =clk_get_rate (pc->clk_pwms[pwm->hwpwm]); -if (!clk_rate) -return -EINVAL ; +if (!clk_rate) { + ret = -EINVAL ; + goto out; + }/* Make sure we use the bus clock and not the 26MHz clock */ if (pc->soc->has_ck_26m_sel)
@@ -153,9 +155,9 @@ static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm, }if (clkdiv >PWM_CLK_DIV_MAX ) { -pwm_mediatek_clk_disable (chip, pwm);dev_err (chip->dev,"period of %d ns not supported\n" , period_ns); -return -EINVAL ; + ret = -EINVAL ; + goto out; }if (pc->soc->pwm45_fixup && pwm->hwpwm >2 ) {
@@ -172,9 +174,10 @@ static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm,pwm_mediatek_writel (pc, pwm->hwpwm, reg_width, cnt_period);pwm_mediatek_writel (pc, pwm->hwpwm, reg_thres, cnt_duty); +out:pwm_mediatek_clk_disable (chip, pwm); -return 0 ; +return ret; }static int pwm_mediatek_enable (struct pwm_chip *chip,struct pwm_device *pwm)
drivers/tty/vt/vt.c +1 -0
@@ -4392,6 +4392,7 @@ void do_unblank_screen(int leaving_gfx)set_palette (vc);set_cursor (vc);vt_event_post (VT_EVENT_UNBLANK , vc->vc_num, vc->vc_num); +notify_update (vc); }EXPORT_SYMBOL (do_unblank_screen);
drivers/usb/cdns3/cdnsp-debug.h +178 -180
441 lines not on this page · raw message
drivers/usb/cdns3/cdnsp-ep0.c +15 -3
@@ -414,6 +414,7 @@ static int cdnsp_ep0_std_request(struct cdnsp_device *pdev,void cdnsp_setup_analyze (struct cdnsp_device *pdev) {struct usb_ctrlrequest *ctrl = &pdev->setup; +struct cdnsp_ep *pep;int ret = -EINVAL ;u16 len;
@@ -427,10 +428,21 @@ void cdnsp_setup_analyze(struct cdnsp_device *pdev) goto out; } + pep = &pdev->eps[0 ]; +/* Restore the ep0 to Stopped/Running state. */ -if (pdev->eps[0 ].ep_state &EP_HALTED ) { -trace_cdnsp_ep0_halted ("Restore to normal state" ); -cdnsp_halt_endpoint (pdev, &pdev->eps[0 ],0 ); +if (pep->ep_state &EP_HALTED ) { +if (GET_EP_CTX_STATE (pep->out_ctx) ==EP_STATE_HALTED ) +cdnsp_halt_endpoint (pdev, pep,0 ); + +/* +* Halt Endpoint Command for SSP2 for ep0 preserve current +* endpoint state and driver has to synchronize the +* software endpoint state with endpoint output context +* state. +*/ + pep->ep_state &= ~EP_HALTED ; + pep->ep_state |=EP_STOPPED ; }/*
drivers/usb/cdns3/cdnsp-gadget.c +1 -5
@@ -1061,10 +1061,8 @@ static int cdnsp_gadget_ep_disable(struct usb_ep *ep) pep->ep_state |=EP_DIS_IN_RROGRESS ;/* Endpoint was unconfigured by Reset Device command. */ -if (!(pep->ep_state &EP_UNCONFIGURED )) { +if (!(pep->ep_state &EP_UNCONFIGURED ))cdnsp_cmd_stop_ep (pdev, pep); -cdnsp_cmd_flush_ep (pdev, pep); - }/* Remove all queued USB requests. */ while (!list_empty (&pep->pending_list)) {
@@ -1461,8 +1459,6 @@ static void cdnsp_stop(struct cdnsp_device *pdev) {u32 temp; -cdnsp_cmd_flush_ep (pdev, &pdev->eps[0 ]); -/* Remove internally queued request for ep0. */ if (!list_empty (&pdev->eps[0 ].pending_list)) {struct cdnsp_request *req;
drivers/usb/cdns3/cdnsp-gadget.h +6 -5
@@ -987,6 +987,12 @@ enum cdnsp_setup_dev {#define STREAM_ID_FOR_TRB (p) ((((p)) << 16) & GENMASK(31, 16))#define SCT_FOR_TRB (p) (((p) << 1) & 0x7) +/* +* Halt Endpoint Command TRB field. +* The ESP bit only exists in the SSP2 controller. +*/ +#define TRB_ESP BIT(9) +/* Link TRB specific fields. */ #define TRB_TC BIT(1)
@@ -1138,8 +1144,6 @@ union cdnsp_trb {#define TRB_HALT_ENDPOINT 54/* Doorbell Overflow Event. */ #define TRB_DRB_OVERFLOW 57 -/* Flush Endpoint Command. */ -#define TRB_FLUSH_ENDPOINT 58#define TRB_TYPE_LINK (x) (((x) & TRB_TYPE_BITMASK) == TRB_TYPE(TRB_LINK))#define TRB_TYPE_LINK_LE32 (x) (((x) & cpu_to_le32(TRB_TYPE_BITMASK)) == \
@@ -1552,8 +1556,6 @@ void cdnsp_queue_configure_endpoint(struct cdnsp_device *pdev,void cdnsp_queue_reset_ep (struct cdnsp_device *pdev,unsigned int ep_index);void cdnsp_queue_halt_endpoint (struct cdnsp_device *pdev,unsigned int ep_index); -void cdnsp_queue_flush_endpoint (struct cdnsp_device *pdev, -unsigned int ep_index);void cdnsp_force_header_wakeup (struct cdnsp_device *pdev,int intf_num);void cdnsp_queue_reset_device (struct cdnsp_device *pdev); void cdnsp_queue_new_dequeue_state(struct cdnsp_device *pdev,
@@ -1587,7 +1589,6 @@ void cdnsp_irq_reset(struct cdnsp_device *pdev);int cdnsp_halt_endpoint (struct cdnsp_device *pdev,struct cdnsp_ep *pep,int value);int cdnsp_cmd_stop_ep (struct cdnsp_device *pdev,struct cdnsp_ep *pep); -int cdnsp_cmd_flush_ep (struct cdnsp_device *pdev,struct cdnsp_ep *pep);void cdnsp_setup_analyze (struct cdnsp_device *pdev);int cdnsp_status_stage (struct cdnsp_device *pdev);int cdnsp_reset_device (struct cdnsp_device *pdev);
drivers/usb/cdns3/cdnsp-ring.c +2 -25
@@ -2159,19 +2159,6 @@ int cdnsp_cmd_stop_ep(struct cdnsp_device *pdev, struct cdnsp_ep *pep)return ret; } -int cdnsp_cmd_flush_ep (struct cdnsp_device *pdev,struct cdnsp_ep *pep) -{ -int ret; - -cdnsp_queue_flush_endpoint (pdev, pep->idx); -cdnsp_ring_cmd_db (pdev); - ret =cdnsp_wait_for_cmd_compl (pdev); - -trace_cdnsp_handle_cmd_flush_ep (pep->out_ctx); - -return ret; -} -/* * The transfer burst count field of the isochronous TRB defines the number of * bursts that are required to move all packets in this TD. Only SuperSpeed
@@ -2498,18 +2485,8 @@ void cdnsp_queue_halt_endpoint(struct cdnsp_device *pdev, unsigned int ep_index) {cdnsp_queue_command (pdev,0 ,0 ,0 ,TRB_TYPE (TRB_HALT_ENDPOINT ) |SLOT_ID_FOR_TRB (pdev->slot_id) | -EP_ID_FOR_TRB (ep_index)); -} - -/* -* Queue a flush endpoint request on the command ring. -*/ -void cdnsp_queue_flush_endpoint (struct cdnsp_device *pdev, -unsigned int ep_index) -{ -cdnsp_queue_command (pdev,0 ,0 ,0 ,TRB_TYPE (TRB_FLUSH_ENDPOINT ) | -SLOT_ID_FOR_TRB (pdev->slot_id) | -EP_ID_FOR_TRB (ep_index)); +EP_ID_FOR_TRB (ep_index) | + (!ep_index ?TRB_ESP :0 )); }void cdnsp_force_header_wakeup (struct cdnsp_device *pdev,int intf_num)
drivers/usb/dwc3/core.c +7 -2
@@ -2128,6 +2128,7 @@ static int dwc3_core_init_for_resume(struct dwc3 *dwc)static int dwc3_suspend_common (struct dwc3 *dwc,pm_message_t msg) {u32 reg; +int ret;if (!pm_runtime_suspended (dwc->dev) && !PMSG_IS_AUTO (msg)) { dwc->susphy_state = (dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)) &
@@ -2146,7 +2147,9 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg)case DWC3_GCTL_PRTCAP_DEVICE :if (pm_runtime_suspended (dwc->dev))break ; -dwc3_gadget_suspend (dwc); + ret =dwc3_gadget_suspend (dwc); +if (ret) +return ret;synchronize_irq (dwc->irq_gadget);dwc3_core_exit (dwc);break ;
@@ -2177,7 +2180,9 @@ static int dwc3_suspend_common(struct dwc3 *dwc, pm_message_t msg)break ;if (dwc->current_otg_role ==DWC3_OTG_ROLE_DEVICE ) { -dwc3_gadget_suspend (dwc); + ret =dwc3_gadget_suspend (dwc); +if (ret) +return ret;synchronize_irq (dwc->irq_gadget); }
drivers/usb/dwc3/gadget.c +9 -13
@@ -4802,26 +4802,22 @@ int dwc3_gadget_suspend(struct dwc3 *dwc)int ret; ret =dwc3_gadget_soft_disconnect (dwc); -if (ret) - goto err; - -spin_lock_irqsave (&dwc->lock, flags); -if (dwc->gadget_driver) -dwc3_disconnect_gadget (dwc); -spin_unlock_irqrestore (&dwc->lock, flags); - -return 0 ; - -err:/* * Attempt to reset the controller's state. Likely no * communication can be established until the host * performs a port reset. */ -if (dwc->softconnect) +if (ret && dwc->softconnect) {dwc3_gadget_soft_connect (dwc); +return -EAGAIN ; + } -return ret; +spin_lock_irqsave (&dwc->lock, flags); +if (dwc->gadget_driver) +dwc3_disconnect_gadget (dwc); +spin_unlock_irqrestore (&dwc->lock, flags); + +return 0 ; }int dwc3_gadget_resume (struct dwc3 *dwc)
drivers/usb/gadget/function/u_serial.c +4 -8
@@ -291,8 +291,8 @@ __acquires(&port->port_lock)break ; } -if (do_tty_wake && port->port.tty) -tty_wakeup (port->port.tty); +if (do_tty_wake) +tty_port_tty_wakeup (&port->port);return status; }
@@ -539,20 +539,16 @@ static int gs_alloc_requests(struct usb_ep *ep, struct list_head *head,static int gs_start_io (struct gs_port *port) {struct list_head *head = &port->read_pool; -struct usb_ep *ep; +struct usb_ep *ep = port->port_usb->out;int status;unsigned started; -if (!port->port_usb || !port->port.tty) -return -EIO ; -/* Allocate RX and TX I/O buffers. We can't easily do this much * earlier (with GFP_KERNEL) because the requests are coupled to * endpoints, as are the packet sizes we'll be using. Different * configurations may use different endpoints with a given port; * and high speed vs full speed changes packet sizes too. */ - ep = port->port_usb->out; status =gs_alloc_requests (ep, head, gs_read_complete, &port->read_allocated);if (status)
@@ -573,7 +569,7 @@ static int gs_start_io(struct gs_port *port)gs_start_tx (port);/* Unblock any pending writes into our circular buffer, in case * we didn't in gs_start_tx() */ -tty_wakeup (port->port.tty); +tty_port_tty_wakeup (&port->port); }else {/* Free reqs only if we are still connected */ if (port->port_usb) {
fs/btrfs/btrfs_inode.h +1 -1
@@ -488,7 +488,7 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode,int btrfs_update_inode (struct btrfs_trans_handle *trans,struct btrfs_root *root,struct btrfs_inode *inode);int btrfs_update_inode_fallback (struct btrfs_trans_handle *trans, -struct btrfs_root *root,struct btrfs_inode *inode); +struct btrfs_inode *inode);int btrfs_orphan_add (struct btrfs_trans_handle *trans,struct btrfs_inode *inode);int btrfs_orphan_cleanup (struct btrfs_root *root);int btrfs_cont_expand (struct btrfs_inode *inode,loff_t oldsize,loff_t size);
fs/btrfs/free-space-tree.c +12 -4
@@ -1104,11 +1104,21 @@ static int populate_free_space_tree(struct btrfs_trans_handle *trans, ret =btrfs_search_slot_for_read (extent_root, &key, path,1 ,0 );if (ret <0 ) goto out_locked; -ASSERT (ret ==0 ); +/* +* If ret is 1 (no key found), it means this is an empty block group, +* without any extents allocated from it and there's no block group +* item (key BTRFS_BLOCK_GROUP_ITEM_KEY) located in the extent tree +* because we are using the block group tree feature, so block group +* items are stored in the block group tree. It also means there are no +* extents allocated for block groups with a start offset beyond this +* block group's end offset (this is the last, highest, block group). +*/ +if (!btrfs_fs_compat_ro (trans->fs_info,BLOCK_GROUP_TREE )) +ASSERT (ret ==0 ); start = block_group->start; end = block_group->start + block_group->length; -while (1 ) { +while (ret ==0 ) {btrfs_item_key_to_cpu (path->nodes[0 ], &key, path->slots[0 ]); if (key.type == BTRFS_EXTENT_ITEM_KEY ||
@@ -1138,8 +1148,6 @@ static int populate_free_space_tree(struct btrfs_trans_handle *trans, ret =btrfs_next_item (extent_root, path);if (ret <0 ) goto out_locked; -if (ret) -break ; }if (start < end) { ret = __add_to_free_space_tree(trans, block_group, path2,
fs/btrfs/inode.c +9 -9
@@ -3077,7 +3077,7 @@ int btrfs_finish_one_ordered(struct btrfs_ordered_extent *ordered_extent) goto out; } trans->block_rsv = &inode->block_rsv; - ret =btrfs_update_inode_fallback (trans, root, inode); + ret =btrfs_update_inode_fallback (trans, inode);if (ret)/* -ENOMEM or corruption */ btrfs_abort_transaction (trans, ret); goto out;
@@ -3143,7 +3143,7 @@ int btrfs_finish_one_ordered(struct btrfs_ordered_extent *ordered_extent) &cached_state);btrfs_inode_safe_disk_i_size_write (inode,0 ); - ret =btrfs_update_inode_fallback (trans, root, inode); + ret =btrfs_update_inode_fallback (trans, inode);if (ret) {/* -ENOMEM or corruption */ btrfs_abort_transaction (trans, ret); goto out;
@@ -4014,9 +4014,9 @@ static noinline int btrfs_update_inode_item(struct btrfs_trans_handle *trans,/* * copy everything in the in-memory inode into the btree. */ -noinline int btrfs_update_inode(struct btrfs_trans_handle *trans, -struct btrfs_root *root, -struct btrfs_inode *inode) +int btrfs_update_inode (struct btrfs_trans_handle *trans, +struct btrfs_root *root, +struct btrfs_inode *inode) {struct btrfs_fs_info *fs_info = root->fs_info;int ret;
@@ -4043,13 +4043,13 @@ noinline int btrfs_update_inode(struct btrfs_trans_handle *trans, }int btrfs_update_inode_fallback (struct btrfs_trans_handle *trans, -struct btrfs_root *root,struct btrfs_inode *inode) +struct btrfs_inode *inode) {int ret; - ret =btrfs_update_inode (trans, root, inode); + ret =btrfs_update_inode (trans, inode->root, inode);if (ret == -ENOSPC ) -return btrfs_update_inode_item (trans, root, inode); +return btrfs_update_inode_item (trans, inode->root, inode);return ret; }
@@ -4327,7 +4327,7 @@ static int btrfs_unlink_subvol(struct btrfs_trans_handle *trans,btrfs_i_size_write (dir, dir->vfs_inode.i_size - fname.disk_name.len *2 );inode_inc_iversion (&dir->vfs_inode); dir->vfs_inode.i_mtime =inode_set_ctime_current (&dir->vfs_inode); - ret =btrfs_update_inode_fallback (trans, root, dir); + ret =btrfs_update_inode_fallback (trans, dir);if (ret)btrfs_abort_transaction (trans, ret); out:
fs/btrfs/transaction.c +1 -1
@@ -1860,7 +1860,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,btrfs_i_size_write (BTRFS_I (parent_inode), parent_inode->i_size + fname.disk_name.len *2 ); parent_inode->i_mtime =inode_set_ctime_current (parent_inode); - ret =btrfs_update_inode_fallback (trans, parent_root,BTRFS_I (parent_inode)); + ret =btrfs_update_inode_fallback (trans,BTRFS_I (parent_inode));if (ret) {btrfs_abort_transaction (trans, ret); goto fail;
fs/btrfs/tree-log.c +197 -134
609 lines not on this page · raw message
fs/erofs/data.c +2 -0
@@ -358,6 +358,8 @@ int erofs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,*/ static int erofs_read_folio (struct file *file,struct folio *folio) { +trace_erofs_read_folio (folio, true); +return iomap_read_folio (folio, &erofs_iomap_ops); }
fs/eventpoll.c +5 -7
@@ -772,7 +772,7 @@ static bool __ep_remove(struct eventpoll *ep, struct epitem *epi, bool force)call_rcu (&epi->rcu, epi_rcu_free);percpu_counter_dec (&ep->user->epoll_watches); -return ep_refcount_dec_and_test (ep); +return true; }/*
@@ -780,14 +780,14 @@ static bool __ep_remove(struct eventpoll *ep, struct epitem *epi, bool force)*/ static void ep_remove_safe (struct eventpoll *ep,struct epitem *epi) { -WARN_ON_ONCE (__ep_remove (ep, epi, false)); +if (__ep_remove (ep, epi, false)) +WARN_ON_ONCE (ep_refcount_dec_and_test (ep)); }static void ep_clear_and_put (struct eventpoll *ep) {struct rb_node *rbp, *next;struct epitem *epi; -bool dispose;/* We need to release all tasks waiting for these file */ if (waitqueue_active (&ep->poll_wait))
@@ -820,10 +820,8 @@ static void ep_clear_and_put(struct eventpoll *ep)cond_resched (); } - dispose =ep_refcount_dec_and_test (ep);mutex_unlock (&ep->mtx); - -if (dispose) +if (ep_refcount_dec_and_test (ep))ep_free (ep); }
@@ -1003,7 +1001,7 @@ void eventpoll_release_file(struct file *file) dispose =__ep_remove (ep, epi, true);mutex_unlock (&ep->mtx); -if (dispose) +if (dispose &&ep_refcount_dec_and_test (ep))ep_free (ep); goto again; }
fs/proc/inode.c +1 -1
@@ -52,7 +52,7 @@ static void proc_evict_inode(struct inode *inode) head = ei->sysctl;if (head) { -RCU_INIT_POINTER (ei->sysctl,NULL ); +WRITE_ONCE (ei->sysctl,NULL );proc_sys_evict_inode (inode, head); } }
fs/proc/proc_sysctl.c +11 -7
@@ -920,17 +920,21 @@ static int proc_sys_compare(const struct dentry *dentry,struct ctl_table_header *head;struct inode *inode; -/* Although proc doesn't have negative dentries, rcu-walk means -* that inode here can be NULL */ -/* AV: can it, indeed? */ - inode =d_inode_rcu (dentry); -if (!inode) -return 1 ;if (name->len != len)return 1 ;if (memcmp (name->name, str, len))return 1 ; - head =rcu_dereference (PROC_I (inode)->sysctl); + +// false positive is fine here - we'll recheck anyway +if (d_in_lookup (dentry)) +return 0 ; + + inode =d_inode_rcu (dentry); +// we just might have run into dentry in the middle of __dentry_kill() +if (!inode) +return 1 ; + + head =READ_ONCE (PROC_I (inode)->sysctl);return !head || !sysctl_is_seen (head); }
fs/proc/task_mmu.c +7 -7
@@ -33,9 +33,9 @@ void task_mem(struct seq_file *m, struct mm_struct *mm)unsigned long text, lib, swap, anon, file, shmem;unsigned long hiwater_vm, total_vm, hiwater_rss, total_rss; - anon =get_mm_counter (mm,MM_ANONPAGES ); - file =get_mm_counter (mm,MM_FILEPAGES ); - shmem =get_mm_counter (mm,MM_SHMEMPAGES ); + anon =get_mm_counter_sum (mm,MM_ANONPAGES ); + file =get_mm_counter_sum (mm,MM_FILEPAGES ); + shmem =get_mm_counter_sum (mm,MM_SHMEMPAGES );/* * Note: to minimize their overhead, mm maintains hiwater_vm and
@@ -56,7 +56,7 @@ void task_mem(struct seq_file *m, struct mm_struct *mm) text =min (text, mm->exec_vm <<PAGE_SHIFT ); lib = (mm->exec_vm <<PAGE_SHIFT ) - text; - swap =get_mm_counter (mm,MM_SWAPENTS ); + swap =get_mm_counter_sum (mm,MM_SWAPENTS );SEQ_PUT_DEC ("VmPeak:\t" , hiwater_vm);SEQ_PUT_DEC (" kB\nVmSize:\t" , total_vm);SEQ_PUT_DEC (" kB\nVmLck:\t" , mm->locked_vm);
@@ -89,12 +89,12 @@ unsigned long task_statm(struct mm_struct *mm, unsigned long *shared, unsigned long *text, unsigned long *data, unsigned long *resident) { - *shared =get_mm_counter (mm,MM_FILEPAGES ) + -get_mm_counter (mm,MM_SHMEMPAGES ); + *shared =get_mm_counter_sum (mm,MM_FILEPAGES ) + +get_mm_counter_sum (mm,MM_SHMEMPAGES ); *text = (PAGE_ALIGN (mm->end_code) - (mm->start_code &PAGE_MASK )) >>PAGE_SHIFT ; *data = mm->data_vm + mm->stack_vm; - *resident = *shared +get_mm_counter (mm,MM_ANONPAGES ); + *resident = *shared +get_mm_counter_sum (mm,MM_ANONPAGES );return mm->total_vm; }
fs/smb/client/cifsglob.h +3 -0
@@ -830,6 +830,7 @@ struct TCP_Server_Info {* format: \\HOST\SHARE[\OPTIONAL PATH] */ char *leaf_fullpath; + bool dfs_conn:1; };static inline bool is_smb1 (struct TCP_Server_Info *server)
@@ -1065,6 +1066,7 @@ struct cifs_ses {struct list_head smb_ses_list;struct list_head rlist;/* reconnect list */ struct list_head tcon_list; +struct list_head dlist;/* dfs list */ struct cifs_tcon *tcon_ipc;spinlock_t ses_lock;/* protect anything here that is not protected */ struct mutex session_mutex;
@@ -1294,6 +1296,7 @@ struct cifs_tcon {/* BB add field for back pointer to sb struct(s)? */ #ifdef CONFIG_CIFS_DFS_UPCALL struct delayed_work dfs_cache_work; +struct list_head dfs_ses_list;#endif struct delayed_work query_interfaces;/* query interfaces workqueue job */ char *origin_fullpath;/* canonical copy of smb3_fs_context::source */
fs/smb/client/cifsproto.h +3 -10
@@ -136,6 +136,7 @@ extern int SendReceiveBlockingLock(const unsigned int xid,struct smb_hdr *out_buf, int *bytes_returned); +void smb2_query_server_interfaces (struct work_struct *work);void cifs_signal_cifsd_for_reconnect (struct TCP_Server_Info *server,bool all_channels);
@@ -737,15 +738,9 @@ static inline int cifs_create_options(struct cifs_sb_info *cifs_sb, int options)int cifs_wait_for_server_reconnect (struct TCP_Server_Info *server,bool retry); -/* Put references of @ses and its children */ static inline void cifs_put_smb_ses (struct cifs_ses *ses) { -struct cifs_ses *next; - -do { - next = ses->dfs_root_ses; -__cifs_put_smb_ses (ses); - }while ((ses = next)); +__cifs_put_smb_ses (ses); }/* Get an active reference of @ses and its children.
@@ -759,9 +754,7 @@ static inline void cifs_put_smb_ses(struct cifs_ses *ses)static inline void cifs_smb_ses_inc_refcount (struct cifs_ses *ses) {lockdep_assert_held (&cifs_tcp_ses_lock); - -for (; ses; ses = ses->dfs_root_ses) - ses->ses_count++; + ses->ses_count++; }static inline bool dfs_src_pathname_equal (const char *s1,const char *s2)
fs/smb/client/connect.c +19 -28
147 lines not on this page · raw message
fs/smb/client/dfs.c +35 -38
169 lines not on this page · raw message
fs/smb/client/dfs.h +28 -14
83 lines not on this page · raw message
fs/smb/client/dfs_cache.c +116 -70
29 lines not on this page · raw message
kernel/rseq.c +48 -12
60 lines not on this page · raw message
net/atm/clip.c +48 -16
64 lines not on this page · raw message
net/bluetooth/hci_sync.c +134 -81
215 lines not on this page · raw message
net/netlink/af_netlink.c +50 -32
82 lines not on this page · raw message
net/vmw_vsock/af_vsock.c +46 -11
57 lines not on this page · raw message
net/wireless/util.c +50 -2
52 lines not on this page · raw message
scripts/gdb/linux/mapletree.py new file +252 -0
252 lines not on this page · raw message
tools/testing/selftests/bpf/test_lru_map.c +53 -52
105 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.