Linux 4.19.97
Greg KH
maintainerI'm announcing the release of the 4.19.97 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.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/ABI/testing/sysfs-bus-mei | 2 Makefile | 2 arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 2 arch/hexagon/include/asm/atomic.h | 8 arch/hexagon/include/asm/bitops.h | 8 arch/hexagon/include/asm/cmpxchg.h | 2 arch/hexagon/include/asm/futex.h | 6 arch/hexagon/include/asm/spinlock.h | 20 - arch/hexagon/kernel/stacktrace.c | 4 arch/hexagon/kernel/vm_entry.S | 2 arch/mips/boot/compressed/Makefile | 3 arch/mips/kernel/cacheinfo.c | 27 ++ arch/powerpc/platforms/powernv/pci.c | 17 + drivers/clk/samsung/clk-exynos5420.c | 2 drivers/crypto/virtio/virtio_crypto_algs.c | 9 drivers/dma/ioat/dma.c | 3 drivers/dma/k3dma.c | 12 - drivers/gpio/gpio-mpc8xxx.c | 1 drivers/gpio/gpio-zynq.c | 8 drivers/gpio/gpiolib.c | 5 drivers/gpu/drm/arm/malidp_mw.c | 2 drivers/gpu/drm/i915/i915_gem_context.c | 13 - drivers/gpu/drm/ttm/ttm_page_alloc.c | 8 drivers/hid/hidraw.c | 7 drivers/hid/uhid.c | 5 drivers/iio/imu/adis16480.c | 6 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 6 drivers/infiniband/hw/bnxt_re/qplib_fp.c | 12 - drivers/infiniband/hw/mlx5/mr.c | 2 drivers/infiniband/ulp/srpt/ib_srpt.c | 24 ++ drivers/iommu/iommu.c | 1 drivers/iommu/mtk_iommu.c | 2 drivers/media/i2c/ov6650.c | 72 ++++-- drivers/media/platform/cadence/cdns-csi2rx.c | 2 drivers/media/platform/exynos4-is/fimc-isp-video.c | 2 drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 drivers/media/usb/zr364xx/zr364xx.c | 3 drivers/misc/enclosure.c | 3 drivers/mtd/nand/onenand/omap2.c | 3 drivers/mtd/spi-nor/spi-nor.c | 4 drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 1 drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | 36 ++- drivers/net/wireless/realtek/rtlwifi/regd.c | 2 drivers/pci/controller/dwc/pcie-designware-host.c | 11 drivers/pci/pcie/ptm.c | 2 drivers/pinctrl/intel/pinctrl-lewisburg.c | 171 +++++++-------- drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 2 drivers/platform/x86/asus-wmi.c | 8 drivers/platform/x86/gpd-pocket-fan.c | 25 +- drivers/rtc/rtc-brcmstb-waketimer.c | 1 drivers/rtc/rtc-msm6242.c | 3 drivers/rtc/rtc-mt6397.c | 47 ++-- drivers/s390/net/qeth_l2_main.c | 4 drivers/scsi/cxgbi/libcxgbi.c | 3 drivers/scsi/sd.c | 18 + drivers/spi/spi-atmel.c | 10 drivers/tty/serial/imx.c | 2 drivers/tty/serial/pch_uart.c | 5 fs/afs/super.c | 1 fs/btrfs/file.c | 5 fs/cifs/smb2file.c | 2 fs/f2fs/data.c | 2 fs/f2fs/dir.c | 18 + fs/f2fs/file.c | 2 fs/nfs/nfs2xdr.c | 2 fs/nfs/nfs4proc.c | 4 fs/ocfs2/journal.c | 8 include/linux/poll.h | 4 include/net/cfg80211.h | 11 net/core/ethtool.c | 16 - net/dccp/feat.c | 7 net/hsr/hsr_device.c | 2 net/mac80211/cfg.c | 58 ----- net/mac80211/sta_info.c | 4 net/socket.c | 1 net/sunrpc/xprtrdma/verbs.c | 2 net/unix/af_unix.c | 19 + net/wireless/util.c | 45 +++ sound/soc/soc-core.c | 2 sound/soc/stm/stm32_spdifrx.c | 36 ++- tools/testing/selftests/firmware/fw_lib.sh | 6 tools/testing/selftests/rseq/settings | 1 82 files changed, 602 insertions(+), 330 deletions(-)
Alexander Usyskin (1):
mei: fix modalias documentation
[email protected] (1):
ioat: ioat_alloc_ring() failure handling.
Alexandra Winter (2):
s390/qeth: fix false reporting of VNIC CHAR config failure s390/qeth: Fix vnicc_is_in_use if rx_bcast not set
Alexandru Ardelean (1):
iio: imu: adis16480: assign bias value only if operation succeeded
Andy Shevchenko (1):
pinctrl: lewisburg: Update pin list according to v1.1v6
Ard Biesheuvel (1):
crypto: virtio - implement missing support for output IVs
Arnd Bergmann (5):
ethtool: reduce stack usage with clang
fs/select: avoid clang stack usage warning
scsi: sd: enable compat ioctls for sed-opal
af_unix: add compat_ioctl support
compat_ioctl: handle SIOCOUTQNSD
Bart Van Assche (1):
RDMA/srpt: Report the SCSI residual to the initiator
Ben Dooks (Codethink) (1):
drm/arm/mali: make malidp_mw_connector_helper_funcs static
Ben Hutchings (1):
f2fs: Move err variable to function scope in f2fs_fill_dentries()
Bjorn Helgaas (1):
PCI/PTM: Remove spurious "d" from granularity message
Chao Yu (1):
f2fs: fix potential overflow
Christian König (2):
drm/ttm: fix start page for huge page check in ttm_put_pages() drm/ttm: fix incrementing the page pointer for huge pages
Christophe JAILLET (1):
media: v4l: cadence: Fix how unsued lanes are handled in 'csi2rx_start()'
Chuck Lever (1):
xprtrdma: Fix completion wait during device removal
Chuhong Yuan (1):
rtc: brcmstb-waketimer: add missed clk_disable_unprepare
Colin Ian King (1):
pinctl: ti: iodelay: fix error checking on pinctrl_count_index_with_args call
Daniel Baluta (1):
ASoC: soc-core: Set dpcm_playback / dpcm_capture
David Howells (1):
afs: Fix missing cell comparison in afs_test_super()
Dedy Lansky (1):
cfg80211/mac80211: make ieee80211_send_layer2_update a public function
Fabian Henneke (1):
hidraw: Return EPOLLOUT from hidraw_poll
Geert Uytterhoeven (1):
gpio: Fix error message on out-of-range GPIO in lookup table
Goldwyn Rodrigues (1):
btrfs: simplify inode locking for RWF_NOWAIT
Greg Kroah-Hartman (1):
Linux 4.19.97
Hans de Goede (1):
platform/x86: GPD pocket fan: Use default values when wrong modparams are given
Jaegeuk Kim (1):
f2fs: check memory boundary by insane namelen
James Bottomley (1):
scsi: enclosure: Fix stale device oops with hot replug
Janusz Krzysztofik (3):
media: ov6650: Fix incorrect use of JPEG colorspace
media: ov6650: Fix some format attributes not under control
media: ov6650: Fix .get_fmt() V4L2_SUBDEV_FORMAT_TRY support
Jian-Hong Pan (1):
platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0
Jiri Kosina (1):
HID: hidraw, uhid: Always report EPOLLOUT
John Stultz (1):
dmaengine: k3dma: Avoid null pointer traversal
Johnson CH Chen (陳昭勳) (1):
gpio: mpc8xxx: Add platform device to gpiochip->parent
Jon Derrick (1):
iommu: Remove device link to group on failure
Jouni Hogander (1):
MIPS: Prevent link failure with kcov instrumentation
Jouni Malinen (1):
mac80211: Do not send Layer 2 Update frame before authorization
Kai Li (1):
ocfs2: call journal flush to mark journal as empty after journal recovery when mount
Kars de Jong (1):
rtc: msm6242: Fix reading of 10-hour digit
Leon Romanovsky (1):
RDMA/mlx5: Return proper error value
Loic Poulain (1):
arm64: dts: apq8096-db820c: Increase load on l21 for SDCARD
Mans Rullgard (1):
spi: atmel: fix handling of cs_change set on non-last xfer
Marcel Holtmann (1):
HID: hidraw: Fix returning EPOLLOUT from hidraw_poll
Marian Mihailescu (1):
clk: samsung: exynos5420: Preserve CPU clocks configuration during suspend/resume
Mathieu Desnoyers (1):
rseq/selftests: Turn off timeout setting
Nathan Chancellor (2):
cifs: Adjust indentation in smb2_open_file
rtlwifi: Remove unnecessary NULL check in rtl_regd_init
Navid Emamdoost (3):
iwlwifi: dbg_ini: fix memory leak in alloc_sgtable
iwlwifi: pcie: fix memory leaks in iwl_pcie_ctxt_info_gen3_init
RDMA: Fix goto target to release the allocated memory
Nick Desaulniers (2):
hexagon: parenthesize registers in asm predicates
hexagon: work around compiler crash
Niklas Cassel (1):
PCI: dwc: Fix find_next_bit() usage
Niklas Söderlund (1):
media: rcar-vin: Fix incorrect return statement in rvin_try_format()
Oliver O'Halloran (1):
powerpc/powernv: Disable native PCIe port management
Olivier Moysan (2):
ASoC: stm32: spdifrx: fix inconsistent lock state
ASoC: stm32: spdifrx: fix race condition in irq handler
Peng Fan (2):
tty: serial: imx: use the sg count from dma_map_sg
tty: serial: pch_uart: correct usage of dma_unmap_sg
Peter Ujfalusi (1):
mtd: onenand: omap2: Pass correct flags for prep_dma_memcpy
Ran Bi (1):
rtc: mt6397: fix alarm register overwrite
Selvin Xavier (2):
RDMA/bnxt_re: Avoid freeing MR resources if dereg fails RDMA/bnxt_re: Fix Send Work Entry state check while polling completions
Sergei Shtylyov (2):
mtd: spi-nor: fix silent truncation in spi_nor_read()
mtd: spi-nor: fix silent truncation in spi_nor_read_raw()
Seung-Woo Kim (1):
media: exynos4-is: Fix recursive locking in isp_video_release()
Sheng Yong (1):
f2fs: check if file namelen exceeds max value
Shuah Khan (1):
selftests: firmware: Fix it to do root uid check and skip
Swapna Manupati (1):
gpio: zynq: Fix for bug in zynq_gpio_restore_context API
Taehee Yoo (1):
hsr: reset network header when supervision frame is created
Trond Myklebust (2):
NFSv2: Fix a typo in encode_sattr()
NFSv4.x: Drop the slot if nfs4_delegreturn_prepare waits for layoutreturn
Tyler Hicks (1):
drm/i915: Fix use-after-free when destroying GEM context
Vandana BN (1):
media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap
Varun Prakash (1):
scsi: libcxgbi: fix NULL pointer dereference in cxgbi_device_destroy()
Vladimir Kondratiev (1):
mips: cacheinfo: report shared CPU map
Xiang Chen (1):
scsi: sd: Clear sdkp->protection_type if disk is reformatted without PI
Yong Wu (1):
iommu/mediatek: Correct the flush_iotlb_all callback
YueHaibing (1):
dccp: Fix memleak in __feat_register_sp
Greg KH
maintainerDocumentation/ABI/testing/sysfs-bus-mei +1 -1
@@ -4,7 +4,7 @@ KernelVersion: 3.10 Contact: Samuel Ortiz <[email protected]> [email protected] Description: Stores the same MODALIAS value emitted by uevent - Format: mei:<mei device name>:<device uuid>: + Format: mei:<mei device name>:<device uuid>:<protocol version> What: /sys/bus/mei/devices/.../name Date: May 2015
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 96 +SUBLEVEL = 97 EXTRAVERSION = NAME = "People's Front"
arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi +2 -0
@@ -580,6 +580,8 @@ l21 { regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; + regulator-allow-set-load; + regulator-system-load = <200000>; }; l22 { regulator-min-microvolt = <3300000>;
arch/hexagon/include/asm/atomic.h +4 -4
@@ -105,7 +105,7 @@ static inline void atomic_##op(int i, atomic_t *v) \"1: %0 = memw_locked(%1);\n" \ " %0 = "#op "(%0,%2);\n" \ " memw_locked(%1,P3)=%0;\n" \ - " if !P3 jump 1b;\n" \ + " if (!P3) jump 1b;\n" \ : "=&r" (output) \ : "r" (&v->counter), "r" (i) \ : "memory", "p3" \
@@ -121,7 +121,7 @@ static inline int atomic_##op##_return(int i, atomic_t *v) \"1: %0 = memw_locked(%1);\n" \ " %0 = "#op "(%0,%2);\n" \ " memw_locked(%1,P3)=%0;\n" \ - " if !P3 jump 1b;\n" \ + " if (!P3) jump 1b;\n" \ : "=&r" (output) \ : "r" (&v->counter), "r" (i) \ : "memory", "p3" \
@@ -138,7 +138,7 @@ static inline int atomic_fetch_##op(int i, atomic_t *v) \"1: %0 = memw_locked(%2);\n" \ " %1 = "#op "(%0,%3);\n" \ " memw_locked(%2,P3)=%1;\n" \ - " if !P3 jump 1b;\n" \ + " if (!P3) jump 1b;\n" \ : "=&r" (output), "=&r" (val) \ : "r" (&v->counter), "r" (i) \ : "memory", "p3" \
@@ -187,7 +187,7 @@ static inline int atomic_fetch_add_unless(atomic_t *v, int a, int u)" }" " memw_locked(%2, p3) = %1;" " {" -" if !p3 jump 1b;" +" if (!p3) jump 1b;" " }" "2:" : "=&r" (__oldval), "=&r" (tmp)
arch/hexagon/include/asm/bitops.h +4 -4
@@ -52,7 +52,7 @@ static inline int test_and_clear_bit(int nr, volatile void *addr)"1: R12 = memw_locked(R10);\n" " { P0 = tstbit(R12,R11); R12 = clrbit(R12,R11); }\n" " memw_locked(R10,P1) = R12;\n" -" {if !P1 jump 1b; %0 = mux(P0,#1,#0);}\n" +" {if (!P1) jump 1b; %0 = mux(P0,#1,#0);}\n" : "=&r" (oldval) : "r" (addr), "r" (nr) : "r10", "r11", "r12", "p0", "p1", "memory"
@@ -76,7 +76,7 @@ static inline int test_and_set_bit(int nr, volatile void *addr)"1: R12 = memw_locked(R10);\n" " { P0 = tstbit(R12,R11); R12 = setbit(R12,R11); }\n" " memw_locked(R10,P1) = R12;\n" -" {if !P1 jump 1b; %0 = mux(P0,#1,#0);}\n" +" {if (!P1) jump 1b; %0 = mux(P0,#1,#0);}\n" : "=&r" (oldval) : "r" (addr), "r" (nr) : "r10", "r11", "r12", "p0", "p1", "memory"
@@ -102,7 +102,7 @@ static inline int test_and_change_bit(int nr, volatile void *addr)"1: R12 = memw_locked(R10);\n" " { P0 = tstbit(R12,R11); R12 = togglebit(R12,R11); }\n" " memw_locked(R10,P1) = R12;\n" -" {if !P1 jump 1b; %0 = mux(P0,#1,#0);}\n" +" {if (!P1) jump 1b; %0 = mux(P0,#1,#0);}\n" : "=&r" (oldval) : "r" (addr), "r" (nr) : "r10", "r11", "r12", "p0", "p1", "memory"
@@ -237,7 +237,7 @@ static inline int ffs(int x)int r; asm("{ P0 = cmp.eq(%1,#0); %0 = ct0(%1);}\n" -"{ if P0 %0 = #0; if !P0 %0 = add(%0,#1);}\n" +"{ if (P0) %0 = #0; if (!P0) %0 = add(%0,#1);}\n" :"=&r" (r) :"r" (x) :"p0" );
arch/hexagon/include/asm/cmpxchg.h +1 -1
@@ -44,7 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, __asm__ __volatile__ ("1: %0 = memw_locked(%1);\n" /* load into retval */ " memw_locked(%1,P0) = %2;\n" /* store into memory */ -" if !P0 jump 1b;\n" +" if (!P0) jump 1b;\n" :"=&r" (retval) :"r" (ptr),"r" (x) : "memory", "p0"
arch/hexagon/include/asm/futex.h +3 -3
@@ -16,7 +16,7 @@/* For example: %1 = %4 */ \ insn \"2: memw_locked(%3,p2) = %1;\n" \ -" if !p2 jump 1b;\n" \ +" if (!p2) jump 1b;\n" \" %1 = #0;\n" \"3:\n" \".section .fixup,\"ax\"\n" \
@@ -84,10 +84,10 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval,"1: %1 = memw_locked(%3)\n" " {\n" " p2 = cmp.eq(%1,%4)\n" -" if !p2.new jump:NT 3f\n" +" if (!p2.new) jump:NT 3f\n" " }\n" "2: memw_locked(%3,p2) = %5\n" -" if !p2 jump 1b\n" +" if (!p2) jump 1b\n" "3:\n" ".section .fixup,\"ax\"\n" "4: %0 = #%6\n"
arch/hexagon/include/asm/spinlock.h +10 -10
@@ -44,9 +44,9 @@ static inline void arch_read_lock(arch_rwlock_t *lock) __asm__ __volatile__("1: R6 = memw_locked(%0);\n" " { P3 = cmp.ge(R6,#0); R6 = add(R6,#1);}\n" -" { if !P3 jump 1b; }\n" +" { if (!P3) jump 1b; }\n" " memw_locked(%0,P3) = R6;\n" -" { if !P3 jump 1b; }\n" +" { if (!P3) jump 1b; }\n" : :"r" (&lock->lock) : "memory", "r6", "p3"
@@ -60,7 +60,7 @@ static inline void arch_read_unlock(arch_rwlock_t *lock) "1: R6 = memw_locked(%0);\n" " R6 = add(R6,#-1);\n" " memw_locked(%0,P3) = R6\n" - " if !P3 jump 1b;\n" + " if (!P3) jump 1b;\n" : : "r" (&lock->lock) : "memory", "r6", "p3"
@@ -75,7 +75,7 @@ static inline int arch_read_trylock(arch_rwlock_t *lock) __asm__ __volatile__(" R6 = memw_locked(%1);\n" " { %0 = #0; P3 = cmp.ge(R6,#0); R6 = add(R6,#1);}\n" -" { if !P3 jump 1f; }\n" +" { if (!P3) jump 1f; }\n" " memw_locked(%1,P3) = R6;\n" " { %0 = P3 }\n" "1:\n"
@@ -92,9 +92,9 @@ static inline void arch_write_lock(arch_rwlock_t *lock) __asm__ __volatile__("1: R6 = memw_locked(%0)\n" " { P3 = cmp.eq(R6,#0); R6 = #-1;}\n" -" { if !P3 jump 1b; }\n" +" { if (!P3) jump 1b; }\n" " memw_locked(%0,P3) = R6;\n" -" { if !P3 jump 1b; }\n" +" { if (!P3) jump 1b; }\n" : :"r" (&lock->lock) : "memory", "r6", "p3"
@@ -108,7 +108,7 @@ static inline int arch_write_trylock(arch_rwlock_t *lock) __asm__ __volatile__(" R6 = memw_locked(%1)\n" " { %0 = #0; P3 = cmp.eq(R6,#0); R6 = #-1;}\n" -" { if !P3 jump 1f; }\n" +" { if (!P3) jump 1f; }\n" " memw_locked(%1,P3) = R6;\n" " %0 = P3;\n" "1:\n"
@@ -131,9 +131,9 @@ static inline void arch_spin_lock(arch_spinlock_t *lock) __asm__ __volatile__("1: R6 = memw_locked(%0);\n" " P3 = cmp.eq(R6,#0);\n" -" { if !P3 jump 1b; R6 = #1; }\n" +" { if (!P3) jump 1b; R6 = #1; }\n" " memw_locked(%0,P3) = R6;\n" -" { if !P3 jump 1b; }\n" +" { if (!P3) jump 1b; }\n" : :"r" (&lock->lock) : "memory", "r6", "p3"
@@ -153,7 +153,7 @@ static inline unsigned int arch_spin_trylock(arch_spinlock_t *lock) __asm__ __volatile__(" R6 = memw_locked(%1);\n" " P3 = cmp.eq(R6,#0);\n" -" { if !P3 jump 1f; R6 = #1; %0 = #0; }\n" +" { if (!P3) jump 1f; R6 = #1; %0 = #0; }\n" " memw_locked(%1,P3) = R6;\n" " %0 = P3;\n" "1:\n"
arch/hexagon/kernel/stacktrace.c +1 -3
@@ -24,8 +24,6 @@#include <linux/thread_info.h> #include <linux/module.h> -registerunsigned long current_frame_pointer asm("r30" ); -struct stackframe {unsigned long fp;unsigned long rets;
@@ -43,7 +41,7 @@ void save_stack_trace(struct stack_trace *trace) low = (unsigned long )task_stack_page (current); high = low +THREAD_SIZE ; - fp = current_frame_pointer; + fp = (unsigned long )__builtin_frame_address (0 );while (fp >= low && fp <= (high -sizeof (*frame))) { frame = (struct stackframe *)fp;
arch/hexagon/kernel/vm_entry.S +1 -1
@@ -382,7 +382,7 @@ ret_from_fork: R26.L = #LO(do_work_pending); R0 = #VM_INT_DISABLE; } - if P0 jump check_work_pending + if (P0) jump check_work_pending { R0 = R25; callr R24
arch/mips/boot/compressed/Makefile +3 -0
@@ -29,6 +29,9 @@ KBUILD_AFLAGS := $(KBUILD_AFLAGS) -D__ASSEMBLY__ \ -DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE) \ -DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS) +# Prevents link failures: __sanitizer_cov_trace_pc() is not linked in. +KCOV_INSTRUMENT := n + # decompressor objects (linked with vmlinuz) vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o
arch/mips/kernel/cacheinfo.c +26 -1
@@ -61,6 +61,25 @@ static int __init_cache_level(unsigned int cpu)return 0 ; } +static void fill_cpumask_siblings (int cpu,cpumask_t *cpu_map) +{ +int cpu1; + +for_each_possible_cpu (cpu1) +if (cpus_are_siblings (cpu, cpu1)) +cpumask_set_cpu (cpu1, cpu_map); +} + +static void fill_cpumask_cluster (int cpu,cpumask_t *cpu_map) +{ +int cpu1; +int cluster =cpu_cluster (&cpu_data[cpu]); + +for_each_possible_cpu (cpu1) +if (cpu_cluster (&cpu_data[cpu1]) == cluster) +cpumask_set_cpu (cpu1, cpu_map); +} +static int __populate_cache_leaves (unsigned int cpu) {struct cpuinfo_mips *c = ¤t_cpu_data;
@@ -68,14 +87,20 @@ static int __populate_cache_leaves(unsigned int cpu)struct cacheinfo *this_leaf = this_cpu_ci->info_list;if (c->icache.waysize) { +/* L1 caches are per core */ +fill_cpumask_siblings (cpu, &this_leaf->shared_cpu_map);populate_cache (dcache, this_leaf,1 ,CACHE_TYPE_DATA ); +fill_cpumask_siblings (cpu, &this_leaf->shared_cpu_map);populate_cache (icache, this_leaf,1 ,CACHE_TYPE_INST ); }else {populate_cache (dcache, this_leaf,1 ,CACHE_TYPE_UNIFIED ); } -if (c->scache.waysize) +if (c->scache.waysize) { +/* L2 cache is per cluster */ +fill_cpumask_cluster (cpu, &this_leaf->shared_cpu_map);populate_cache (scache, this_leaf,2 ,CACHE_TYPE_UNIFIED ); + }if (c->tcache.waysize)populate_cache (tcache, this_leaf,3 ,CACHE_TYPE_UNIFIED );
arch/powerpc/platforms/powernv/pci.c +17 -0
@@ -1095,6 +1095,23 @@ void __init pnv_pci_init(void)if (!firmware_has_feature (FW_FEATURE_OPAL ))return ; +#ifdef CONFIG_PCIEPORTBUS +/* +* On PowerNV PCIe devices are (currently) managed in cooperation +* with firmware. This isn't *strictly* required, but there's enough +* assumptions baked into both firmware and the platform code that +* it's unwise to allow the portbus services to be used. +* +* We need to fix this eventually, but for now set this flag to disable +* the portbus driver. The AER service isn't required since that AER +* events are handled via EEH. The pciehp hotplug driver can't work +* without kernel changes (and portbus binding breaks pnv_php). The +* other services also require some thinking about how we're going +* to integrate them. +*/ + pcie_ports_disabled = true; +#endif +/* Look for IODA IO-Hubs. */ for_each_compatible_node (np,NULL ,"ibm,ioda-hub" ) {pnv_pci_init_ioda_hub (np);
drivers/clk/samsung/clk-exynos5420.c +2 -0
@@ -171,6 +171,8 @@ static const unsigned long exynos5x_clk_regs[] __initconst = {GATE_BUS_CPU ,GATE_SCLK_CPU ,CLKOUT_CMU_CPU , +APLL_CON0 , +KPLL_CON0 ,CPLL_CON0 ,DPLL_CON0 , EPLL_CON0,
drivers/crypto/virtio/virtio_crypto_algs.c +9 -0
@@ -449,6 +449,11 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, goto free; }memcpy (iv, req->info, ivsize); +if (!vc_sym_req->encrypt) +scatterwalk_map_and_copy (req->info, req->src, + req->nbytes -AES_BLOCK_SIZE , +AES_BLOCK_SIZE ,0 ); +sg_init_one (&iv_sg, iv, ivsize); sgs[num_out++] = &iv_sg; vc_sym_req->iv = iv;
@@ -585,6 +590,10 @@ static void virtio_crypto_ablkcipher_finalize_req( struct ablkcipher_request *req, int err) { +if (vc_sym_req->encrypt) +scatterwalk_map_and_copy (req->info, req->dst, + req->nbytes -AES_BLOCK_SIZE , +AES_BLOCK_SIZE ,0 );crypto_finalize_ablkcipher_request (vc_sym_req->base.dataq->engine, req, err);kzfree (vc_sym_req->iv);
drivers/dma/ioat/dma.c +2 -1
@@ -388,10 +388,11 @@ ioat_alloc_ring(struct dma_chan *c, int order, gfp_t flags) descs->virt =dma_alloc_coherent (to_dev (ioat_chan),SZ_2M , &descs->hw, flags); -if (!descs->virt && (i >0 )) { +if (!descs->virt) {int idx;for (idx =0 ; idx < i; idx++) { + descs = &ioat_chan->descs[idx];dma_free_coherent (to_dev (ioat_chan),SZ_2M , descs->virt, descs->hw); descs->virt =NULL ;
drivers/dma/k3dma.c +9 -3
@@ -222,9 +222,11 @@ static irqreturn_t k3_dma_int_handler(int irq, void *dev_id) c = p->vchan;if (c && (tc1 &BIT (i))) {spin_lock_irqsave (&c->vc.lock, flags); -vchan_cookie_complete (&p->ds_run->vd); - p->ds_done = p->ds_run; - p->ds_run =NULL ; +if (p->ds_run !=NULL ) { +vchan_cookie_complete (&p->ds_run->vd); + p->ds_done = p->ds_run; + p->ds_run =NULL ; + }spin_unlock_irqrestore (&c->vc.lock, flags); }if (c && (tc2 &BIT (i))) {
@@ -264,6 +266,10 @@ static int k3_dma_start_txd(struct k3_dma_chan *c)if (BIT (c->phy->idx) &k3_dma_get_chan_stat (d))return -EAGAIN ; +/* Avoid losing track of ds_run if a transaction is in flight */ +if (c->phy->ds_run) +return -EAGAIN ; +if (vd) {struct k3_dma_desc_sw *ds = container_of(vd, struct k3_dma_desc_sw, vd);
drivers/gpio/gpio-mpc8xxx.c +1 -0
@@ -317,6 +317,7 @@ static int mpc8xxx_probe(struct platform_device *pdev)return -ENOMEM ; gc = &mpc8xxx_gc->gc; + gc->parent = &pdev->dev;if (of_property_read_bool (np,"little-endian" )) { ret = bgpio_init(gc, &pdev->dev, 4,
drivers/gpio/gpio-zynq.c +5 -3
@@ -639,6 +639,8 @@ static void zynq_gpio_restore_context(struct zynq_gpio *gpio)unsigned int bank_num;for (bank_num =0 ; bank_num < gpio->p_data->max_bank; bank_num++) { +writel_relaxed (ZYNQ_GPIO_IXR_DISABLE_ALL , gpio->base_addr + +ZYNQ_GPIO_INTDIS_OFFSET (bank_num));writel_relaxed (gpio->context.datalsw[bank_num], gpio->base_addr +ZYNQ_GPIO_DATA_LSW_OFFSET (bank_num));
@@ -648,9 +650,6 @@ static void zynq_gpio_restore_context(struct zynq_gpio *gpio)writel_relaxed (gpio->context.dirm[bank_num], gpio->base_addr +ZYNQ_GPIO_DIRM_OFFSET (bank_num)); -writel_relaxed (gpio->context.int_en[bank_num], - gpio->base_addr + -ZYNQ_GPIO_INTEN_OFFSET (bank_num));writel_relaxed (gpio->context.int_type[bank_num], gpio->base_addr +ZYNQ_GPIO_INTTYPE_OFFSET (bank_num));
@@ -660,6 +659,9 @@ static void zynq_gpio_restore_context(struct zynq_gpio *gpio)writel_relaxed (gpio->context.int_any[bank_num], gpio->base_addr +ZYNQ_GPIO_INTANY_OFFSET (bank_num)); +writel_relaxed (~(gpio->context.int_en[bank_num]), + gpio->base_addr + +ZYNQ_GPIO_INTEN_OFFSET (bank_num)); } }
drivers/gpio/gpiolib.c +3 -2
@@ -3757,8 +3757,9 @@ static struct gpio_desc *gpiod_find(struct device *dev, const char *con_id,if (chip->ngpio <= p->chip_hwnum) {dev_err (dev, -"requested GPIO %d is out of range [0..%d] for chip %s\n" , - idx, chip->ngpio, chip->label); +"requested GPIO %u (%u) is out of range [0..%u] for chip %s\n" , + idx, p->chip_hwnum, chip->ngpio -1 , + chip->label);return ERR_PTR (-EINVAL ); }
drivers/gpu/drm/arm/malidp_mw.c +1 -1
@@ -55,7 +55,7 @@ malidp_mw_connector_mode_valid(struct drm_connector *connector,return MODE_OK ; } -const struct drm_connector_helper_funcs malidp_mw_connector_helper_funcs = { +static const struct drm_connector_helper_funcs malidp_mw_connector_helper_funcs = { .get_modes = malidp_mw_connector_get_modes, .mode_valid = malidp_mw_connector_mode_valid, };
drivers/gpu/drm/i915/i915_gem_context.c +7 -6
@@ -770,18 +770,19 @@ int i915_gem_context_destroy_ioctl(struct drm_device *dev, void *data,if (args->ctx_id ==DEFAULT_CONTEXT_HANDLE )return -ENOENT ; + ret =i915_mutex_lock_interruptible (dev); +if (ret) +return ret; + ctx =i915_gem_context_lookup (file_priv, args->ctx_id); -if (!ctx) +if (!ctx) { +mutex_unlock (&dev->struct_mutex);return -ENOENT ; - - ret =mutex_lock_interruptible (&dev->struct_mutex); -if (ret) - goto out; + }__destroy_hw_context (ctx, file_priv);mutex_unlock (&dev->struct_mutex); -out:i915_gem_context_put (ctx);return 0 ; }
drivers/gpu/drm/ttm/ttm_page_alloc.c +4 -4
@@ -732,8 +732,8 @@ static void ttm_put_pages(struct page **pages, unsigned npages, int flags,#ifdef CONFIG_TRANSPARENT_HUGEPAGE if (!(flags &TTM_PAGE_FLAG_DMA32 ) && (npages - i) >=HPAGE_PMD_NR ) { -for (j =0 ; j <HPAGE_PMD_NR ; ++j) -if (p++ != pages[i + j]) +for (j =1 ; j <HPAGE_PMD_NR ; ++j) +if (++p != pages[i + j])break ;if (j ==HPAGE_PMD_NR )
@@ -767,8 +767,8 @@ static void ttm_put_pages(struct page **pages, unsigned npages, int flags,if (!p)break ; -for (j =0 ; j <HPAGE_PMD_NR ; ++j) -if (p++ != pages[i + j]) +for (j =1 ; j <HPAGE_PMD_NR ; ++j) +if (++p != pages[i + j])break ;if (j !=HPAGE_PMD_NR )
drivers/hid/hidraw.c +4 -3
@@ -257,13 +257,14 @@ static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_tstatic __poll_t hidraw_poll (struct file *file,poll_table *wait) {struct hidraw_list *list = file->private_data; +__poll_t mask =EPOLLOUT |EPOLLWRNORM ;/* hidraw is always writable */ poll_wait (file, &list->hidraw->wait, wait);if (list->head != list->tail) -return EPOLLIN |EPOLLRDNORM ; + mask |=EPOLLIN |EPOLLRDNORM ;if (!list->hidraw->exist) -return EPOLLERR |EPOLLHUP ; -return 0 ; + mask |=EPOLLERR |EPOLLHUP ; +return mask; }static int hidraw_open (struct inode *inode,struct file *file)
drivers/hid/uhid.c +3 -2
@@ -769,13 +769,14 @@ static ssize_t uhid_char_write(struct file *file, const char __user *buffer,static __poll_t uhid_char_poll (struct file *file,poll_table *wait) {struct uhid_device *uhid = file->private_data; +__poll_t mask =EPOLLOUT |EPOLLWRNORM ;/* uhid is always writable */ poll_wait (file, &uhid->waitq, wait);if (uhid->head != uhid->tail) -return EPOLLIN |EPOLLRDNORM ; + mask |=EPOLLIN |EPOLLRDNORM ; -return EPOLLOUT |EPOLLWRNORM ; +return mask; }static const struct file_operations uhid_fops = {
drivers/iio/imu/adis16480.c +4 -2
@@ -376,12 +376,14 @@ static int adis16480_get_calibbias(struct iio_dev *indio_dev,case IIO_MAGN :case IIO_PRESSURE : ret =adis_read_reg_16 (&st->adis, reg, &val16); - *bias =sign_extend32 (val16,15 ); +if (ret ==0 ) + *bias =sign_extend32 (val16,15 );break ;case IIO_ANGL_VEL :case IIO_ACCEL : ret =adis_read_reg_32 (&st->adis, reg, &val32); - *bias =sign_extend32 (val32,31 ); +if (ret ==0 ) + *bias =sign_extend32 (val32,31 );break ;default : ret = -EINVAL ;
drivers/infiniband/hw/bnxt_re/ib_verbs.c +4 -2
@@ -1446,7 +1446,7 @@ struct ib_srq *bnxt_re_create_srq(struct ib_pd *ib_pd,dev_err (rdev_to_dev (rdev),"SRQ copy to udata failed!" );bnxt_qplib_destroy_srq (&rdev->qplib_res, &srq->qplib_srq); - goto exit; + goto fail; } }if (nq)
@@ -3368,8 +3368,10 @@ int bnxt_re_dereg_mr(struct ib_mr *ib_mr)int rc; rc =bnxt_qplib_free_mrw (&rdev->qplib_res, &mr->qplib_mr); -if (rc) +if (rc) {dev_err (rdev_to_dev (rdev),"Dereg MR failed: %#x\n" , rc); +return rc; + }if (mr->pages) { rc = bnxt_qplib_free_fast_reg_page_list(&rdev->qplib_res,
drivers/infiniband/hw/bnxt_re/qplib_fp.c +6 -6
@@ -2273,13 +2273,13 @@ static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq,/* Add qp to flush list of the CQ */ bnxt_qplib_add_flush_qp (qp); }else { +/* Before we complete, do WA 9060 */ +if (do_wa9060 (qp, cq, cq_cons, sw_sq_cons, + cqe_sq_cons)) { + *lib_qp = qp; + goto out; + }if (swq->flags &SQ_SEND_FLAGS_SIGNAL_COMP ) { -/* Before we complete, do WA 9060 */ -if (do_wa9060 (qp, cq, cq_cons, sw_sq_cons, - cqe_sq_cons)) { - *lib_qp = qp; - goto out; - } cqe->status =CQ_REQ_STATUS_OK ; cqe++; (*budget)--;
drivers/infiniband/hw/mlx5/mr.c +1 -1
@@ -457,7 +457,7 @@ struct mlx5_ib_mr *mlx5_mr_cache_alloc(struct mlx5_ib_dev *dev, int entry)if (entry <0 || entry >=MAX_MR_CACHE_ENTRIES ) {mlx5_ib_err (dev,"cache entry %d is out of range\n" , entry); -return NULL ; +return ERR_PTR (-EINVAL ); } ent = &cache->ent[entry];
drivers/infiniband/ulp/srpt/ib_srpt.c +24 -0
@@ -1324,9 +1324,11 @@ static int srpt_build_cmd_rsp(struct srpt_rdma_ch *ch, struct srpt_send_ioctx *ioctx, u64 tag, int status) { + struct se_cmd *cmd = &ioctx->cmd;struct srp_rsp *srp_rsp;const u8 *sense_data;int sense_data_len, max_sense_len; +u32 resid = cmd->residual_count;/* * The lowest bit of all SAM-3 status codes is zero (see also
@@ -1348,6 +1350,28 @@ static int srpt_build_cmd_rsp(struct srpt_rdma_ch *ch, srp_rsp->tag = tag; srp_rsp->status = status; +if (cmd->se_cmd_flags &SCF_UNDERFLOW_BIT ) { +if (cmd->data_direction ==DMA_TO_DEVICE ) { +/* residual data from an underflow write */ + srp_rsp->flags =SRP_RSP_FLAG_DOUNDER ; + srp_rsp->data_out_res_cnt =cpu_to_be32 (resid); + }else if (cmd->data_direction ==DMA_FROM_DEVICE ) { +/* residual data from an underflow read */ + srp_rsp->flags =SRP_RSP_FLAG_DIUNDER ; + srp_rsp->data_in_res_cnt =cpu_to_be32 (resid); + } + }else if (cmd->se_cmd_flags &SCF_OVERFLOW_BIT ) { +if (cmd->data_direction ==DMA_TO_DEVICE ) { +/* residual data from an overflow write */ + srp_rsp->flags =SRP_RSP_FLAG_DOOVER ; + srp_rsp->data_out_res_cnt =cpu_to_be32 (resid); + }else if (cmd->data_direction ==DMA_FROM_DEVICE ) { +/* residual data from an overflow read */ + srp_rsp->flags =SRP_RSP_FLAG_DIOVER ; + srp_rsp->data_in_res_cnt =cpu_to_be32 (resid); + } + } +if (sense_data_len) {BUILD_BUG_ON (MIN_MAX_RSP_SIZE <=sizeof (*srp_rsp)); max_sense_len = ch->max_ti_iu_len -sizeof (*srp_rsp);
drivers/iommu/iommu.c +1 -0
@@ -650,6 +650,7 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev)mutex_unlock (&group->mutex); dev->iommu_group =NULL ;kobject_put (group->devices_kobj); +sysfs_remove_link (group->devices_kobj, device->name); err_free_name:kfree (device->name); err_remove_link:
drivers/iommu/mtk_iommu.c +1 -1
@@ -394,7 +394,7 @@ static size_t mtk_iommu_unmap(struct iommu_domain *domain,static void mtk_iommu_iotlb_sync (struct iommu_domain *domain) { -mtk_iommu_tlb_sync (mtk_iommu_get_m4u_data ()); +mtk_iommu_tlb_flush_all (mtk_iommu_get_m4u_data ()); } static phys_addr_t mtk_iommu_iova_to_phys(struct iommu_domain *domain,
drivers/media/i2c/ov6650.c +48 -24
130 lines not on this page · raw message
drivers/media/platform/cadence/cdns-csi2rx.c +1 -1
@@ -129,7 +129,7 @@ static int csi2rx_start(struct csi2rx_priv *csi2rx)*/ for (i = csi2rx->num_lanes; i < csi2rx->max_lanes; i++) {unsigned int idx =find_first_zero_bit (&lanes_used, -sizeof (lanes_used)); + csi2rx->max_lanes);set_bit (idx, &lanes_used); reg |=CSI2RX_STATIC_CFG_DLANE_MAP (i, i +1 ); }
drivers/media/platform/exynos4-is/fimc-isp-video.c +1 -1
@@ -316,7 +316,7 @@ static int isp_video_release(struct file *file) ivc->streaming =0 ; } -vb2_fop_release (file); +_vb2_fop_release (file,NULL );if (v4l2_fh_is_singular_file (file)) {fimc_pipeline_call (&ivc->ve, close);
drivers/media/platform/rcar-vin/rcar-v4l2.c +2 -1
@@ -196,6 +196,7 @@ static int rvin_try_format(struct rvin_dev *vin, u32 which, ret =v4l2_subdev_call (sd, pad, set_fmt, pad_cfg, &format);if (ret <0 && ret != -ENOIOCTLCMD ) goto done; + ret =0 ;v4l2_fill_pix_format (pix, &format.format);
@@ -230,7 +231,7 @@ static int rvin_try_format(struct rvin_dev *vin, u32 which, done:v4l2_subdev_free_pad_config (pad_cfg); -return 0 ; +return ret; } static int rvin_querycap(struct file *file, void *priv,
drivers/media/usb/zr364xx/zr364xx.c +2 -1
@@ -703,7 +703,8 @@ static int zr364xx_vidioc_querycap(struct file *file, void *priv,struct zr364xx_camera *cam =video_drvdata (file);strlcpy (cap->driver,DRIVER_DESC ,sizeof (cap->driver)); -strlcpy (cap->card, cam->udev->product,sizeof (cap->card)); +if (cam->udev->product) +strlcpy (cap->card, cam->udev->product,sizeof (cap->card));strlcpy (cap->bus_info,dev_name (&cam->udev->dev),sizeof (cap->bus_info)); cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
drivers/misc/enclosure.c +1 -2
@@ -419,10 +419,9 @@ int enclosure_remove_device(struct enclosure_device *edev, struct device *dev) cdev = &edev->component[i];if (cdev->dev == dev) {enclosure_remove_links (cdev); -device_del (&cdev->cdev);put_device (dev); cdev->dev =NULL ; -return device_add (&cdev->cdev); +return 0 ; } }return -ENODEV ;
drivers/mtd/nand/onenand/omap2.c +2 -1
@@ -341,7 +341,8 @@ static inline int omap2_onenand_dma_transfer(struct omap2_onenand *c,struct dma_async_tx_descriptor *tx;dma_cookie_t cookie; - tx =dmaengine_prep_dma_memcpy (c->dma_chan, dst, src, count,0 ); + tx =dmaengine_prep_dma_memcpy (c->dma_chan, dst, src, count, +DMA_CTRL_ACK |DMA_PREP_INTERRUPT );if (!tx) {dev_err (&c->pdev->dev,"Failed to prepare DMA memcpy\n" );return -EIO ;
drivers/mtd/spi-nor/spi-nor.c +2 -2
@@ -1294,7 +1294,7 @@ static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) { struct spi_nor *nor = mtd_to_spi_nor(mtd); -int ret; +ssize_t ret;dev_dbg (nor->dev,"from 0x%08x, len %zd\n" , (u32 )from, len);
@@ -1523,7 +1523,7 @@ static int macronix_quad_enable(struct spi_nor *nor)*/ static int write_sr_cr (struct spi_nor *nor,u8 *sr_cr) { -int ret; +ssize_t ret;write_enable (nor);
drivers/net/wireless/intel/iwlwifi/fw/dbg.c +1 -0
@@ -547,6 +547,7 @@ static struct scatterlist *alloc_sgtable(int size)if (new_page)__free_page (new_page); } +kfree (table);return NULL ; } alloc_size =min_t (int, size,PAGE_SIZE );
drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c +25 -11
@@ -102,13 +102,9 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,/* allocate ucode sections in dram and set addresses */ ret =iwl_pcie_init_fw_sec (trans, fw, &prph_scratch->dram); -if (ret) { -dma_free_coherent (trans->dev, -sizeof (*prph_scratch), - prph_scratch, - trans_pcie->prph_scratch_dma_addr); -return ret; - } +if (ret) + goto err_free_prph_scratch; +/* Allocate prph information * currently we don't assign to the prph info anything, but it would get
@@ -116,16 +112,20 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans, prph_info =dma_alloc_coherent (trans->dev,sizeof (*prph_info), &trans_pcie->prph_info_dma_addr,GFP_KERNEL ); -if (!prph_info) -return -ENOMEM ; +if (!prph_info) { + ret = -ENOMEM ; + goto err_free_prph_scratch; + }/* Allocate context info */ ctxt_info_gen3 =dma_alloc_coherent (trans->dev,sizeof (*ctxt_info_gen3), &trans_pcie->ctxt_info_dma_addr,GFP_KERNEL ); -if (!ctxt_info_gen3) -return -ENOMEM ; +if (!ctxt_info_gen3) { + ret = -ENOMEM ; + goto err_free_prph_info; + } ctxt_info_gen3->prph_info_base_addr =cpu_to_le64 (trans_pcie->prph_info_dma_addr);
@@ -176,6 +176,20 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,iwl_set_bit (trans,CSR_GP_CNTRL ,CSR_AUTO_FUNC_INIT );return 0 ; + +err_free_prph_info: +dma_free_coherent (trans->dev, +sizeof (*prph_info), + prph_info, + trans_pcie->prph_info_dma_addr); + +err_free_prph_scratch: +dma_free_coherent (trans->dev, +sizeof (*prph_scratch), + prph_scratch, + trans_pcie->prph_scratch_dma_addr); +return ret; + }void iwl_pcie_ctxt_info_gen3_free (struct iwl_trans *trans)
drivers/net/wireless/realtek/rtlwifi/regd.c +1 -1
@@ -427,7 +427,7 @@ int rtl_regd_init(struct ieee80211_hw *hw,struct wiphy *wiphy = hw->wiphy;struct country_code_to_enum_rd *country =NULL ; -if (wiphy ==NULL || &rtlpriv->regd ==NULL ) +if (!wiphy)return -EINVAL ;/* init country_code from efuse channel plan */
drivers/pci/controller/dwc/pcie-designware-host.c +6 -5
@@ -78,7 +78,8 @@ static struct msi_domain_info dw_pcie_msi_domain_info = {irqreturn_t dw_handle_msi_irq (struct pcie_port *pp) {int i, pos, irq; -u32 val, num_ctrls; +unsigned long val; +u32 status, num_ctrls;irqreturn_t ret =IRQ_NONE ; num_ctrls = pp->num_vectors /MAX_MSI_IRQS_PER_CTRL ;
@@ -86,14 +87,14 @@ irqreturn_t dw_handle_msi_irq(struct pcie_port *pp)for (i =0 ; i < num_ctrls; i++) {dw_pcie_rd_own_conf (pp,PCIE_MSI_INTR0_STATUS + (i *MSI_REG_CTRL_BLOCK_SIZE ), -4 , &val); -if (!val) +4 , &status); +if (!status)continue ; ret =IRQ_HANDLED ; + val = status; pos =0 ; -while ((pos =find_next_bit ((unsigned long *) &val, -MAX_MSI_IRQS_PER_CTRL , +while ((pos =find_next_bit (&val,MAX_MSI_IRQS_PER_CTRL , pos)) !=MAX_MSI_IRQS_PER_CTRL ) { irq = irq_find_mapping(pp->irq_domain, (i * MAX_MSI_IRQS_PER_CTRL) +
drivers/pci/pcie/ptm.c +1 -1
@@ -21,7 +21,7 @@ static void pci_ptm_info(struct pci_dev *dev)snprintf (clock_desc,sizeof (clock_desc),">254ns" );break ;default : -snprintf (clock_desc,sizeof (clock_desc),"%udns" , +snprintf (clock_desc,sizeof (clock_desc),"%uns" , dev->ptm_granularity);break ; }
drivers/pinctrl/intel/pinctrl-lewisburg.c +86 -85
195 lines not on this page · raw message
drivers/pinctrl/ti/pinctrl-ti-iodelay.c +1 -1
@@ -496,7 +496,7 @@ static int ti_iodelay_dt_node_to_map(struct pinctrl_dev *pctldev,return -EINVAL ; rows =pinctrl_count_index_with_args (np, name); -if (rows == -EINVAL ) +if (rows <0 )return rows; *map =devm_kzalloc (iod->dev,sizeof (**map),GFP_KERNEL );
drivers/platform/x86/asus-wmi.c +1 -7
@@ -463,13 +463,7 @@ static void kbd_led_update(struct work_struct *work) asus = container_of(work, struct asus_wmi, kbd_led_work); -/* -* bits 0-2: level -* bit 7: light on/off -*/ -if (asus->kbd_led_wk >0 ) - ctrl_param =0x80 | (asus->kbd_led_wk &0x7F ); - + ctrl_param =0x80 | (asus->kbd_led_wk &0x7F );asus_wmi_set_devstate (ASUS_WMI_DEVID_KBD_BACKLIGHT , ctrl_param,NULL );led_classdev_notify_brightness_hw_changed (&asus->kbd_led, asus->kbd_led_wk); }
drivers/platform/x86/gpd-pocket-fan.c +19 -6
@@ -16,17 +16,27 @@#define MAX_SPEED 3 -static int temp_limits[3 ] = {55000 ,60000 ,65000 }; +#define TEMP_LIMIT0_DEFAULT 55000 +#define TEMP_LIMIT1_DEFAULT 60000 +#define TEMP_LIMIT2_DEFAULT 65000 + +#define HYSTERESIS_DEFAULT 3000 + +#define SPEED_ON_AC_DEFAULT 2 + +static int temp_limits[3 ] = { +TEMP_LIMIT0_DEFAULT ,TEMP_LIMIT1_DEFAULT ,TEMP_LIMIT2_DEFAULT , +};module_param_array (temp_limits, int,NULL ,0444 );MODULE_PARM_DESC (temp_limits,"Millicelsius values above which the fan speed increases" ); -static int hysteresis =3000 ; +static int hysteresis =HYSTERESIS_DEFAULT ;module_param (hysteresis, int,0444 );MODULE_PARM_DESC (hysteresis,"Hysteresis in millicelsius before lowering the fan speed" ); -static int speed_on_ac =2 ; +static int speed_on_ac =SPEED_ON_AC_DEFAULT ;module_param (speed_on_ac, int,0444 );MODULE_PARM_DESC (speed_on_ac,"minimum fan speed to allow when system is powered by AC" );
@@ -120,18 +130,21 @@ static int gpd_pocket_fan_probe(struct platform_device *pdev)if (temp_limits[i] <40000 || temp_limits[i] >70000 ) {dev_err (&pdev->dev,"Invalid temp-limit %d (must be between 40000 and 70000)\n" , temp_limits[i]); -return -EINVAL ; + temp_limits[0 ] =TEMP_LIMIT0_DEFAULT ; + temp_limits[1 ] =TEMP_LIMIT1_DEFAULT ; + temp_limits[2 ] =TEMP_LIMIT2_DEFAULT ; +break ; } }if (hysteresis <1000 || hysteresis >10000 ) {dev_err (&pdev->dev,"Invalid hysteresis %d (must be between 1000 and 10000)\n" , hysteresis); -return -EINVAL ; + hysteresis =HYSTERESIS_DEFAULT ; }if (speed_on_ac <0 || speed_on_ac >MAX_SPEED ) {dev_err (&pdev->dev,"Invalid speed_on_ac %d (must be between 0 and 3)\n" , speed_on_ac); -return -EINVAL ; + speed_on_ac =SPEED_ON_AC_DEFAULT ; } fan =devm_kzalloc (&pdev->dev,sizeof (*fan),GFP_KERNEL );
drivers/rtc/rtc-brcmstb-waketimer.c +1 -0
@@ -287,6 +287,7 @@ static int brcmstb_waketmr_remove(struct platform_device *pdev)struct brcmstb_waketmr *timer =dev_get_drvdata (&pdev->dev);unregister_reboot_notifier (&timer->reboot_notifier); +clk_disable_unprepare (timer->clk);return 0 ; }
drivers/rtc/rtc-msm6242.c +2 -1
@@ -132,7 +132,8 @@ static int msm6242_read_time(struct device *dev, struct rtc_time *tm)msm6242_read (priv,MSM6242_SECOND1 ); tm->tm_min =msm6242_read (priv,MSM6242_MINUTE10 ) *10 +msm6242_read (priv,MSM6242_MINUTE1 ); - tm->tm_hour = (msm6242_read (priv,MSM6242_HOUR10 &3 )) *10 + + tm->tm_hour = (msm6242_read (priv,MSM6242_HOUR10 ) & +MSM6242_HOUR10_HR_MASK ) *10 +msm6242_read (priv,MSM6242_HOUR1 ); tm->tm_mday =msm6242_read (priv,MSM6242_DAY10 ) *10 +msm6242_read (priv,MSM6242_DAY1 );
drivers/rtc/rtc-mt6397.c +33 -14
72 lines not on this page · raw message
drivers/s390/net/qeth_l2_main.c +1 -3
@@ -2285,8 +2285,7 @@ int qeth_l2_vnicc_get_timeout(struct qeth_card *card, u32 *timeout)/* check if VNICC is currently enabled */ bool qeth_l2_vnicc_is_in_use (struct qeth_card *card) { -/* if everything is turned off, VNICC is not active */ -if (!card->options.vnicc.cur_chars) +if (!card->options.vnicc.sup_chars)return false;/* default values are only OK if rx_bcast was not enabled by user * or the card is offline.
@@ -2367,7 +2366,6 @@ static void qeth_l2_vnicc_init(struct qeth_card *card) error =qeth_l2_vnicc_recover_timeout (card,QETH_VNICC_LEARNING , timeout); chars_tmp = card->options.vnicc.wanted_chars ^QETH_VNICC_DEFAULT ; - chars_tmp |=QETH_VNICC_BRIDGE_INVISIBLE ; chars_len =sizeof (card->options.vnicc.wanted_chars) *BITS_PER_BYTE ;for_each_set_bit (i, &chars_tmp, chars_len) { vnicc =BIT (i);
drivers/scsi/cxgbi/libcxgbi.c +2 -1
@@ -121,7 +121,8 @@ static inline void cxgbi_device_destroy(struct cxgbi_device *cdev) "cdev 0x%p, p# %u.\n", cdev, cdev->nports);cxgbi_hbas_remove (cdev);cxgbi_device_portmap_cleanup (cdev); -cxgbi_ppm_release (cdev->cdev2ppm (cdev)); +if (cdev->cdev2ppm) +cxgbi_ppm_release (cdev->cdev2ppm (cdev));if (cdev->pmap.max_connect)cxgbi_free_big_mem (cdev->pmap.port_csk);kfree (cdev);
drivers/scsi/sd.c +15 -3
@@ -1685,20 +1685,30 @@ static void sd_rescan(struct device *dev)static int sd_compat_ioctl (struct block_device *bdev,fmode_t mode,unsigned int cmd,unsigned long arg) { -struct scsi_device *sdev =scsi_disk (bdev->bd_disk)->device; +struct gendisk *disk = bdev->bd_disk; +struct scsi_disk *sdkp =scsi_disk (disk); +struct scsi_device *sdev = sdkp->device; +void __user *p =compat_ptr (arg);int error; + error =scsi_verify_blk_ioctl (bdev, cmd); +if (error <0 ) +return error; + error =scsi_ioctl_block_when_processing_errors (sdev, cmd, (mode &FMODE_NDELAY ) !=0 );if (error)return error; + +if (is_sed_ioctl (cmd)) +return sed_ioctl (sdkp->opal_dev, cmd, p);/* * Let the static ioctl translation table take care of it. */ if (!sdev->host->hostt->compat_ioctl)return -ENOIOCTLCMD ; -return sdev->host->hostt->compat_ioctl (sdev, cmd, (void __user *)arg); +return sdev->host->hostt->compat_ioctl (sdev, cmd, p); }#endif
@@ -2195,8 +2205,10 @@ static int sd_read_protection_type(struct scsi_disk *sdkp, unsigned char *bufferu8 type;int ret =0 ; -if (scsi_device_protection (sdp) ==0 || (buffer[12 ] &1 ) ==0 ) +if (scsi_device_protection (sdp) ==0 || (buffer[12 ] &1 ) ==0 ) { + sdkp->protection_type =0 ;return ret; + } type = ((buffer[12 ] >>1 ) &7 ) +1 ;/* P_TYPE 0 = Type 1 */
drivers/spi/spi-atmel.c +3 -7
@@ -305,7 +305,6 @@ struct atmel_spi {bool use_cs_gpios;bool keep_cs; -bool cs_active;u32 fifo_size; };
@@ -1381,11 +1380,9 @@ static int atmel_spi_one_transfer(struct spi_master *master, &msg->transfers)) { as->keep_cs = true; }else { - as->cs_active = !as->cs_active; -if (as->cs_active) -cs_activate (as, msg->spi); -else -cs_deactivate (as, msg->spi); +cs_deactivate (as, msg->spi); +udelay (10 ); +cs_activate (as, msg->spi); } }
@@ -1408,7 +1405,6 @@ static int atmel_spi_transfer_one_message(struct spi_master *master,atmel_spi_lock (as);cs_activate (as, spi); - as->cs_active = true; as->keep_cs = false; msg->status =0 ;
drivers/tty/serial/imx.c +1 -1
@@ -624,7 +624,7 @@ static void imx_uart_dma_tx(struct imx_port *sport)dev_err (dev,"DMA mapping error for TX.\n" );return ; } - desc =dmaengine_prep_slave_sg (chan, sgl, sport->dma_tx_nents, + desc =dmaengine_prep_slave_sg (chan, sgl, ret,DMA_MEM_TO_DEV ,DMA_PREP_INTERRUPT );if (!desc) { dma_unmap_sg(dev, sgl, sport->dma_tx_nents,
drivers/tty/serial/pch_uart.c +4 -1
@@ -235,6 +235,7 @@ struct eg20t_port {struct dma_chan *chan_rx;struct scatterlist *sg_tx_p;int nent; +int orig_nent;struct scatterlist sg_rx;int tx_dma_use;void *rx_buf_virt;
@@ -789,9 +790,10 @@ static void pch_dma_tx_complete(void *arg) } xmit->tail &=UART_XMIT_SIZE -1 ;async_tx_ack (priv->desc_tx); -dma_unmap_sg (port->dev, sg, priv->nent,DMA_TO_DEVICE ); +dma_unmap_sg (port->dev, sg, priv->orig_nent,DMA_TO_DEVICE ); priv->tx_dma_use =0 ; priv->nent =0 ; + priv->orig_nent =0 ;kfree (priv->sg_tx_p);pch_uart_hal_enable_interrupt (priv,PCH_UART_HAL_TX_INT ); }
@@ -1015,6 +1017,7 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)dev_err (priv->port.dev,"%s:dma_map_sg Failed\n" , __func__);return 0 ; } + priv->orig_nent = num; priv->nent = nent;for (i =0 ; i < nent; i++, sg++) {
fs/afs/super.c +1 -0
@@ -356,6 +356,7 @@ static int afs_test_super(struct super_block *sb, void *data)return (as->net_ns == as1->net_ns && as->volume && as->volume->vid == as1->volume->vid && + as->cell == as1->cell && !as->dyn_root); }
fs/btrfs/file.c +3 -2
@@ -1903,9 +1903,10 @@ static ssize_t btrfs_file_write_iter(struct kiocb *iocb, (iocb->ki_flags & IOCB_NOWAIT))return -EOPNOTSUPP ; -if (!inode_trylock (inode)) { -if (iocb->ki_flags &IOCB_NOWAIT ) +if (iocb->ki_flags &IOCB_NOWAIT ) { +if (!inode_trylock (inode))return -EAGAIN ; + }else {inode_lock (inode); }
fs/cifs/smb2file.c +1 -1
@@ -67,7 +67,7 @@ smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms, goto out; -if (oparms->tcon->use_resilient) { +if (oparms->tcon->use_resilient) { nr_ioctl_req.Timeout =0 ;/* use server default (120 seconds) */ nr_ioctl_req.Reserved =0 ; rc = SMB2_ioctl(xid, oparms->tcon, fid->persistent_fid,
fs/f2fs/data.c +1 -1
@@ -1857,7 +1857,7 @@ static int __write_data_page(struct page *page, bool *submitted,loff_t i_size =i_size_read (inode);const pgoff_t end_index = ((unsigned long long ) i_size) >>PAGE_SHIFT ; -loff_t psize = (page->index +1 ) <<PAGE_SHIFT ; +loff_t psize = (loff_t)(page->index +1 ) <<PAGE_SHIFT ;unsigned offset =0 ;bool need_balance_fs = false;int err =0 ;
fs/f2fs/dir.c +15 -3
@@ -785,6 +785,7 @@ int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d,struct f2fs_dir_entry *de =NULL ;struct fscrypt_str de_name =FSTR_INIT (NULL ,0 );struct f2fs_sb_info *sbi =F2FS_I_SB (d->inode); +int err =0 ; bit_pos = ((unsigned long )ctx->pos % d->max);
@@ -805,9 +806,20 @@ int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d, de_name.name = d->filename[bit_pos]; de_name.len =le16_to_cpu (de->name_len); +/* check memory boundary before moving forward */ + bit_pos +=GET_DENTRY_SLOTS (le16_to_cpu (de->name_len)); +if (unlikely (bit_pos > d->max || +le16_to_cpu (de->name_len) >F2FS_NAME_LEN )) { +f2fs_msg (sbi->sb,KERN_WARNING , +"%s: corrupted namelen=%d, run fsck to fix." , + __func__,le16_to_cpu (de->name_len)); +set_sbi_flag (sbi,SBI_NEED_FSCK ); + err = -EINVAL ; + goto out; + } +if (f2fs_encrypted_inode (d->inode)) {int save_len = fstr->len; -int err; err = fscrypt_fname_disk_to_usr(d->inode, (u32)de->hash_code, 0,
@@ -826,10 +838,10 @@ int f2fs_fill_dentries(struct dir_context *ctx, struct f2fs_dentry_ptr *d,if (sbi->readdir_ra ==1 )f2fs_ra_node_page (sbi,le32_to_cpu (de->ino)); - bit_pos +=GET_DENTRY_SLOTS (le16_to_cpu (de->name_len)); ctx->pos = start_pos + bit_pos; } -return 0 ; +out: +return err; }static int f2fs_readdir (struct file *file,struct dir_context *ctx)
fs/f2fs/file.c +1 -1
@@ -1101,7 +1101,7 @@ static int __clone_blkaddrs(struct inode *src_inode, struct inode *dst_inode, } dn.ofs_in_node++; i++; - new_size = (dst + i) <<PAGE_SHIFT ; + new_size = (loff_t)(dst + i) <<PAGE_SHIFT ;if (dst_inode->i_size < new_size)f2fs_i_size_write (dst_inode, new_size); }while (--ilen && (do_replace[i] || blkaddr[i] ==NULL_ADDR ));
fs/nfs/nfs2xdr.c +1 -1
@@ -385,7 +385,7 @@ static void encode_sattr(struct xdr_stream *xdr, const struct iattr *attr) }else p =xdr_time_not_set (p);if (attr->ia_valid &ATTR_MTIME_SET ) { - ts =timespec64_to_timespec (attr->ia_atime); + ts =timespec64_to_timespec (attr->ia_mtime);xdr_encode_time (p, &ts); }else if (attr->ia_valid &ATTR_MTIME ) { ts =timespec64_to_timespec (attr->ia_mtime);
fs/nfs/nfs4proc.c +3 -1
@@ -6103,8 +6103,10 @@ static void nfs4_delegreturn_prepare(struct rpc_task *task, void *data) d_data = (struct nfs4_delegreturndata *)data; -if (!d_data->lr.roc &&nfs4_wait_on_layoutreturn (d_data->inode, task)) +if (!d_data->lr.roc &&nfs4_wait_on_layoutreturn (d_data->inode, task)) { +nfs4_sequence_done (task, &d_data->res.seq_res);return ; + } lo = d_data->args.lr_args ? d_data->args.lr_args->layout :NULL ;if (lo && !pnfs_layout_is_valid (lo)) {
fs/ocfs2/journal.c +8 -0
@@ -1080,6 +1080,14 @@ int ocfs2_journal_load(struct ocfs2_journal *journal, int local, int replayed)ocfs2_clear_journal_error (osb->sb, journal->j_journal, osb->slot_num); +if (replayed) { +jbd2_journal_lock_updates (journal->j_journal); + status =jbd2_journal_flush (journal->j_journal); +jbd2_journal_unlock_updates (journal->j_journal); +if (status <0 ) +mlog_errno (status); + } + status =ocfs2_journal_toggle_dirty (osb,1 , replayed);if (status <0 ) {mlog_errno (status);
include/linux/poll.h +4 -0
@@ -16,7 +16,11 @@extern struct ctl_table epoll_table[];/* for sysctl */ /* ~832 bytes of stack space used max in sys_select/sys_poll before allocating additional memory. */ +#ifdef __clang__ +#define MAX_STACK_ALLOC 768 +#else #define MAX_STACK_ALLOC 832 +#endif #define FRONTEND_STACK_ALLOC 256#define SELECT_STACK_ALLOC FRONTEND_STACK_ALLOC#define POLL_STACK_ALLOC FRONTEND_STACK_ALLOC
include/net/cfg80211.h +11 -0
@@ -4733,6 +4733,17 @@ static inline const u8 *cfg80211_find_ext_ie(u8 ext_eid, const u8 *ies, int len)const u8 *cfg80211_find_vendor_ie (unsigned int oui,int oui_type,const u8 *ies,int len); +/** +* cfg80211_send_layer2_update - send layer 2 update frame +* +* @dev: network device +* @addr: STA MAC address +* +* Wireless drivers can use this function to update forwarding tables in bridge +* devices upon STA association. +*/ +void cfg80211_send_layer2_update (struct net_device *dev,const u8 *addr); +/** * DOC: Regulatory enforcement infrastructure *
net/core/ethtool.c +9 -7
@@ -2413,9 +2413,10 @@ static int ethtool_set_tunable(struct net_device *dev, void __user *useraddr)return ret; } -static int ethtool_get_per_queue_coalesce (struct net_device *dev, -void __user *useraddr, -struct ethtool_per_queue_op *per_queue_opt) +static noinline_for_stack int +ethtool_get_per_queue_coalesce (struct net_device *dev, +void __user *useraddr, +struct ethtool_per_queue_op *per_queue_opt) {u32 bit;int ret;
@@ -2443,9 +2444,10 @@ static int ethtool_get_per_queue_coalesce(struct net_device *dev,return 0 ; } -static int ethtool_set_per_queue_coalesce (struct net_device *dev, -void __user *useraddr, -struct ethtool_per_queue_op *per_queue_opt) +static noinline_for_stack int +ethtool_set_per_queue_coalesce (struct net_device *dev, +void __user *useraddr, +struct ethtool_per_queue_op *per_queue_opt) {u32 bit;int i, ret =0 ;
@@ -2499,7 +2501,7 @@ static int ethtool_set_per_queue_coalesce(struct net_device *dev,return ret; } -static int ethtool_set_per_queue (struct net_device *dev, +static int noinline_for_stack ethtool_set_per_queue(struct net_device *dev,void __user *useraddr,u32 sub_cmd) {struct ethtool_per_queue_op per_queue_opt;
net/dccp/feat.c +6 -1
@@ -738,7 +738,12 @@ static int __feat_register_sp(struct list_head *fn, u8 feat, u8 is_local,if (dccp_feat_clone_sp_val (&fval, sp_val, sp_len))return -ENOMEM ; -return dccp_feat_push_change (fn, feat, is_local, mandatory, &fval); +if (dccp_feat_push_change (fn, feat, is_local, mandatory, &fval)) { +kfree (fval.sp.vec); +return -ENOMEM ; + } + +return 0 ; }/**
net/hsr/hsr_device.c +2 -0
@@ -281,6 +281,8 @@ static void send_hsr_supervision_frame(struct hsr_port *master, skb->dev->dev_addr, skb->len) <= 0) goto out;skb_reset_mac_header (skb); +skb_reset_network_header (skb); +skb_reset_transport_header (skb);if (hsrVer >0 ) { hsr_tag =skb_put (skb,sizeof (struct hsr_tag ));
net/mac80211/cfg.c +4 -54
89 lines not on this page · raw message
net/mac80211/sta_info.c +4 -0
@@ -1906,6 +1906,10 @@ int sta_info_move_state(struct sta_info *sta,ieee80211_check_fast_xmit (sta);ieee80211_check_fast_rx (sta); } +if (sta->sdata->vif.type ==NL80211_IFTYPE_AP_VLAN || + sta->sdata->vif.type ==NL80211_IFTYPE_AP ) +cfg80211_send_layer2_update (sta->sdata->dev, + sta->sta.addr);break ;default :break ;
net/socket.c +1 -0
@@ -3240,6 +3240,7 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,case SIOCSARP :case SIOCGARP :case SIOCDARP : +case SIOCOUTQNSD :case SIOCATMARK :return sock_do_ioctl (net, sock, cmd, arg); }
net/sunrpc/xprtrdma/verbs.c +1 -1
@@ -248,6 +248,7 @@ rpcrdma_conn_upcall(struct rdma_cm_id *id, struct rdma_cm_event *event) ia->ri_device->name, rpcrdma_addrstr(xprt), rpcrdma_portstr(xprt));#endif +init_completion (&ia->ri_remove_done);set_bit (RPCRDMA_IAF_REMOVING , &ia->ri_flags); ep->rep_connected = -ENODEV ;xprt_force_disconnect (&xprt->rx_xprt);
@@ -306,7 +307,6 @@ rpcrdma_create_id(struct rpcrdma_xprt *xprt, struct rpcrdma_ia *ia)trace_xprtrdma_conn_start (xprt);init_completion (&ia->ri_done); -init_completion (&ia->ri_remove_done); id =rdma_create_id (xprt->rx_xprt.xprt_net, rpcrdma_conn_upcall, xprt,RDMA_PS_TCP ,IB_QPT_RC );
net/unix/af_unix.c +19 -0
@@ -649,6 +649,9 @@ static __poll_t unix_poll(struct file *, struct socket *, poll_table *);static __poll_t unix_dgram_poll (struct file *,struct socket *,poll_table *);static int unix_ioctl (struct socket *,unsigned int ,unsigned long ); +#ifdef CONFIG_COMPAT +static int unix_compat_ioctl (struct socket *sock,unsigned int cmd,unsigned long arg); +#endif static int unix_shutdown (struct socket *,int );static int unix_stream_sendmsg (struct socket *,struct msghdr *,size_t );static int unix_stream_recvmsg (struct socket *,struct msghdr *,size_t ,int );
@@ -690,6 +693,9 @@ static const struct proto_ops unix_stream_ops = { .getname = unix_getname, .poll = unix_poll, .ioctl = unix_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = unix_compat_ioctl, +#endif .listen = unix_listen, .shutdown = unix_shutdown, .setsockopt = sock_no_setsockopt,
@@ -713,6 +719,9 @@ static const struct proto_ops unix_dgram_ops = { .getname = unix_getname, .poll = unix_dgram_poll, .ioctl = unix_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = unix_compat_ioctl, +#endif .listen = sock_no_listen, .shutdown = unix_shutdown, .setsockopt = sock_no_setsockopt,
@@ -735,6 +744,9 @@ static const struct proto_ops unix_seqpacket_ops = { .getname = unix_getname, .poll = unix_dgram_poll, .ioctl = unix_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = unix_compat_ioctl, +#endif .listen = unix_listen, .shutdown = unix_shutdown, .setsockopt = sock_no_setsockopt,
@@ -2646,6 +2658,13 @@ static int unix_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)return err; } +#ifdef CONFIG_COMPAT +static int unix_compat_ioctl (struct socket *sock,unsigned int cmd,unsigned long arg) +{ +return unix_ioctl (sock, cmd, (unsigned long )compat_ptr (arg)); +} +#endif +static __poll_t unix_poll (struct file *file,struct socket *sock,poll_table *wait) {struct sock *sk = sock->sk;
net/wireless/util.c +45 -0
48 lines not on this page · raw message
sound/soc/soc-core.c +2 -0
@@ -1921,6 +1921,8 @@ static void soc_check_tplg_fes(struct snd_soc_card *card)/* convert non BE into BE */ dai_link->no_pcm =1 ; + dai_link->dpcm_playback =1 ; + dai_link->dpcm_capture =1 ;/* override any BE fixups */ dai_link->be_hw_params_fixup =
sound/soc/stm/stm32_spdifrx.c +26 -10
@@ -213,6 +213,7 @@* @slave_config: dma slave channel runtime config pointer * @phys_addr: SPDIFRX registers physical base address * @lock: synchronization enabling lock +* @irq_lock: prevent race condition with IRQ on stream state * @cs: channel status buffer * @ub: user data buffer * @irq: SPDIFRX interrupt line
@@ -233,6 +234,7 @@ struct stm32_spdifrx_data {struct dma_slave_config slave_config;dma_addr_t phys_addr;spinlock_t lock;/* Sync enabling lock */ +spinlock_t irq_lock;/* Prevent race condition on stream state */ unsigned char cs[SPDIFRX_CS_BYTES_NB ];unsigned char ub[SPDIFRX_UB_BYTES_NB ];int irq;
@@ -313,6 +315,7 @@ static void stm32_spdifrx_dma_ctrl_stop(struct stm32_spdifrx_data *spdifrx)static int stm32_spdifrx_start_sync (struct stm32_spdifrx_data *spdifrx) {int cr, cr_mask, imr, ret; +unsigned long flags;/* Enable IRQs */ imr =SPDIFRX_IMR_IFEIE |SPDIFRX_IMR_SYNCDIE |SPDIFRX_IMR_PERRIE ;
@@ -320,7 +323,7 @@ static int stm32_spdifrx_start_sync(struct stm32_spdifrx_data *spdifrx)if (ret)return ret; -spin_lock (&spdifrx->lock); +spin_lock_irqsave (&spdifrx->lock, flags); spdifrx->refcount++;
@@ -353,7 +356,7 @@ static int stm32_spdifrx_start_sync(struct stm32_spdifrx_data *spdifrx) "Failed to start synchronization\n"); } -spin_unlock (&spdifrx->lock); +spin_unlock_irqrestore (&spdifrx->lock, flags);return ret; }
@@ -361,11 +364,12 @@ static int stm32_spdifrx_start_sync(struct stm32_spdifrx_data *spdifrx)static void stm32_spdifrx_stop (struct stm32_spdifrx_data *spdifrx) {int cr, cr_mask, reg; +unsigned long flags; -spin_lock (&spdifrx->lock); +spin_lock_irqsave (&spdifrx->lock, flags);if (--spdifrx->refcount) { -spin_unlock (&spdifrx->lock); +spin_unlock_irqrestore (&spdifrx->lock, flags);return ; }
@@ -384,7 +388,7 @@ static void stm32_spdifrx_stop(struct stm32_spdifrx_data *spdifrx)regmap_read (spdifrx->regmap,STM32_SPDIFRX_DR , ®);regmap_read (spdifrx->regmap,STM32_SPDIFRX_CSR , ®); -spin_unlock (&spdifrx->lock); +spin_unlock_irqrestore (&spdifrx->lock, flags); } static int stm32_spdifrx_dma_ctrl_register(struct device *dev,
@@ -643,7 +647,6 @@ static const struct regmap_config stm32_h7_spdifrx_regmap_conf = {static irqreturn_t stm32_spdifrx_isr (int irq,void *devid) {struct stm32_spdifrx_data *spdifrx = (struct stm32_spdifrx_data *)devid; -struct snd_pcm_substream *substream = spdifrx->substream;struct platform_device *pdev = spdifrx->pdev;unsigned int cr, mask, sr, imr;unsigned int flags;
@@ -711,14 +714,19 @@ static irqreturn_t stm32_spdifrx_isr(int irq, void *devid)regmap_update_bits (spdifrx->regmap,STM32_SPDIFRX_CR ,SPDIFRX_CR_SPDIFEN_MASK , cr); -if (substream) -snd_pcm_stop (substream,SNDRV_PCM_STATE_DISCONNECTED ); +spin_lock (&spdifrx->irq_lock); +if (spdifrx->substream) +snd_pcm_stop (spdifrx->substream, +SNDRV_PCM_STATE_DISCONNECTED ); +spin_unlock (&spdifrx->irq_lock);return IRQ_HANDLED ; } -if (err_xrun && substream) -snd_pcm_stop_xrun (substream); +spin_lock (&spdifrx->irq_lock); +if (err_xrun && spdifrx->substream) +snd_pcm_stop_xrun (spdifrx->substream); +spin_unlock (&spdifrx->irq_lock);return IRQ_HANDLED ; }
@@ -727,9 +735,12 @@ static int stm32_spdifrx_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) {struct stm32_spdifrx_data *spdifrx =snd_soc_dai_get_drvdata (cpu_dai); +unsigned long flags;int ret; +spin_lock_irqsave (&spdifrx->irq_lock, flags); spdifrx->substream = substream; +spin_unlock_irqrestore (&spdifrx->irq_lock, flags); ret =clk_prepare_enable (spdifrx->kclk);if (ret)
@@ -805,8 +816,12 @@ static void stm32_spdifrx_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *cpu_dai) {struct stm32_spdifrx_data *spdifrx =snd_soc_dai_get_drvdata (cpu_dai); +unsigned long flags; +spin_lock_irqsave (&spdifrx->irq_lock, flags); spdifrx->substream =NULL ; +spin_unlock_irqrestore (&spdifrx->irq_lock, flags); +clk_disable_unprepare (spdifrx->kclk); }
@@ -910,6 +925,7 @@ static int stm32_spdifrx_probe(struct platform_device *pdev) spdifrx->pdev = pdev;init_completion (&spdifrx->cs_completion);spin_lock_init (&spdifrx->lock); +spin_lock_init (&spdifrx->irq_lock);platform_set_drvdata (pdev, spdifrx);
tools/testing/selftests/firmware/fw_lib.sh +6 -0
@@ -28,6 +28,12 @@ test_modprobe() check_mods() { + local uid=$(id -u) + if [ $uid -ne 0 ]; then + echo "skip all tests: must be run as root" >&2 + exit $ksft_skip + fi + trap "test_modprobe" EXIT if [ ! -d $DIR ]; then modprobe test_firmware
tools/testing/selftests/rseq/settings new file +1 -0
@@ -0,0 +1 @@ +timeout=0