Linux 5.4.21
Greg KH
maintainerI'm announcing the release of the 5.4.21 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-npcm/Kconfig | 2 arch/arm64/boot/dts/arm/fvp-base-revc.dts | 8 - arch/arm64/kernel/process.c | 7 + arch/s390/boot/uv.c | 3 arch/s390/include/asm/timex.h | 2 arch/x86/events/amd/core.c | 1 arch/x86/events/intel/ds.c | 2 arch/x86/kvm/paging_tmpl.h | 2 arch/x86/kvm/vmx/vmx.c | 3 arch/x86/kvm/x86.c | 8 + drivers/acpi/acpica/achware.h | 2 drivers/acpi/acpica/evxfgpe.c | 32 +++++++ drivers/acpi/acpica/hwgpe.c | 71 ++++++++++++++++ drivers/acpi/ec.c | 44 ++++++---- drivers/acpi/sleep.c | 50 ++++++++--- drivers/bus/moxtet.c | 2 drivers/char/ipmi/ipmb_dev_int.c | 2 drivers/edac/edac_mc.c | 12 -- drivers/edac/edac_mc_sysfs.c | 18 ---- drivers/gpio/gpio-xilinx.c | 5 - drivers/gpio/gpiolib-of.c | 4 drivers/gpio/gpiolib.c | 11 ++ drivers/gpu/drm/panfrost/panfrost_drv.c | 1 drivers/gpu/drm/panfrost/panfrost_gem.h | 6 + drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 3 drivers/gpu/drm/panfrost/panfrost_job.c | 7 + drivers/gpu/drm/sun4i/sun4i_drv.c | 1 drivers/gpu/drm/vgem/vgem_drv.c | 9 +- drivers/hwmon/pmbus/ltc2978.c | 4 drivers/infiniband/core/security.c | 24 ++--- drivers/infiniband/core/user_mad.c | 5 - drivers/infiniband/core/uverbs_cmd.c | 15 +-- drivers/infiniband/hw/cxgb4/cm.c | 4 drivers/infiniband/hw/cxgb4/qp.c | 4 drivers/infiniband/hw/hfi1/affinity.c | 2 drivers/infiniband/hw/hfi1/file_ops.c | 52 +++++++----- drivers/infiniband/hw/hfi1/hfi.h | 5 - drivers/infiniband/hw/hfi1/user_exp_rcv.c | 5 - drivers/infiniband/hw/hfi1/user_sdma.c | 17 ++- drivers/infiniband/hw/mlx5/qp.c | 9 +- drivers/infiniband/sw/rdmavt/qp.c | 84 +++++++++++-------- drivers/infiniband/sw/rxe/rxe_comp.c | 8 - drivers/input/mouse/synaptics.c | 4 drivers/mmc/core/host.c | 11 -- drivers/mmc/core/slot-gpio.c | 3 drivers/mmc/host/pxamci.c | 8 - drivers/mmc/host/sdhci-esdhc-imx.c | 3 drivers/nvme/host/core.c | 2 drivers/s390/crypto/pkey_api.c | 2 drivers/spmi/spmi-pmic-arb.c | 4 fs/btrfs/disk-io.c | 1 fs/btrfs/extent_map.c | 11 ++ fs/btrfs/ref-verify.c | 5 + fs/btrfs/super.c | 2 fs/cifs/cifsfs.c | 6 + fs/cifs/smb2ops.c | 35 +++++++- fs/ext4/block_validity.c | 1 fs/ext4/dir.c | 14 +-- fs/ext4/ext4.h | 5 - fs/ext4/inode.c | 12 ++ fs/ext4/mmp.c | 12 +- fs/ext4/namei.c | 7 + fs/ext4/super.c | 55 +++++++----- fs/jbd2/commit.c | 46 +++++----- fs/jbd2/transaction.c | 10 +- fs/nfs/nfs4proc.c | 2 include/acpi/acpixf.h | 1 include/linux/gpio/consumer.h | 7 + include/linux/suspend.h | 2 kernel/power/suspend.c | 9 +- kernel/sched/core.c | 2 net/mac80211/mlme.c | 8 - net/sunrpc/xprtrdma/frwr_ops.c | 13 +-- sound/pci/hda/patch_realtek.c | 4 sound/usb/clock.c | 99 +++++++++++++++-------- sound/usb/clock.h | 4 sound/usb/format.c | 3 sound/usb/mixer.c | 12 ++ sound/usb/quirks.c | 1 tools/perf/util/stat-shadow.c | 6 - 81 files changed, 677 insertions(+), 313 deletions(-)
Alexander Tsoy (1):
ALSA: usb-audio: Add clock validity quirk for Denon MC7000/MCX8000
Andreas Dilger (1):
ext4: don't assume that mmp_nodename/bdevname have NUL
Arvind Sankar (1):
ALSA: usb-audio: Apply sample rate quirk for Audioengine D1
Avihai Horon (1):
RDMA/core: Fix invalid memory access in spec_filter_size
Benjamin Tissoires (1):
Input: synaptics - remove the LEN0049 dmi id from topbuttonpad list
Boris Brezillon (1):
drm/panfrost: Make sure the shrinker does not reclaim referenced BOs
Chengguang Xu (1):
ext4: choose hardlimit when softlimit is larger than hardlimit in ext4_statfs_project()
Christian Borntraeger (1):
s390/uv: Fix handling of length extensions
Chuck Lever (1):
xprtrdma: Fix DMA scatter-gather list mapping imbalance
Colin Ian King (1):
drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write
Daniel Vetter (1):
drm/vgem: Close use-after-free race in vgem_gem_create
David Sterba (2):
btrfs: print message when tree-log replay starts
btrfs: log message when rw remount is attempted with unclean tree-log
Filipe Manana (1):
Btrfs: fix race between using extent maps and merging them
Gaurav Agrawal (1):
Input: synaptics - enable SMBus on ThinkPad L470
Greg Kroah-Hartman (1):
Linux 5.4.21
Harald Freudenberger (1):
s390/pkey: fix missing length of protected key on return
Jan Kara (1):
ext4: fix checksum errors with indexed dirs
Jernej Skrabec (1):
Revert "drm/sun4i: drv: Allow framebuffer modifiers in mode config"
Kaike Wan (2):
IB/hfi1: Acquire lock to release TID entries when user file is closed IB/rdmavt: Reset all QPs when the device is shut down
Kailang Yang (1):
ALSA: hda/realtek - Add more codec supported Headset Button
Kamal Heib (1):
RDMA/hfi1: Fix memory leak in _dev_comp_vect_mappings_create
Kan Liang (1):
perf/x86/intel: Fix inaccurate period in context switch for auto-reload
Kim Phillips (2):
perf/x86/amd: Add missing L2 misses event spec to AMD Family 17h's event map perf stat: Don't report a null stalled cycles per insn metric
Krishnamraju Eraparaju (1):
RDMA/iw_cxgb4: initiate CLOSE when entering TERM
Krzysztof Kozlowski (1):
ARM: npcm: Bring back GPIOLIB support
Leon Romanovsky (1):
RDMA/core: Fix protection fault in get_pkey_idx_qp_list
Lyude Paul (1):
Input: synaptics - switch T470s to RMI4 by default
Marc Zyngier (1):
arm64: dts: fast models: Fix FVP PCI interrupt-map property
Marek Behún (1):
bus: moxtet: fix potential stack buffer overflow
Mark Zhang (1):
IB/mlx5: Return failure when rts2rts_qp_counters_set_id is not supported
Michał Mirosław (2):
gpio: add gpiod_toggle_active_low()
mmc: core: Rework wp-gpio handling
Mike Jones (1):
hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions.
Mike Marciniszyn (1):
IB/hfi1: Close window for pq and request coliding
Nathan Chancellor (1):
s390/time: Fix clk type in get_tod_clock
Olga Kornievskaia (1):
NFSv4.1 make cachethis=no for writes
Oliver Upton (1):
KVM: x86: Mask off reserved bit from #DB exception payload
Paul Thomas (1):
gpio: xilinx: Fix bug where the wrong GPIO register is written to
Petr Pavlu (1):
cifs: fix mount option display for sec=krb5i
Qais Yousef (1):
sched/uclamp: Reject negative values in cpu_uclamp_write()
Rafael J. Wysocki (4):
ACPI: EC: Fix flushing of pending work
ACPI: PM: s2idle: Avoid possible race related to the EC GPE
ACPICA: Introduce acpi_any_gpe_status_set()
ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system
Robert Richter (2):
EDAC/sysfs: Remove csrow objects on errors
EDAC/mc: Fix use-after-free and memleaks during device removal
Ronnie Sahlberg (1):
cifs: make sure we do not overflow the max EA buffer size
Sara Sharon (1):
mac80211: fix quiet mode activation in action frames
Saurav Girepunje (1):
ALSA: usb-audio: sound: usb: usb true/false for bool return type
Sean Christopherson (2):
KVM: nVMX: Use correct root level for nested EPT shadow page tables
KVM: x86/mmu: Fix struct guest_walker arrays for 5-level paging
Shijie Luo (1):
ext4: add cond_resched() to ext4_protect_reserved_inode
Stephen Boyd (1):
spmi: pmic-arb: Set lockdep class for hierarchical irq domains
Takashi Iwai (2):
ALSA: usb-audio: Fix UAC2/3 effect unit parsing
ALSA: hda/realtek - Fix silent output on MSI-GL73
Theodore Ts'o (2):
ext4: fix support for inode sizes > 1024 bytes
ext4: improve explanation of a mount failure caused by a misconfigured kernel
Wenwen Wang (1):
btrfs: ref-verify: fix memory leaks
Will Deacon (1):
arm64: ssbs: Fix context-switch when SSBS is present on all CPUs
Yi Zhang (1):
nvme: fix the parameter order for nvme_get_log in nvme_get_fw_slot_info
Yonatan Cohen (1):
IB/umad: Fix kernel crash while unloading ib_umad
Zhu Yanjun (1):
RDMA/rxe: Fix soft lockup problem due to using tasklets in softirq
zhangyi (F) (2):
jbd2: move the clearing of b_modified flag to the journal_unmap_buffer()
jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 20 +SUBLEVEL = 21 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm/mach-npcm/Kconfig +1 -1
@@ -11,7 +11,7 @@ config ARCH_NPCM7XX depends on ARCH_MULTI_V7 select PINCTRL_NPCM7XX select NPCM7XX_TIMER - select ARCH_REQUIRE_GPIOLIB + select GPIOLIB select CACHE_L2X0 select ARM_GIC select HAVE_ARM_TWD if SMP
arch/arm64/boot/dts/arm/fvp-base-revc.dts +4 -4
@@ -161,10 +161,10 @@ bus-range = <0x0 0x1>; reg = <0x0 0x40000000 0x0 0x10000000>; ranges = <0x2000000 0x0 0x50000000 0x0 0x50000000 0x0 0x10000000>; - interrupt-map = <0 0 0 1 &gic GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>, - <0 0 0 2 &gic GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>, - <0 0 0 3 &gic GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>, - <0 0 0 4 &gic GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>; + interrupt-map = <0 0 0 1 &gic 0 0 GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 2 &gic 0 0 GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 3 &gic 0 0 GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 4 &gic 0 0 GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>; interrupt-map-mask = <0x0 0x0 0x0 0x7>; msi-map = <0x0 &its 0x0 0x10000>; iommu-map = <0x0 &smmu 0x0 0x10000>;
arch/arm64/kernel/process.c +7 -0
@@ -466,6 +466,13 @@ static void ssbs_thread_switch(struct task_struct *next)if (unlikely (next->flags &PF_KTHREAD ))return ; +/* +* If all CPUs implement the SSBS extension, then we just need to +* context-switch the PSTATE field. +*/ +if (cpu_have_feature (cpu_feature (SSBS ))) +return ; +/* If the mitigation is enabled, then we leave SSBS clear. */ if ((arm64_get_ssbd_state () ==ARM64_SSBD_FORCE_ENABLE ) ||test_tsk_thread_flag (next,TIF_SSBD ))
arch/s390/boot/uv.c +2 -1
@@ -15,7 +15,8 @@ void uv_query_info(void)if (!test_facility (158 ))return ; -if (uv_call (0 , (uint64_t )&uvcb)) +/* rc==0x100 means that there is additional data we do not process */ +if (uv_call (0 , (uint64_t )&uvcb) && uvcb.header.rc !=0x100 )return ; if (test_bit_inv(BIT_UVC_CMD_SET_SHARED_ACCESS, (unsigned long *)uvcb.inst_calls_list) &&
arch/s390/include/asm/timex.h +1 -1
@@ -155,7 +155,7 @@ static inline void get_tod_clock_ext(char *clk)static inline unsigned long long get_tod_clock (void ) { -unsigned char clk[STORE_CLOCK_EXT_SIZE ]; +char clk[STORE_CLOCK_EXT_SIZE ];get_tod_clock_ext (clk);return *((unsigned long long *)&clk[1 ]);
arch/x86/events/amd/core.c +1 -0
@@ -246,6 +246,7 @@ static const u64 amd_f17h_perfmon_event_map[PERF_COUNT_HW_MAX] = [PERF_COUNT_HW_CPU_CYCLES] = 0x0076, [PERF_COUNT_HW_INSTRUCTIONS] = 0x00c0, [PERF_COUNT_HW_CACHE_REFERENCES] = 0xff60, + [PERF_COUNT_HW_CACHE_MISSES] = 0x0964, [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = 0x00c2, [PERF_COUNT_HW_BRANCH_MISSES] = 0x00c3, [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = 0x0287,
arch/x86/events/intel/ds.c +2 -0
@@ -1713,6 +1713,8 @@ intel_pmu_save_and_restart_reload(struct perf_event *event, int count) old = ((s64)(prev_raw_count << shift) >> shift);local64_add (new - old + count * period, &event->count); +local64_set (&hwc->period_left, -new); +perf_event_update_userpage (event);return 0 ;
arch/x86/kvm/paging_tmpl.h +1 -1
@@ -33,7 +33,7 @@#define PT_GUEST_ACCESSED_SHIFT PT_ACCESSED_SHIFT#define PT_HAVE_ACCESSED_DIRTY (mmu) true#ifdef CONFIG_X86_64 -#define PT_MAX_FULL_LEVELS 4 +#define PT_MAX_FULL_LEVELS PT64_ROOT_MAX_LEVEL#define CMPXCHG cmpxchg#else #define CMPXCHG cmpxchg64
arch/x86/kvm/vmx/vmx.c +3 -0
@@ -2975,6 +2975,9 @@ void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)static int get_ept_level (struct kvm_vcpu *vcpu) { +/* Nested EPT currently only supports 4-level walks. */ +if (is_guest_mode (vcpu) &&nested_cpu_has_ept (get_vmcs12 (vcpu))) +return 4 ;if (cpu_has_vmx_ept_5levels () && (cpuid_maxphyaddr (vcpu) >48 ))return 5 ;return 4 ;
arch/x86/kvm/x86.c +8 -0
@@ -445,6 +445,14 @@ void kvm_deliver_exception_payload(struct kvm_vcpu *vcpu)* for #DB exceptions under VMX. */ vcpu->arch.dr6 ^= payload &DR6_RTM ; + +/* +* The #DB payload is defined as compatible with the 'pending +* debug exceptions' field under VMX, not DR6. While bit 12 is +* defined in the 'pending debug exceptions' field (enabled +* breakpoint), it is reserved and must be zero in DR6. +*/ + vcpu->arch.dr6 &= ~BIT (12 );break ;case PF_VECTOR : vcpu->arch.cr2 = payload;
drivers/acpi/acpica/achware.h +2 -0
@@ -101,6 +101,8 @@ acpi_status acpi_hw_enable_all_runtime_gpes(void);acpi_status acpi_hw_enable_all_wakeup_gpes (void ); +u8 acpi_hw_check_all_gpes (void ); + acpi_status acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, struct acpi_gpe_block_info *gpe_block,
drivers/acpi/acpica/evxfgpe.c +32 -0
@@ -795,6 +795,38 @@ acpi_status acpi_enable_all_wakeup_gpes(void)ACPI_EXPORT_SYMBOL (acpi_enable_all_wakeup_gpes) +/****************************************************************************** +* +* FUNCTION: acpi_any_gpe_status_set +* +* PARAMETERS: None +* +* RETURN: Whether or not the status bit is set for any GPE +* +* DESCRIPTION: Check the status bits of all enabled GPEs and return TRUE if any +* of them is set or FALSE otherwise. +* +******************************************************************************/ +u32 acpi_any_gpe_status_set(void) +{ +acpi_status status; +u8 ret; + +ACPI_FUNCTION_TRACE (acpi_any_gpe_status_set); + + status =acpi_ut_acquire_mutex (ACPI_MTX_EVENTS ); +if (ACPI_FAILURE (status)) { +return (FALSE); + } + + ret =acpi_hw_check_all_gpes (); + (void )acpi_ut_release_mutex (ACPI_MTX_EVENTS ); + +return (ret); +} + +ACPI_EXPORT_SYMBOL (acpi_any_gpe_status_set) +/******************************************************************************* * * FUNCTION: acpi_install_gpe_block
drivers/acpi/acpica/hwgpe.c +71 -0
81 lines not on this page · raw message
drivers/acpi/ec.c +26 -18
93 lines not on this page · raw message
drivers/acpi/sleep.c +37 -13
66 lines not on this page · raw message
drivers/bus/moxtet.c +1 -1
@@ -466,7 +466,7 @@ static ssize_t input_read(struct file *file, char __user *buf, size_t len, {struct moxtet *moxtet = file->private_data;u8 bin[TURRIS_MOX_MAX_MODULES ]; -u8 hex[sizeof (buf) *2 +1 ]; +u8 hex[sizeof (bin) *2 +1 ];int ret, n; ret =moxtet_spi_read (moxtet, bin);
drivers/char/ipmi/ipmb_dev_int.c +1 -1
@@ -265,7 +265,7 @@ static int ipmb_slave_cb(struct i2c_client *client,break ;case I2C_SLAVE_WRITE_RECEIVED : -if (ipmb_dev->msg_idx >=sizeof (struct ipmb_msg )) +if (ipmb_dev->msg_idx >=sizeof (struct ipmb_msg ) -1 )break ; buf[++ipmb_dev->msg_idx] = *val;
drivers/edac/edac_mc.c +3 -9
@@ -503,16 +503,10 @@ void edac_mc_free(struct mem_ctl_info *mci) {edac_dbg (1 ,"\n" ); -/* If we're not yet registered with sysfs free only what was allocated -* in edac_mc_alloc(). -*/ -if (!device_is_registered (&mci->dev)) { -_edac_mc_free (mci); -return ; - } +if (device_is_registered (&mci->dev)) +edac_unregister_sysfs (mci); -/* the mci instance is freed here, when the sysfs object is dropped */ -edac_unregister_sysfs (mci); +_edac_mc_free (mci); }EXPORT_SYMBOL_GPL (edac_mc_free);
drivers/edac/edac_mc_sysfs.c +4 -14
@@ -276,10 +276,7 @@ static const struct attribute_group *csrow_attr_groups[] = {static void csrow_attr_release (struct device *dev) { - struct csrow_info *csrow = container_of(dev, struct csrow_info, dev); - -edac_dbg (1 ,"device %s released\n" ,dev_name (dev)); -kfree (csrow); +/* release device with _edac_mc_free() */ }static const struct device_type csrow_attr_type = {
@@ -447,8 +444,7 @@ static int edac_create_csrow_objects(struct mem_ctl_info *mci) csrow = mci->csrows[i];if (!nr_pages_per_csrow (csrow))continue ; - -device_del (&mci->csrows[i]->dev); +device_unregister (&mci->csrows[i]->dev); }return err;
@@ -620,10 +616,7 @@ static const struct attribute_group *dimm_attr_groups[] = {static void dimm_attr_release (struct device *dev) { - struct dimm_info *dimm = container_of(dev, struct dimm_info, dev); - -edac_dbg (1 ,"device %s released\n" ,dev_name (dev)); -kfree (dimm); +/* release device with _edac_mc_free() */ }static const struct device_type dimm_attr_type = {
@@ -906,10 +899,7 @@ static const struct attribute_group *mci_attr_groups[] = {static void mci_attr_release (struct device *dev) { - struct mem_ctl_info *mci = container_of(dev, struct mem_ctl_info, dev); - -edac_dbg (1 ,"device %s released\n" ,dev_name (dev)); -kfree (mci); +/* release device with _edac_mc_free() */ }static const struct device_type mci_attr_type = {
drivers/gpio/gpio-xilinx.c +3 -2
@@ -147,9 +147,10 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,for (i =0 ; i < gc->ngpio; i++) {if (*mask ==0 )break ; +/* Once finished with an index write it out to the register */ if (index !=xgpio_index (chip, i)) {xgpio_writereg (chip->regs +XGPIO_DATA_OFFSET + -xgpio_regoffset (chip, i), + index *XGPIO_CHANNEL_OFFSET , chip->gpio_state[index]);spin_unlock_irqrestore (&chip->gpio_lock[index], flags); index =xgpio_index (chip, i);
@@ -165,7 +166,7 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask, }xgpio_writereg (chip->regs +XGPIO_DATA_OFFSET + -xgpio_regoffset (chip, i), chip->gpio_state[index]); + index *XGPIO_CHANNEL_OFFSET , chip->gpio_state[index]);spin_unlock_irqrestore (&chip->gpio_lock[index], flags); }
drivers/gpio/gpiolib-of.c +0 -4
@@ -146,10 +146,6 @@ static void of_gpio_flags_quirks(struct device_node *np,if (of_property_read_bool (np,"cd-inverted" )) *flags ^=OF_GPIO_ACTIVE_LOW ; } -if (!strcmp (propname,"wp-gpios" )) { -if (of_property_read_bool (np,"wp-inverted" )) - *flags ^=OF_GPIO_ACTIVE_LOW ; - } }/* * Some GPIO fixed regulator quirks.
drivers/gpio/gpiolib.c +11 -0
@@ -3220,6 +3220,17 @@ int gpiod_is_active_low(const struct gpio_desc *desc) }EXPORT_SYMBOL_GPL (gpiod_is_active_low); +/** +* gpiod_toggle_active_low - toggle whether a GPIO is active-low or not +* @desc: the gpio descriptor to change +*/ +void gpiod_toggle_active_low (struct gpio_desc *desc) +{ +VALIDATE_DESC_VOID (desc); +change_bit (FLAG_ACTIVE_LOW , &desc->flags); +} +EXPORT_SYMBOL_GPL (gpiod_toggle_active_low); +/* I/O calls are only valid after configuration completed; the relevant * "is this a valid GPIO" error checks should already have been done. *
drivers/gpu/drm/panfrost/panfrost_drv.c +1 -0
@@ -166,6 +166,7 @@ panfrost_lookup_bos(struct drm_device *dev,break ; } +atomic_inc (&bo->gpu_usecount); job->mappings[i] = mapping; }
drivers/gpu/drm/panfrost/panfrost_gem.h +6 -0
@@ -30,6 +30,12 @@ struct panfrost_gem_object {struct mutex lock; } mappings; +/* +* Count the number of jobs referencing this BO so we don't let the +* shrinker reclaim this object prematurely. +*/ +atomic_t gpu_usecount; + bool noexec :1; bool is_heap :1; };
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c +3 -0
@@ -41,6 +41,9 @@ static bool panfrost_gem_purge(struct drm_gem_object *obj)struct drm_gem_shmem_object *shmem =to_drm_gem_shmem_obj (obj);struct panfrost_gem_object *bo =to_panfrost_bo (obj); +if (atomic_read (&bo->gpu_usecount)) +return false; +if (!mutex_trylock (&shmem->pages_lock))return false;
drivers/gpu/drm/panfrost/panfrost_job.c +6 -1
@@ -270,8 +270,13 @@ static void panfrost_job_cleanup(struct kref *ref)dma_fence_put (job->render_done_fence);if (job->mappings) { -for (i =0 ; i < job->bo_count; i++) +for (i =0 ; i < job->bo_count; i++) { +if (!job->mappings[i]) +break ; + +atomic_dec (&job->mappings[i]->obj->gpu_usecount);panfrost_gem_mapping_put (job->mappings[i]); + }kvfree (job->mappings); }
drivers/gpu/drm/sun4i/sun4i_drv.c +0 -1
@@ -85,7 +85,6 @@ static int sun4i_drv_bind(struct device *dev) }drm_mode_config_init (drm); - drm->mode_config.allow_fb_modifiers = true; ret =component_bind_all (drm->dev, drm);if (ret) {
drivers/gpu/drm/vgem/vgem_drv.c +6 -3
@@ -196,9 +196,10 @@ static struct drm_gem_object *vgem_gem_create(struct drm_device *dev,return ERR_CAST (obj); ret =drm_gem_handle_create (file, &obj->base, handle); -drm_gem_object_put_unlocked (&obj->base); -if (ret) +if (ret) { +drm_gem_object_put_unlocked (&obj->base);return ERR_PTR (ret); + }return &obj->base; }
@@ -221,7 +222,9 @@ static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev, args->size = gem_object->size; args->pitch = pitch; -DRM_DEBUG ("Created object of size %lld\n" , size); +drm_gem_object_put_unlocked (gem_object); + +DRM_DEBUG ("Created object of size %llu\n" , args->size);return 0 ; }
drivers/hwmon/pmbus/ltc2978.c +2 -2
@@ -82,8 +82,8 @@ enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882,#define LTC_POLL_TIMEOUT 100/* in milli-seconds */ -#define LTC_NOT_BUSY BIT(5) -#define LTC_NOT_PENDING BIT(4) +#define LTC_NOT_BUSY BIT(6) +#define LTC_NOT_PENDING BIT(5)/* * LTC2978 clears peak data whenever the CLEAR_FAULTS command is executed, which
drivers/infiniband/core/security.c +9 -15
@@ -339,22 +339,16 @@ static struct ib_ports_pkeys *get_new_pps(const struct ib_qp *qp,if (!new_pps)return NULL ; -if (qp_attr_mask & (IB_QP_PKEY_INDEX |IB_QP_PORT )) { -if (!qp_pps) { - new_pps->main.port_num = qp_attr->port_num; - new_pps->main.pkey_index = qp_attr->pkey_index; - }else { - new_pps->main.port_num = (qp_attr_mask &IB_QP_PORT ) ? - qp_attr->port_num : - qp_pps->main.port_num; - - new_pps->main.pkey_index = - (qp_attr_mask &IB_QP_PKEY_INDEX ) ? - qp_attr->pkey_index : - qp_pps->main.pkey_index; - } +if (qp_attr_mask &IB_QP_PORT ) + new_pps->main.port_num = + (qp_pps) ? qp_pps->main.port_num : qp_attr->port_num; +if (qp_attr_mask &IB_QP_PKEY_INDEX ) + new_pps->main.pkey_index = (qp_pps) ? qp_pps->main.pkey_index : + qp_attr->pkey_index; +if ((qp_attr_mask &IB_QP_PKEY_INDEX ) && (qp_attr_mask &IB_QP_PORT )) new_pps->main.state =IB_PORT_PKEY_VALID ; - }else if (qp_pps) { + +if (!(qp_attr_mask & (IB_QP_PKEY_INDEX ||IB_QP_PORT )) && qp_pps) { new_pps->main.port_num = qp_pps->main.port_num; new_pps->main.pkey_index = qp_pps->main.pkey_index;if (qp_pps->main.state !=IB_PORT_PKEY_NOT_VALID )
drivers/infiniband/core/user_mad.c +3 -2
@@ -1312,6 +1312,9 @@ static void ib_umad_kill_port(struct ib_umad_port *port)struct ib_umad_file *file;int id; +cdev_device_del (&port->sm_cdev, &port->sm_dev); +cdev_device_del (&port->cdev, &port->dev); +mutex_lock (&port->file_mutex);/* Mark ib_dev NULL and block ioctl or other file ops to progress
@@ -1331,8 +1334,6 @@ static void ib_umad_kill_port(struct ib_umad_port *port)mutex_unlock (&port->file_mutex); -cdev_device_del (&port->sm_cdev, &port->sm_dev); -cdev_device_del (&port->cdev, &port->dev);ida_free (&umad_ida, port->dev_num);/* balances device_initialize() */
drivers/infiniband/core/uverbs_cmd.c +7 -8
@@ -2718,12 +2718,6 @@ static int kern_spec_to_ib_spec_action(struct uverbs_attr_bundle *attrs,return 0 ; } -static size_t kern_spec_filter_sz (const struct ib_uverbs_flow_spec_hdr *spec) -{ -/* Returns user space filter size, includes padding */ -return (spec->size -sizeof (struct ib_uverbs_flow_spec_hdr )) /2 ; -} -static ssize_t spec_filter_size (const void *kern_spec_filter,u16 kern_filter_size,u16 ib_real_filter_sz) {
@@ -2867,11 +2861,16 @@ int ib_uverbs_kern_spec_to_ib_spec_filter(enum ib_flow_spec_type type,static int kern_spec_to_ib_spec_filter (struct ib_uverbs_flow_spec *kern_spec,union ib_flow_spec *ib_spec) { -ssize_t kern_filter_sz; +size_t kern_filter_sz;void *kern_spec_mask;void *kern_spec_val; - kern_filter_sz =kern_spec_filter_sz (&kern_spec->hdr); +if (check_sub_overflow ((size_t )kern_spec->hdr.size, +sizeof (struct ib_uverbs_flow_spec_hdr ), + &kern_filter_sz)) +return -EINVAL ; + + kern_filter_sz /=2 ; kern_spec_val = (void *)kern_spec +sizeof (struct ib_uverbs_flow_spec_hdr );
drivers/infiniband/hw/cxgb4/cm.c +4 -0
@@ -3036,6 +3036,10 @@ static int terminate(struct c4iw_dev *dev, struct sk_buff *skb) C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); } +/* As per draft-hilland-iwarp-verbs-v1.0, sec 6.2.3, +* when entering the TERM state the RNIC MUST initiate a CLOSE. +*/ +c4iw_ep_disconnect (ep,1 ,GFP_KERNEL );c4iw_put_ep (&ep->com); }else pr_warn ("TERM received tid %u no ep/qp\n" , tid);
drivers/infiniband/hw/cxgb4/qp.c +2 -2
@@ -1948,10 +1948,10 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, qhp->attr.layer_etype = attrs->layer_etype; qhp->attr.ecode = attrs->ecode; ep = qhp->ep; -c4iw_get_ep (&ep->com); - disconnect =1 ;if (!internal) { +c4iw_get_ep (&ep->com); terminate =1 ; + disconnect =1 ; }else { terminate = qhp->attr.send_term; ret =rdma_fini (rhp, qhp, ep);
drivers/infiniband/hw/hfi1/affinity.c +2 -0
@@ -479,6 +479,8 @@ static int _dev_comp_vect_mappings_create(struct hfi1_devdata *dd, rvt_get_ibdev_name(&(dd)->verbs_dev.rdi), i, cpu); } +free_cpumask_var (available_cpus); +free_cpumask_var (non_intr_cpus);return 0 ; fail:
drivers/infiniband/hw/hfi1/file_ops.c +32 -20
88 lines not on this page · raw message
drivers/infiniband/hw/hfi1/hfi.h +4 -1
@@ -1436,10 +1436,13 @@ struct mmu_rb_handler;/* Private data for file operations */ struct hfi1_filedata { +struct srcu_struct pq_srcu;struct hfi1_devdata *dd;struct hfi1_ctxtdata *uctxt;struct hfi1_user_sdma_comp_q *cq; -struct hfi1_user_sdma_pkt_q *pq; +/* update side lock for SRCU */ +spinlock_t pq_rcu_lock; +struct hfi1_user_sdma_pkt_q __rcu *pq;u16 subctxt;/* for cpu affinity; -1 if none */ int rec_cpu_num;
drivers/infiniband/hw/hfi1/user_exp_rcv.c +2 -3
@@ -90,9 +90,6 @@ int hfi1_user_exp_rcv_init(struct hfi1_filedata *fd,struct hfi1_devdata *dd = uctxt->dd;int ret =0 ; -spin_lock_init (&fd->tid_lock); -spin_lock_init (&fd->invalid_lock); - fd->entry_to_rb =kcalloc (uctxt->expected_count,sizeof (struct rb_node *),GFP_KERNEL );
@@ -165,10 +162,12 @@ void hfi1_user_exp_rcv_free(struct hfi1_filedata *fd)if (fd->handler) {hfi1_mmu_rb_unregister (fd->handler); }else { +mutex_lock (&uctxt->exp_mutex);if (!EXP_TID_SET_EMPTY (uctxt->tid_full_list))unlock_exp_tids (uctxt, &uctxt->tid_full_list, fd);if (!EXP_TID_SET_EMPTY (uctxt->tid_used_list))unlock_exp_tids (uctxt, &uctxt->tid_used_list, fd); +mutex_unlock (&uctxt->exp_mutex); }kfree (fd->invalid_tids);
drivers/infiniband/hw/hfi1/user_sdma.c +12 -5
@@ -179,7 +179,6 @@ int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt, pq =kzalloc (sizeof (*pq),GFP_KERNEL );if (!pq)return -ENOMEM ; - pq->dd = dd; pq->ctxt = uctxt->ctxt; pq->subctxt = fd->subctxt;
@@ -236,7 +235,7 @@ int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt, goto pq_mmu_fail; } - fd->pq = pq; +rcu_assign_pointer (fd->pq, pq); fd->cq = cq;return 0 ;
@@ -264,8 +263,14 @@ int hfi1_user_sdma_free_queues(struct hfi1_filedata *fd,trace_hfi1_sdma_user_free_queues (uctxt->dd, uctxt->ctxt, fd->subctxt); - pq = fd->pq; +spin_lock (&fd->pq_rcu_lock); + pq =srcu_dereference_check (fd->pq, &fd->pq_srcu, +lockdep_is_held (&fd->pq_rcu_lock));if (pq) { +rcu_assign_pointer (fd->pq,NULL ); +spin_unlock (&fd->pq_rcu_lock); +synchronize_srcu (&fd->pq_srcu); +/* at this point there can be no more new requests */ if (pq->handler)hfi1_mmu_rb_unregister (pq->handler);iowait_sdma_drain (&pq->busy);
@@ -277,7 +282,8 @@ int hfi1_user_sdma_free_queues(struct hfi1_filedata *fd,kfree (pq->req_in_use);kmem_cache_destroy (pq->txreq_cache);kfree (pq); - fd->pq =NULL ; + }else { +spin_unlock (&fd->pq_rcu_lock); }if (fd->cq) {vfree (fd->cq->comps);
@@ -321,7 +327,8 @@ int hfi1_user_sdma_process_request(struct hfi1_filedata *fd, {int ret =0 , i;struct hfi1_ctxtdata *uctxt = fd->uctxt; -struct hfi1_user_sdma_pkt_q *pq = fd->pq; +struct hfi1_user_sdma_pkt_q *pq = +srcu_dereference (fd->pq, &fd->pq_srcu);struct hfi1_user_sdma_comp_q *cq = fd->cq;struct hfi1_devdata *dd = pq->dd;unsigned long idx =0 ;
drivers/infiniband/hw/mlx5/qp.c +6 -3
@@ -3391,9 +3391,6 @@ static int __mlx5_ib_qp_set_counter(struct ib_qp *qp,struct mlx5_ib_qp_base *base;u32 set_id; -if (!MLX5_CAP_GEN (dev->mdev, rts2rts_qp_counters_set_id)) -return 0 ; -if (counter) set_id = counter->id;else
@@ -6503,6 +6500,7 @@ void mlx5_ib_drain_rq(struct ib_qp *qp)*/ int mlx5_ib_qp_set_counter (struct ib_qp *qp,struct rdma_counter *counter) { +struct mlx5_ib_dev *dev =to_mdev (qp->device);struct mlx5_ib_qp *mqp =to_mqp (qp);int err =0 ;
@@ -6512,6 +6510,11 @@ int mlx5_ib_qp_set_counter(struct ib_qp *qp, struct rdma_counter *counter) goto out; } +if (!MLX5_CAP_GEN (dev->mdev, rts2rts_qp_counters_set_id)) { + err = -EOPNOTSUPP ; + goto out; + } +if (mqp->state ==IB_QPS_RTS ) { err =__mlx5_ib_qp_set_counter (qp, counter);if (!err)
drivers/infiniband/sw/rdmavt/qp.c +51 -33
137 lines not on this page · raw message
drivers/infiniband/sw/rxe/rxe_comp.c +4 -4
@@ -329,7 +329,7 @@ static inline enum comp_state check_ack(struct rxe_qp *qp, qp->comp.psn = pkt->psn;if (qp->req.wait_psn) { qp->req.wait_psn =0 ; -rxe_run_task (&qp->req.task,1 ); +rxe_run_task (&qp->req.task,0 ); } }return COMPST_ERROR_RETRY ;
@@ -463,7 +463,7 @@ static void do_complete(struct rxe_qp *qp, struct rxe_send_wqe *wqe)*/ if (qp->req.wait_fence) { qp->req.wait_fence =0 ; -rxe_run_task (&qp->req.task,1 ); +rxe_run_task (&qp->req.task,0 ); } }
@@ -479,7 +479,7 @@ static inline enum comp_state complete_ack(struct rxe_qp *qp,if (qp->req.need_rd_atomic) { qp->comp.timeout_retry =0 ; qp->req.need_rd_atomic =0 ; -rxe_run_task (&qp->req.task,1 ); +rxe_run_task (&qp->req.task,0 ); } }
@@ -725,7 +725,7 @@ int rxe_completer(void *arg) RXE_CNT_COMP_RETRY); qp->req.need_retry =1 ; qp->comp.started_retry =1 ; -rxe_run_task (&qp->req.task,1 ); +rxe_run_task (&qp->req.task,0 ); }if (pkt) {
drivers/input/mouse/synaptics.c +3 -1
@@ -146,7 +146,6 @@ static const char * const topbuttonpad_pnp_ids[] = {"LEN0042" ,/* Yoga */ "LEN0045" ,"LEN0047" , -"LEN0049" ,"LEN2000" ,/* S540 */ "LEN2001" ,/* Edge E431 */ "LEN2002", /* Edge E531 */
@@ -166,9 +165,11 @@ static const char * const smbus_pnp_ids[] = {/* all of the topbuttonpad_pnp_ids are valid, we just add some extras */ "LEN0048" ,/* X1 Carbon 3 */ "LEN0046" ,/* X250 */ +"LEN0049" ,/* Yoga 11e */ "LEN004a" ,/* W541 */ "LEN005b" ,/* P50 */ "LEN005e" ,/* T560 */ +"LEN006c" ,/* T470s */ "LEN0071" ,/* T480 */ "LEN0072" ,/* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */ "LEN0073", /* X1 Carbon G5 (Elantech) */
@@ -179,6 +180,7 @@ static const char * const smbus_pnp_ids[] = {"LEN0097" ,/* X280 -> ALPS trackpoint */ "LEN009b" ,/* T580 */ "LEN200f" ,/* T450s */ +"LEN2044" ,/* L470 */ "LEN2054" ,/* E480 */ "LEN2055" ,/* E580 */ "SYN3052", /* HP EliteBook 840 G4 */
drivers/mmc/core/host.c +4 -7
@@ -176,7 +176,6 @@ int mmc_of_parse(struct mmc_host *host)u32 bus_width, drv_type, cd_debounce_delay_ms;int ret;bool cd_cap_invert, cd_gpio_invert = false; -bool ro_cap_invert, ro_gpio_invert = false;if (!dev || !dev_fwnode (dev))return 0 ;
@@ -255,9 +254,11 @@ int mmc_of_parse(struct mmc_host *host) }/* Parse Write Protection */ - ro_cap_invert =device_property_read_bool (dev,"wp-inverted" ); - ret =mmc_gpiod_request_ro (host,"wp" ,0 ,0 , &ro_gpio_invert); +if (device_property_read_bool (dev,"wp-inverted" )) + host->caps2 |=MMC_CAP2_RO_ACTIVE_HIGH ; + + ret =mmc_gpiod_request_ro (host,"wp" ,0 ,0 ,NULL );if (!ret)dev_info (host->parent,"Got WP GPIO\n" );else if (ret != -ENOENT && ret != -ENOSYS )
@@ -266,10 +267,6 @@ int mmc_of_parse(struct mmc_host *host)if (device_property_read_bool (dev,"disable-wp" )) host->caps2 |=MMC_CAP2_NO_WRITE_PROTECT ; -/* See the comment on CD inversion above */ -if (ro_cap_invert ^ ro_gpio_invert) - host->caps2 |=MMC_CAP2_RO_ACTIVE_HIGH ; -if (device_property_read_bool (dev,"cap-sd-highspeed" )) host->caps |=MMC_CAP_SD_HIGHSPEED ;if (device_property_read_bool (dev,"cap-mmc-highspeed" ))
drivers/mmc/core/slot-gpio.c +3 -0
@@ -241,6 +241,9 @@ int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,return ret; } +if (host->caps2 &MMC_CAP2_RO_ACTIVE_HIGH ) +gpiod_toggle_active_low (desc); +if (gpio_invert) *gpio_invert = !gpiod_is_active_low (desc);
drivers/mmc/host/pxamci.c +4 -4
@@ -740,16 +740,16 @@ static int pxamci_probe(struct platform_device *pdev) goto out; } +if (!host->pdata->gpio_card_ro_invert) + mmc->caps2 |=MMC_CAP2_RO_ACTIVE_HIGH ; + ret =mmc_gpiod_request_ro (mmc,"wp" ,0 ,0 ,NULL );if (ret && ret != -ENOENT ) {dev_err (dev,"Failed requesting gpio_ro\n" ); goto out; } -if (!ret) { +if (!ret) host->use_ro_gpio = true; - mmc->caps2 |= host->pdata->gpio_card_ro_invert ? -0 :MMC_CAP2_RO_ACTIVE_HIGH ; - }if (host->pdata->init) host->pdata->init (dev, pxamci_detect_irq, mmc);
drivers/mmc/host/sdhci-esdhc-imx.c +2 -1
@@ -1381,13 +1381,14 @@ static int sdhci_esdhc_imx_probe_nondt(struct platform_device *pdev, host->mmc->parent->platform_data);/* write_protect */ if (boarddata->wp_type ==ESDHC_WP_GPIO ) { + host->mmc->caps2 |=MMC_CAP2_RO_ACTIVE_HIGH ; + err =mmc_gpiod_request_ro (host->mmc,"wp" ,0 ,0 ,NULL );if (err) {dev_err (mmc_dev (host->mmc),"failed to request write-protect gpio!\n" );return err; } - host->mmc->caps2 |=MMC_CAP2_RO_ACTIVE_HIGH ; }/* card_detect */
drivers/nvme/host/core.c +1 -1
@@ -3853,7 +3853,7 @@ static void nvme_get_fw_slot_info(struct nvme_ctrl *ctrl)if (!log)return ; -if (nvme_get_log (ctrl,NVME_NSID_ALL ,0 ,NVME_LOG_FW_SLOT , log, +if (nvme_get_log (ctrl,NVME_NSID_ALL ,NVME_LOG_FW_SLOT ,0 , log,sizeof (*log),0 ))dev_warn (ctrl->device,"Get FW SLOT INFO log error\n" );kfree (log);
drivers/s390/crypto/pkey_api.c +1 -1
@@ -794,7 +794,7 @@ static long pkey_unlocked_ioctl(struct file *filp, unsigned int cmd,return -EFAULT ; rc =cca_sec2protkey (ksp.cardnr, ksp.domain, ksp.seckey.seckey, ksp.protkey.protkey, -NULL , &ksp.protkey.type); + &ksp.protkey.len, &ksp.protkey.type);DEBUG_DBG ("%s cca_sec2protkey()=%d\n" , __func__, rc);if (rc)break ;
drivers/spmi/spmi-pmic-arb.c +4 -0
@@ -731,6 +731,7 @@ static int qpnpint_irq_domain_translate(struct irq_domain *d,return 0 ; } +static struct lock_class_key qpnpint_irq_lock_class, qpnpint_irq_request_class; static void qpnpint_irq_domain_map(struct spmi_pmic_arb *pmic_arb, struct irq_domain *domain, unsigned int virq,
@@ -746,6 +747,9 @@ static void qpnpint_irq_domain_map(struct spmi_pmic_arb *pmic_arb,else handler = handle_level_irq; + +irq_set_lockdep_class (virq, &qpnpint_irq_lock_class, + &qpnpint_irq_request_class);irq_domain_set_info (domain, virq, hwirq, &pmic_arb_irqchip, pmic_arb, handler,NULL ,NULL ); }
fs/btrfs/disk-io.c +1 -0
@@ -3167,6 +3167,7 @@ int open_ctree(struct super_block *sb,/* do not make disk changes in broken FS or nologreplay is given */ if (btrfs_super_log_root (disk_super) !=0 && !btrfs_test_opt (fs_info,NOLOGREPLAY )) { +btrfs_info (fs_info,"start tree-log replay" ); ret =btrfs_replay_log (fs_info, fs_devices);if (ret) { err = ret;
fs/btrfs/extent_map.c +11 -0
@@ -233,6 +233,17 @@ static void try_merge_map(struct extent_map_tree *tree, struct extent_map *em)struct extent_map *merge =NULL ;struct rb_node *rb; +/* +* We can't modify an extent map that is in the tree and that is being +* used by another task, as it can cause that other task to see it in +* inconsistent state during the merging. We always have 1 reference for +* the tree and 1 for this task (which is unpinning the extent map or +* clearing the logging flag), so anything > 2 means it's being used by +* other tasks too. +*/ +if (refcount_read (&em->refs) >2 ) +return ; +if (em->start !=0 ) { rb =rb_prev (&em->rb_node);if (rb)
fs/btrfs/ref-verify.c +5 -0
@@ -744,6 +744,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info,*/ be =add_block_entry (fs_info, bytenr, num_bytes, ref_root);if (IS_ERR (be)) { +kfree (ref);kfree (ra); ret =PTR_ERR (be); goto out;
@@ -757,6 +758,8 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, "re-allocated a block that still has references to it!");dump_block_entry (fs_info, be);dump_ref_action (fs_info, ra); +kfree (ref); +kfree (ra); goto out_unlock; }
@@ -819,6 +822,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, "dropping a ref for a existing root that doesn't have a ref on the block");dump_block_entry (fs_info, be);dump_ref_action (fs_info, ra); +kfree (ref);kfree (ra); goto out_unlock; }
@@ -834,6 +838,7 @@ int btrfs_ref_tree_mod(struct btrfs_fs_info *fs_info, "attempting to add another ref for an existing ref on a tree block");dump_block_entry (fs_info, be);dump_ref_action (fs_info, ra); +kfree (ref);kfree (ra); goto out_unlock; }
fs/btrfs/super.c +2 -0
@@ -1804,6 +1804,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) }if (btrfs_super_log_root (fs_info->super_copy) !=0 ) { +btrfs_warn (fs_info, +"mount required to replay tree-log, cannot remount read-write" ); ret = -EINVAL ; goto restore; }
fs/cifs/cifsfs.c +5 -1
@@ -414,7 +414,7 @@ cifs_show_security(struct seq_file *s, struct cifs_ses *ses)seq_puts (s,"ntlm" );break ;case Kerberos: -seq_printf (s,"krb5,cruid=%u" ,from_kuid_munged (&init_user_ns,ses->cred_uid)); +seq_puts (s,"krb5" );break ;case RawNTLMSSP:seq_puts (s,"ntlmssp" );
@@ -427,6 +427,10 @@ cifs_show_security(struct seq_file *s, struct cifs_ses *ses)if (ses->sign)seq_puts (s,"i" ); + +if (ses->sectype == Kerberos) +seq_printf (s,",cruid=%u" , +from_kuid_munged (&init_user_ns, ses->cred_uid)); } static void
fs/cifs/smb2ops.c +34 -1
@@ -1087,7 +1087,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,void *data[1 ];struct smb2_file_full_ea_info *ea =NULL ;struct kvec close_iov[1 ]; -int rc; +struct smb2_query_info_rsp *rsp; +int rc, used_len =0 ;if (smb3_encryption_required (tcon)) flags |=CIFS_TRANSFORM_REQ ;
@@ -1110,6 +1111,38 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, cifs_sb);if (rc == -ENODATA ) goto sea_exit; + }else { +/* If we are adding a attribute we should first check +* if there will be enough space available to store +* the new EA. If not we should not add it since we +* would not be able to even read the EAs back. +*/ + rc =smb2_query_info_compound (xid, tcon, utf16_path, +FILE_READ_EA , +FILE_FULL_EA_INFORMATION , +SMB2_O_INFO_FILE , + CIFSMaxBufSize - +MAX_SMB2_CREATE_RESPONSE_SIZE - +MAX_SMB2_CLOSE_RESPONSE_SIZE , + &rsp_iov[1 ], &resp_buftype[1 ], cifs_sb); +if (rc ==0 ) { + rsp = (struct smb2_query_info_rsp *)rsp_iov[1 ].iov_base; + used_len =le32_to_cpu (rsp->OutputBufferLength); + } +free_rsp_buf (resp_buftype[1 ], rsp_iov[1 ].iov_base); + resp_buftype[1 ] =CIFS_NO_BUFFER ; +memset (&rsp_iov[1 ],0 ,sizeof (rsp_iov[1 ])); + rc =0 ; + +/* Use a fudge factor of 256 bytes in case we collide +* with a different set_EAs command. +*/ +if (CIFSMaxBufSize -MAX_SMB2_CREATE_RESPONSE_SIZE - +MAX_SMB2_CLOSE_RESPONSE_SIZE -256 < + used_len + ea_name_len + ea_value_len +1 ) { + rc = -ENOSPC ; + goto sea_exit; + } } }
fs/ext4/block_validity.c +1 -0
@@ -203,6 +203,7 @@ static int ext4_protect_reserved_inode(struct super_block *sb,return PTR_ERR (inode); num = (inode->i_size + sb->s_blocksize -1 ) >> sb->s_blocksize_bits;while (i < num) { +cond_resched (); map.m_lblk = i; map.m_len = num - i; n =ext4_map_blocks (NULL , inode, &map,0 );
fs/ext4/dir.c +8 -6
@@ -130,12 +130,14 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)if (err !=ERR_BAD_DX_DIR ) {return err; } -/* -* We don't set the inode dirty flag since it's not -* critical that it get flushed back to the disk. -*/ -ext4_clear_inode_flag (file_inode (file), -EXT4_INODE_INDEX ); +/* Can we just clear INDEX flag to ignore htree information? */ +if (!ext4_has_metadata_csum (sb)) { +/* +* We don't set the inode dirty flag since it's not +* critical that it gets flushed back to the disk. +*/ +ext4_clear_inode_flag (inode,EXT4_INODE_INDEX ); + } }if (ext4_has_inline_data (inode)) {
fs/ext4/ext4.h +4 -1
@@ -2476,8 +2476,11 @@ void ext4_insert_dentry(struct inode *inode, struct ext4_filename *fname);static inline void ext4_update_dx_flag (struct inode *inode) { -if (!ext4_has_feature_dir_index (inode->i_sb)) +if (!ext4_has_feature_dir_index (inode->i_sb)) { +/* ext4_iget() should have caught this... */ +WARN_ON_ONCE (ext4_has_feature_metadata_csum (inode->i_sb));ext4_clear_inode_flag (inode,EXT4_INODE_INDEX ); + } }static const unsigned char ext4_filetype_table[] = {DT_UNKNOWN ,DT_REG ,DT_DIR ,DT_CHR ,DT_BLK ,DT_FIFO ,DT_SOCK ,DT_LNK
fs/ext4/inode.c +12 -0
@@ -4972,6 +4972,18 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, ret = -EFSCORRUPTED ; goto bad_inode; } +/* +* If dir_index is not enabled but there's dir with INDEX flag set, +* we'd normally treat htree data as empty space. But with metadata +* checksumming that corrupts checksums so forbid that. +*/ +if (!ext4_has_feature_dir_index (sb) &&ext4_has_metadata_csum (sb) && +ext4_test_inode_flag (inode,EXT4_INODE_INDEX )) { +ext4_error_inode (inode, function, line,0 , +"iget: Dir with htree data on filesystem without dir_index feature." ); + ret = -EFSCORRUPTED ; + goto bad_inode; + } ei->i_disksize = inode->i_size;#ifdef CONFIG_QUOTA ei->i_reserved_quota =0 ;
fs/ext4/mmp.c +7 -5
@@ -120,10 +120,10 @@ void __dump_mmp_msg(struct super_block *sb, struct mmp_struct *mmp, {__ext4_warning (sb, function, line,"%s" , msg);__ext4_warning (sb, function, line, -"MMP failure info: last update time: %llu, last update " -"node: %s, last update device: %s" , - (long long unsigned int )le64_to_cpu (mmp->mmp_time), - mmp->mmp_nodename, mmp->mmp_bdevname); +"MMP failure info: last update time: %llu, last update node: %.*s, last update device: %.*s" , + (unsigned long long )le64_to_cpu (mmp->mmp_time), + (int )sizeof (mmp->mmp_nodename), mmp->mmp_nodename, + (int )sizeof (mmp->mmp_bdevname), mmp->mmp_bdevname); }/*
@@ -154,6 +154,7 @@ static int kmmpd(void *data) mmp_check_interval =max (EXT4_MMP_CHECK_MULT * mmp_update_interval,EXT4_MMP_MIN_CHECK_INTERVAL ); mmp->mmp_check_interval =cpu_to_le16 (mmp_check_interval); +BUILD_BUG_ON (sizeof (mmp->mmp_bdevname) <BDEVNAME_SIZE );bdevname (bh->b_bdev, mmp->mmp_bdevname); memcpy(mmp->mmp_nodename, init_utsname()->nodename,
@@ -375,7 +376,8 @@ int ext4_multi_mount_protect(struct super_block *sb,/* * Start a kernel thread to update the MMP block periodically. */ -EXT4_SB (sb)->s_mmp_tsk =kthread_run (kmmpd, mmpd_data,"kmmpd-%s" , +EXT4_SB (sb)->s_mmp_tsk =kthread_run (kmmpd, mmpd_data,"kmmpd-%.*s" , + (int )sizeof (mmp->mmp_bdevname),bdevname (bh->b_bdev, mmp->mmp_bdevname));if (IS_ERR (EXT4_SB (sb)->s_mmp_tsk)) {
fs/ext4/namei.c +7 -0
@@ -2205,6 +2205,13 @@ static int ext4_add_entry(handle_t *handle, struct dentry *dentry, retval =ext4_dx_add_entry (handle, &fname, dir, inode);if (!retval || (retval !=ERR_BAD_DX_DIR )) goto out; +/* Can we just ignore htree data? */ +if (ext4_has_metadata_csum (sb)) { +EXT4_ERROR_INODE (dir, +"Directory has corrupted htree index." ); + retval = -EFSCORRUPTED ; + goto out; + }ext4_clear_inode_flag (dir,EXT4_INODE_INDEX ); dx_fallback++;ext4_mark_inode_dirty (handle, dir);
fs/ext4/super.c +31 -24
92 lines not on this page · raw message
fs/jbd2/commit.c +25 -21
54 lines not on this page · raw message
fs/jbd2/transaction.c +6 -4
@@ -2296,14 +2296,16 @@ static int journal_unmap_buffer(journal_t *journal, struct buffer_head *bh,return -EBUSY ; }/* -* OK, buffer won't be reachable after truncate. We just set -* j_next_transaction to the running transaction (if there is -* one) and mark buffer as freed so that commit code knows it -* should clear dirty bits when it is done with the buffer. +* OK, buffer won't be reachable after truncate. We just clear +* b_modified to not confuse transaction credit accounting, and +* set j_next_transaction to the running transaction (if there +* is one) and mark buffer as freed so that commit code knows +* it should clear dirty bits when it is done with the buffer. */ set_buffer_freed (bh);if (journal->j_running_transaction &&buffer_jbddirty (bh)) jh->b_next_transaction = journal->j_running_transaction; + jh->b_modified =0 ;jbd2_journal_put_journal_head (jh);spin_unlock (&journal->j_list_lock);jbd_unlock_bh_state (bh);
fs/nfs/nfs4proc.c +1 -1
@@ -5293,7 +5293,7 @@ static void nfs4_proc_write_setup(struct nfs_pgio_header *hdr, hdr->timestamp = jiffies; msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_WRITE ]; -nfs4_init_sequence (&hdr->args.seq_args, &hdr->res.seq_res,1 ,0 ); +nfs4_init_sequence (&hdr->args.seq_args, &hdr->res.seq_res,0 ,0 );nfs4_state_protect_write (server->nfs_client, clnt, msg, hdr); }
include/acpi/acpixf.h +1 -0
@@ -748,6 +748,7 @@ ACPI_HW_DEPENDENT_RETURN_UINT32(u32 acpi_dispatch_gpe(acpi_handle gpe_device, u3 ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void)) +ACPI_HW_DEPENDENT_RETURN_UINT32(u32 acpi_any_gpe_status_set(void)) ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_gpe_device(u32 gpe_index,
include/linux/gpio/consumer.h +7 -0
@@ -158,6 +158,7 @@ int gpiod_set_raw_array_value_cansleep(unsigned int array_size,int gpiod_set_debounce (struct gpio_desc *desc,unsigned debounce);int gpiod_set_transitory (struct gpio_desc *desc,bool transitory); +void gpiod_toggle_active_low (struct gpio_desc *desc);int gpiod_is_active_low (const struct gpio_desc *desc);int gpiod_cansleep (const struct gpio_desc *desc);
@@ -479,6 +480,12 @@ static inline int gpiod_set_transitory(struct gpio_desc *desc, bool transitory)return -ENOSYS ; } +static inline void gpiod_toggle_active_low (struct gpio_desc *desc) +{ +/* GPIO can never have been requested */ +WARN_ON (desc); +} +static inline int gpiod_is_active_low (const struct gpio_desc *desc) {/* GPIO can never have been requested */
include/linux/suspend.h +1 -1
@@ -191,7 +191,7 @@ struct platform_s2idle_ops {int (*begin)(void );int (*prepare)(void );int (*prepare_late)(void ); -void (*wake)(void ); +bool (*wake)(void );void (*restore_early)(void );void (*restore)(void );void (*end)(void );
kernel/power/suspend.c +5 -4
@@ -131,11 +131,12 @@ static void s2idle_loop(void)* to avoid them upfront. */ for (;;) { -if (s2idle_ops && s2idle_ops->wake) - s2idle_ops->wake (); - -if (pm_wakeup_pending ()) +if (s2idle_ops && s2idle_ops->wake) { +if (s2idle_ops->wake ()) +break ; + }else if (pm_wakeup_pending ()) {break ; + }pm_wakeup_clear (false);
kernel/sched/core.c +1 -1
@@ -7250,7 +7250,7 @@ capacity_from_percent(char *buf) &req.percent);if (req.ret)return req; -if (req.percent >UCLAMP_PERCENT_SCALE ) { +if ((u64 )req.percent >UCLAMP_PERCENT_SCALE ) { req.ret = -ERANGE ;return req; }
net/mac80211/mlme.c +4 -4
@@ -8,7 +8,7 @@* Copyright 2007, Michael Wu <[email protected]> * Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2015 - 2017 Intel Deutschland GmbH -* Copyright (C) 2018 - 2019 Intel Corporation +* Copyright (C) 2018 - 2020 Intel Corporation */ #include <linux/delay.h>
@@ -1311,7 +1311,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,if (!res) { ch_switch.timestamp = timestamp; ch_switch.device_timestamp = device_timestamp; - ch_switch.block_tx = beacon ? csa_ie.mode :0 ; + ch_switch.block_tx = csa_ie.mode; ch_switch.chandef = csa_ie.chandef; ch_switch.count = csa_ie.count; ch_switch.delay = csa_ie.max_switch_time;
@@ -1404,7 +1404,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, sdata->vif.csa_active = true; sdata->csa_chandef = csa_ie.chandef; - sdata->csa_block_tx = ch_switch.block_tx; + sdata->csa_block_tx = csa_ie.mode; ifmgd->csa_ignored_same_chan = false;if (sdata->csa_block_tx)
@@ -1438,7 +1438,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,* reset when the disconnection worker runs. */ sdata->vif.csa_active = true; - sdata->csa_block_tx = ch_switch.block_tx; + sdata->csa_block_tx = csa_ie.mode;ieee80211_queue_work (&local->hw, &ifmgd->csa_connection_drop_work);mutex_unlock (&local->chanctx_mtx);
net/sunrpc/xprtrdma/frwr_ops.c +7 -6
@@ -326,8 +326,8 @@ struct rpcrdma_mr_seg *frwr_map(struct rpcrdma_xprt *r_xprt, {struct rpcrdma_ia *ia = &r_xprt->rx_ia;struct ib_reg_wr *reg_wr; +int i, n, dma_nents;struct ib_mr *ibmr; -int i, n;u8 key;if (nsegs > ia->ri_max_frwr_depth)
@@ -351,15 +351,16 @@ struct rpcrdma_mr_seg *frwr_map(struct rpcrdma_xprt *r_xprt,break ; } mr->mr_dir =rpcrdma_data_dir (writing); + mr->mr_nents = i; - mr->mr_nents = -ib_dma_map_sg (ia->ri_id->device, mr->mr_sg, i, mr->mr_dir); -if (!mr->mr_nents) + dma_nents =ib_dma_map_sg (ia->ri_id->device, mr->mr_sg, mr->mr_nents, + mr->mr_dir); +if (!dma_nents) goto out_dmamap_err; ibmr = mr->frwr.fr_mr; - n =ib_map_mr_sg (ibmr, mr->mr_sg, mr->mr_nents,NULL ,PAGE_SIZE ); -if (unlikely (n != mr->mr_nents)) + n =ib_map_mr_sg (ibmr, mr->mr_sg, dma_nents,NULL ,PAGE_SIZE ); +if (n != dma_nents) goto out_mapmr_err; ibmr->iova &=0x00000000ffffffff ;
sound/pci/hda/patch_realtek.c +4 -0
@@ -2447,6 +2447,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {SND_PCI_QUIRK (0x1071 ,0x8258 ,"Evesham Voyaeger" ,ALC882_FIXUP_EAPD ),SND_PCI_QUIRK (0x1458 ,0xa002 ,"Gigabyte EP45-DS3/Z87X-UD3H" ,ALC889_FIXUP_FRONT_HP_NO_PRESENCE ),SND_PCI_QUIRK (0x1458 ,0xa0b8 ,"Gigabyte AZ370-Gaming" ,ALC1220_FIXUP_GB_DUAL_CODECS ), +SND_PCI_QUIRK (0x1462 ,0x1276 ,"MSI-GL73" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1462 ,0x7350 ,"MSI-7350" ,ALC889_FIXUP_CD ),SND_PCI_QUIRK (0x1462 ,0xda57 ,"MSI Z270-Gaming" ,ALC1220_FIXUP_GB_DUAL_CODECS ), SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
@@ -5701,8 +5702,11 @@ static void alc_fixup_headset_jack(struct hda_codec *codec,break ;case HDA_FIXUP_ACT_INIT :switch (codec->core.vendor_id) { +case 0x10ec0215 :case 0x10ec0225 : +case 0x10ec0285 :case 0x10ec0295 : +case 0x10ec0289 :case 0x10ec0299 :alc_write_coef_idx (codec,0x48 ,0xd011 );alc_update_coef_idx (codec,0x49 ,0x007f ,0x0045 );
sound/usb/clock.c +67 -32
221 lines not on this page · raw message
sound/usb/clock.h +2 -2
@@ -6,7 +6,7 @@ int snd_usb_init_sample_rate(struct snd_usb_audio *chip, int iface,struct usb_host_interface *alts, struct audioformat *fmt, int rate); -int snd_usb_clock_find_source (struct snd_usb_audio *chip,int protocol, -int entity_id,bool validate); +int snd_usb_clock_find_source (struct snd_usb_audio *chip, +struct audioformat *fmt,bool validate);#endif /* __USBAUDIO_CLOCK_H */
sound/usb/format.c +1 -2
@@ -322,8 +322,7 @@ static int parse_audio_format_rates_v2v3(struct snd_usb_audio *chip,struct usb_device *dev = chip->dev;unsigned char tmp[2 ], *data;int nr_triplets, data_size, ret =0 , ret_l6; -int clock =snd_usb_clock_find_source (chip, fp->protocol, - fp->clock, false); +int clock =snd_usb_clock_find_source (chip, fp, false);if (clock <0 ) { dev_err(&dev->dev,
sound/usb/mixer.c +10 -2
@@ -897,6 +897,15 @@ static int parse_term_proc_unit(struct mixer_build *state,return 0 ; } +static int parse_term_effect_unit (struct mixer_build *state, +struct usb_audio_term *term, +void *p1,int id) +{ + term->type =UAC3_EFFECT_UNIT <<16 ;/* virtual type */ + term->id = id; +return 0 ; +} +static int parse_term_uac2_clock_source (struct mixer_build *state,struct usb_audio_term *term,void *p1,int id)
@@ -981,8 +990,7 @@ static int __check_input_term(struct mixer_build *state, int id, UAC3_PROCESSING_UNIT);case PTYPE (UAC_VERSION_2 ,UAC2_EFFECT_UNIT ):case PTYPE (UAC_VERSION_3 ,UAC3_EFFECT_UNIT ): -return parse_term_proc_unit (state, term, p1, id, -UAC3_EFFECT_UNIT ); +return parse_term_effect_unit (state, term, p1, id);case PTYPE (UAC_VERSION_1 ,UAC1_EXTENSION_UNIT ):case PTYPE (UAC_VERSION_2 ,UAC2_EXTENSION_UNIT_V2 ):case PTYPE (UAC_VERSION_3 ,UAC3_EXTENSION_UNIT ):
sound/usb/quirks.c +1 -0
@@ -1402,6 +1402,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)case USB_ID (0x1395 ,0x740a ):/* Sennheiser DECT */ case USB_ID (0x1901 ,0x0191 ):/* GE B850V3 CP2114 audio interface */ case USB_ID (0x21B4 ,0x0081 ):/* AudioQuest DragonFly */ +case USB_ID (0x2912 ,0x30c8 ):/* Audioengine D1 */ return true; }
tools/perf/util/stat-shadow.c +0 -6
@@ -18,7 +18,6 @@* AGGR_NONE: Use matching CPU * AGGR_THREAD: Not supported? */ -static bool have_frontend_stalled;struct runtime_stat rt_stat;struct stats walltime_nsecs_stats;
@@ -144,7 +143,6 @@ void runtime_stat__exit(struct runtime_stat *st)void perf_stat__init_shadow_stats (void ) { - have_frontend_stalled =pmu_have_event ("cpu" ,"stalled-cycles-frontend" );runtime_stat__init (&rt_stat); }
@@ -853,10 +851,6 @@ void perf_stat__print_shadow_stats(struct perf_stat_config *config,print_metric (config, ctxp,NULL ,"%7.2f " ,"stalled cycles per insn" , ratio); - }else if (have_frontend_stalled) { - out->new_line (config, ctxp); -print_metric (config, ctxp,NULL ,"%7.2f " , -"stalled cycles per insn" ,0 ); } }else if (perf_evsel__match (evsel,HARDWARE ,HW_BRANCH_MISSES )) {if (runtime_stat_n (st,STAT_BRANCHES , ctx, cpu) !=0 )