5.4.86-rc1 review
Subsystems (10)
Greg Kroah-Hartman
maintainerPATCH 31/453 i40e: Refactor rx_bi accesses
In reply to Greg Kroah-HartmanFrom: Bj?rn T?pel <[email protected]>
[ Upstream commit e1675f97367bed74d4dcfe08de9ce9b5d6b288c1 ]
As a first step to migrate i40e to the new MEM_TYPE_XSK_BUFF_POOL APIs, code that accesses the rx_bi (SW/shadow ring) is refactored to use an accessor function.
--- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 17 +++++++++++------ drivers/net/ethernet/intel/i40e/i40e_xsk.c | 18 ++++++++++++------ 2 files changed, 23 insertions(+), 12 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +11 -6
@@ -1195,6 +1195,11 @@ static void i40e_update_itr(struct i40e_q_vector *q_vector, rc->total_packets =0 ; } +static struct i40e_rx_buffer *i40e_rx_bi (struct i40e_ring *rx_ring,u32 idx) +{ +return &rx_ring->rx_bi[idx]; +} +/** * i40e_reuse_rx_page - page flip buffer and store it back on the ring * @rx_ring: rx descriptor ring to store buffers on
@@ -1208,7 +1213,7 @@ static void i40e_reuse_rx_page(struct i40e_ring *rx_ring,struct i40e_rx_buffer *new_buff;u16 nta = rx_ring->next_to_alloc; - new_buff = &rx_ring->rx_bi[nta]; + new_buff =i40e_rx_bi (rx_ring, nta);/* update, and store next to alloc */ nta++;
@@ -1272,7 +1277,7 @@ struct i40e_rx_buffer *i40e_clean_programming_status( ntc = rx_ring->next_to_clean;/* fetch, update, and store next to clean */ - rx_buffer = &rx_ring->rx_bi[ntc++]; + rx_buffer =i40e_rx_bi (rx_ring, ntc++); ntc = (ntc < rx_ring->count) ? ntc :0 ; rx_ring->next_to_clean = ntc;
@@ -1361,7 +1366,7 @@ void i40e_clean_rx_ring(struct i40e_ring *rx_ring)/* Free all the Rx ring sk_buffs */ for (i =0 ; i < rx_ring->count; i++) { -struct i40e_rx_buffer *rx_bi = &rx_ring->rx_bi[i]; +struct i40e_rx_buffer *rx_bi =i40e_rx_bi (rx_ring, i);if (!rx_bi->page)continue ;
@@ -1576,7 +1581,7 @@ bool i40e_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count)return false; rx_desc =I40E_RX_DESC (rx_ring, ntu); - bi = &rx_ring->rx_bi[ntu]; + bi =i40e_rx_bi (rx_ring, ntu); do { if (!i40e_alloc_mapped_page(rx_ring, bi))
@@ -1598,7 +1603,7 @@ bool i40e_alloc_rx_buffers(struct i40e_ring *rx_ring, u16 cleaned_count) ntu++;if (unlikely (ntu == rx_ring->count)) { rx_desc =I40E_RX_DESC (rx_ring,0 ); - bi = rx_ring->rx_bi; + bi =i40e_rx_bi (rx_ring,0 ); ntu =0 ; }
@@ -1965,7 +1970,7 @@ static struct i40e_rx_buffer *i40e_get_rx_buffer(struct i40e_ring *rx_ring, {struct i40e_rx_buffer *rx_buffer; - rx_buffer = &rx_ring->rx_bi[rx_ring->next_to_clean]; + rx_buffer =i40e_rx_bi (rx_ring, rx_ring->next_to_clean);prefetchw (rx_buffer->page);/* we are reusing so sync this buffer for CPU use */
drivers/net/ethernet/intel/i40e/i40e_xsk.c +12 -6
@@ -9,6 +9,11 @@#include "i40e_txrx_common.h" #include "i40e_xsk.h" +static struct i40e_rx_buffer *i40e_rx_bi (struct i40e_ring *rx_ring,u32 idx) +{ +return &rx_ring->rx_bi[idx]; +} +/** * i40e_xsk_umem_dma_map - DMA maps all UMEM memory for the netdev * @vsi: Current VSI
@@ -321,7 +326,7 @@ __i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count,bool ok = true; rx_desc =I40E_RX_DESC (rx_ring, ntu); - bi = &rx_ring->rx_bi[ntu]; + bi =i40e_rx_bi (rx_ring, ntu); do { if (!alloc(rx_ring, bi)) { ok = false;
@@ -340,7 +345,7 @@ __i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count,if (unlikely (ntu == rx_ring->count)) { rx_desc =I40E_RX_DESC (rx_ring,0 ); - bi = rx_ring->rx_bi; + bi =i40e_rx_bi (rx_ring,0 ); ntu =0 ; }
@@ -402,7 +407,7 @@ static struct i40e_rx_buffer *i40e_get_rx_buffer_zc(struct i40e_ring *rx_ring, {struct i40e_rx_buffer *bi; - bi = &rx_ring->rx_bi[rx_ring->next_to_clean]; + bi =i40e_rx_bi (rx_ring, rx_ring->next_to_clean);/* we are reusing so sync this buffer for CPU use */ dma_sync_single_range_for_cpu(rx_ring->dev,
@@ -424,7 +429,8 @@ static struct i40e_rx_buffer *i40e_get_rx_buffer_zc(struct i40e_ring *rx_ring,static void i40e_reuse_rx_buffer_zc (struct i40e_ring *rx_ring,struct i40e_rx_buffer *old_bi) { -struct i40e_rx_buffer *new_bi = &rx_ring->rx_bi[rx_ring->next_to_alloc]; +struct i40e_rx_buffer *new_bi =i40e_rx_bi (rx_ring, + rx_ring->next_to_alloc);u16 nta = rx_ring->next_to_alloc;/* update, and store next to alloc */
@@ -456,7 +462,7 @@ void i40e_zca_free(struct zero_copy_allocator *alloc, unsigned long handle) mask = rx_ring->xsk_umem->chunk_mask; nta = rx_ring->next_to_alloc; - bi = &rx_ring->rx_bi[nta]; + bi =i40e_rx_bi (rx_ring, nta); nta++; rx_ring->next_to_alloc = (nta < rx_ring->count) ? nta :0 ;
@@ -824,7 +830,7 @@ void i40e_xsk_clean_rx_ring(struct i40e_ring *rx_ring)u16 i;for (i =0 ; i < rx_ring->count; i++) { -struct i40e_rx_buffer *rx_bi = &rx_ring->rx_bi[i]; +struct i40e_rx_buffer *rx_bi =i40e_rx_bi (rx_ring, i);if (!rx_bi->addr)continue ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 74/453 drm/aspeed: Fix Kconfig warning & subsequent build errors
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit bf296b35489b46780b73b74ad984d06750ed5479 ]
Kernel test robot reported build errors (undefined references) that didn't make much sense. After reproducing them, there is also a Kconfig warning that is the root cause of the build errors, so fix that Kconfig problem.
Fixes this Kconfig warning:
WARNING: unmet direct dependencies detected for CMA
Depends on [n]: MMU [=n]
Selected by [m]:
- DRM_ASPEED_GFX [=m] && HAS_IOMEM [=y] && DRM [=m] && OF [=y] && (COMPILE_TEST [=y] || ARCH_ASPEED) && HAVE_DMA_CONTIGUOUS [=y]
and these dependent build errors:
(.text+0x10c8c): undefined reference to `start_isolate_page_range'
microblaze-linux-ld: (.text+0x10f14): undefined reference to `test_pages_isolated'
microblaze-linux-ld: (.text+0x10fd0): undefined reference to `undo_isolate_page_range'
--- drivers/gpu/drm/aspeed/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/aspeed/Kconfig +1 -0
@@ -3,6 +3,7 @@ config DRM_ASPEED_GFX tristate "ASPEED BMC Display Controller" depends on DRM && OF depends on (COMPILE_TEST || ARCH_ASPEED) + depends on MMU select DRM_KMS_HELPER select DRM_KMS_CMA_HELPER select DMA_CMA if HAVE_DMA_CONTIGUOUS
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 12/453 gpio: mvebu: fix potential user-after-free on probe
In reply to Greg Kroah-HartmanFrom: Baruch Siach <[email protected]>
[ Upstream commit 7ee1a01e47403f72b9f38839a737692f6991263e ]
When mvebu_pwm_probe() fails IRQ domain is not released. Move pwm probe before IRQ domain allocation. Add pwm cleanup code to the failure path.
--- drivers/gpio/gpio-mvebu.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/gpio/gpio-mvebu.c +11 -5
@@ -1196,6 +1196,13 @@ static int mvebu_gpio_probe(struct platform_device *pdev)devm_gpiochip_add_data (&pdev->dev, &mvchip->chip, mvchip); +/* Some MVEBU SoCs have simple PWM support for GPIO lines */ +if (IS_ENABLED (CONFIG_PWM )) { + err =mvebu_pwm_probe (pdev, mvchip, id); +if (err) +return err; + } +/* Some gpio controllers do not provide irq support */ if (!have_irqs)return 0 ;
@@ -1205,7 +1212,8 @@ static int mvebu_gpio_probe(struct platform_device *pdev)if (!mvchip->domain) {dev_err (&pdev->dev,"couldn't allocate irq domain %s (DT).\n" , mvchip->chip.label); -return -ENODEV ; + err = -ENODEV ; + goto err_pwm; } err = irq_alloc_domain_generic_chips(
@@ -1253,14 +1261,12 @@ static int mvebu_gpio_probe(struct platform_device *pdev) mvchip); } -/* Some MVEBU SoCs have simple PWM support for GPIO lines */ -if (IS_ENABLED (CONFIG_PWM )) -return mvebu_pwm_probe (pdev, mvchip, id); -return 0 ; err_domain:irq_domain_remove (mvchip->domain); +err_pwm: +pwmchip_remove (&mvchip->mvpwm->chip);return err; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainercover 5.4.86-rc1 review
This is the start of the stable review cycle for the 5.4.86 release. There are 453 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 30 Dec 2020 12:48:23 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.86-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.4.86-rc1
Steven Rostedt (VMware) <[email protected]>
Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS"
Nikita Shubin <[email protected]>
rtc: ep93xx: Fix NULL pointer dereference in ep93xx_rtc_read_time
DingHua Ma <[email protected]>
regulator: axp20x: Fix DLDO2 voltage control register mask for AXP22x
Jubin Zhong <[email protected]>
PCI: Fix pci_slot_release() NULL pointer dereference
Carlos Garnacho <[email protected]>
platform/x86: intel-vbtn: Allow switch events on Acer Switch Alpha 12
Dan Williams <[email protected]>
libnvdimm/namespace: Fix reaping of invalidated block-window-namespace labels
SeongJae Park <[email protected]>
xenbus/xenbus_backend: Disallow pending watch messages
SeongJae Park <[email protected]>
xen/xenbus: Count pending messages for each watch
SeongJae Park <[email protected]>
xen/xenbus/xen_bus_type: Support will_handle watch callback
SeongJae Park <[email protected]>
xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path()
SeongJae Park <[email protected]>
xen/xenbus: Allow watches discard events before queueing
Pawel Wieczorkiewicz <[email protected]>
xen-blkback: set ring->xenblkd to NULL after kthread_stop()
Maarten Lankhorst <[email protected]>
dma-buf/dma-resv: Respect num_fences when initializing the shared fence list.
Wang Hai <[email protected]>
device-dax/core: Fix memory leak when rmmod dax.ko
Nicolin Chen <[email protected]>
clk: tegra: Do not return 0 on failure
Terry Zhou <[email protected]>
clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9
Paul Cercueil <[email protected]>
clk: ingenic: Fix divider calculation with div tables
Yangtao Li <[email protected]>
pinctrl: sunxi: Always call chained_irq_{enter, exit} in sunxi_pinctrl_irq_handler
Zhao Heming <[email protected]>
md/cluster: fix deadlock when node is doing resync job
Zhao Heming <[email protected]>
md/cluster: block reshape with remote resync job
Jonathan Cameron <[email protected]>
iio:adc:ti-ads124s08: Fix alignment and data leak issues.
Jonathan Cameron <[email protected]>
iio:adc:ti-ads124s08: Fix buffer being too long.
Jonathan Cameron <[email protected]>
iio:imu:bmi160: Fix too large a buffer.
Jonathan Cameron <[email protected]>
iio:pressure:mpl3115: Force alignment of buffer
Jonathan Cameron <[email protected]>
iio:magnetometer:mag3110: Fix alignment and data leak issues.
Jonathan Cameron <[email protected]>
iio:light:st_uvis25: Fix timestamp alignment and prevent data leak.
Jonathan Cameron <[email protected]>
iio:light:rpr0521: Fix timestamp alignment and prevent data leak.
Qinglang Miao <[email protected]>
iio: adc: rockchip_saradc: fix missing clk_disable_unprepare() on error in rockchip_saradc_resume
Nuno Sá <[email protected]>
iio: buffer: Fix demux update
James Smart <[email protected]>
scsi: lpfc: Re-fix use after free in lpfc_rq_buf_free()
James Smart <[email protected]>
scsi: lpfc: Fix invalid sleeping context in lpfc_sli4_nvmet_alloc()
Arun Easi <[email protected]>
scsi: qla2xxx: Fix crash during driver load on big endian machines
Sergei Antonov <[email protected]>
mtd: rawnand: meson: fix meson_nfc_dma_buffer_release() arguments
Praveenkumar I <[email protected]>
mtd: rawnand: qcom: Fix DMA sync on FLASH_STATUS register read
Sven Eckelmann <[email protected]>
mtd: parser: cmdline: Fix parsing of part-names with colons
Miquel Raynal <[email protected]>
mtd: spinand: Fix OOB read
Evan Green <[email protected]>
soc: qcom: smp2p: Safely acquire spinlock without IRQs
Tudor Ambarus <[email protected]>
spi: atmel-quadspi: Fix AHB memory accesses
Lukas Wunner <[email protected]>
spi: atmel-quadspi: Disable clock in probe error path
Lukas Wunner <[email protected]>
spi: mt7621: Don't leak SPI master in probe error path
Lukas Wunner <[email protected]>
spi: mt7621: Disable clock in probe error path
Lukas Wunner <[email protected]>
spi: synquacer: Disable clock in probe error path
Lukas Wunner <[email protected]>
spi: st-ssc4: Fix unbalanced pm_runtime_disable() in probe error path
Lukas Wunner <[email protected]>
spi: sc18is602: Don't leak SPI master in probe error path
Lukas Wunner <[email protected]>
spi: rb4xx: Don't leak SPI master in probe error path
Lukas Wunner <[email protected]>
spi: pic32: Don't leak DMA channels in probe error path
Lukas Wunner <[email protected]>
spi: mxic: Don't leak SPI master in probe error path
Lukas Wunner <[email protected]>
spi: gpio: Don't leak SPI master in probe error path
Rasmus Villemoes <[email protected]>
spi: fsl: fix use of spisel_boot signal on MPC8309
Lukas Wunner <[email protected]>
spi: davinci: Fix use-after-free on unbind
Lukas Wunner <[email protected]>
spi: atmel-quadspi: Fix use-after-free on unbind
Lukas Wunner <[email protected]>
spi: spi-sh: Fix use-after-free on unbind
Lukas Wunner <[email protected]>
spi: pxa2xx: Fix use-after-free on unbind
Chris Wilson <[email protected]>
drm/i915: Fix mismatch between misplaced vma check and vma insert
Zwane Mwaikambo <[email protected]>
drm/dp_aux_dev: check aux_dev before use in drm_dp_aux_dev_get_by_minor()
Stylon Wang <[email protected]>
drm/amd/display: Fix memory leaks in S3 resume
Bas Nieuwenhuizen <[email protected]>
drm/amd/display: Honor the offset for plane 0.
Dave Kleikamp <[email protected]>
jfs: Fix array index bounds check in dbAdjTree
lizhe <[email protected]>
jffs2: Fix ignoring mounting options problem during remounting
Zhe Li <[email protected]>
jffs2: Fix GC exit abnormally
Richard Weinberger <[email protected]>
ubifs: wbuf: Don't leak kernel memory to flash
Steve French <[email protected]>
SMB3: avoid confusing warning message on mount to Azure
Luis Henriques <[email protected]>
ceph: fix race in concurrent __ceph_remove_cap invocations
Anton Ivanov <[email protected]>
um: Remove use of asprinf in umid.c
Roberto Sassu <[email protected]>
ima: Don't modify file descriptor mode on the fly
David Hildenbrand <[email protected]>
powerpc/powernv/memtrace: Fix crashing the kernel when enabling concurrently
David Hildenbrand <[email protected]>
powerpc/powernv/memtrace: Don't leak kernel memory to user space
Alexey Kardashevskiy <[email protected]>
powerpc/powernv/npu: Do not attempt NPU2 setup on POWER8NVL NPU
Christophe Leroy <[email protected]>
powerpc/mm: Fix verification of MMU_FTR_TYPE_44x
Christophe Leroy <[email protected]>
powerpc/8xx: Fix early debug when SMC1 is relocated
Christophe Leroy <[email protected]>
powerpc/xmon: Change printk() to pr_cont()
Christophe Leroy <[email protected]>
powerpc/feature: Add CPU_FTR_NOEXECUTE to G2_LE
Tyrel Datwyler <[email protected]>
powerpc/rtas: Fix typo of ibm,open-errinjct in RTAS filter
Mathieu Desnoyers <[email protected]>
powerpc: Fix incorrect stw{, ux, u, x} instructions in __set_pte_at
Chuck Lever <[email protected]>
xprtrdma: Fix XDRBUF_SPARSE_PAGES support
Nicolas Ferre <[email protected]>
ARM: dts: at91: sama5d2: fix CAN message ram offset and size
H. Nikolaus Schaller <[email protected]>
ARM: dts: pandaboard: fix pinmux for gpio user button of Pandaboard ES
Marc Zyngier <[email protected]>
KVM: arm64: Introduce handling of AArch32 TTBCR2 traps
Jan Kara <[email protected]>
ext4: fix deadlock with fs freezing and EA inodes
Chunguang Xu <[email protected]>
ext4: fix a memory leak of ext4_free_data
Qu Wenruo <[email protected]>
btrfs: trim: fix underflow in trim length to prevent access beyond device boundary
Josef Bacik <[email protected]>
btrfs: do not shorten unpin len for caching block groups
Johan Hovold <[email protected]>
USB: serial: keyspan_pda: fix write unthrottling
Johan Hovold <[email protected]>
USB: serial: keyspan_pda: fix tx-unthrottle use-after-free
Johan Hovold <[email protected]>
USB: serial: keyspan_pda: fix write-wakeup use-after-free
Johan Hovold <[email protected]>
USB: serial: keyspan_pda: fix stalled writes
Johan Hovold <[email protected]>
USB: serial: keyspan_pda: fix write deadlock
Johan Hovold <[email protected]>
USB: serial: keyspan_pda: fix dropped unthrottle interrupts
Johan Hovold <[email protected]>
USB: serial: digi_acceleport: fix write-wakeup deadlocks
Johan Hovold <[email protected]>
USB: serial: mos7720: fix parallel-port state restore
Daniel Jordan <[email protected]>
cpuset: fix race between hotplug work and later CPU offline
Borislav Petkov <[email protected]>
EDAC/amd64: Fix PCI component registration
Qiuxu Zhuo <[email protected]>
EDAC/i10nm: Use readl() to access MMIO registers
Ard Biesheuvel <[email protected]>
crypto: arm/aes-ce - work around Cortex-A57/A72 silion errata
Ard Biesheuvel <[email protected]>
crypto: ecdh - avoid unaligned accesses in ecdh_set_secret()
Athira Rajeev <[email protected]>
powerpc/perf: Exclude kernel samples while counting events in user space.
Kan Liang <[email protected]>
perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake
Kan Liang <[email protected]>
perf/x86/intel: Add event constraint for CYCLE_ACTIVITY.STALLS_MEM_ANY
Ian Abbott <[email protected]>
staging: comedi: mf6x4: Fix AI end-of-conversion detection
Takashi Iwai <[email protected]>
ASoC: cx2072x: Fix doubly definitions of Playback and Capture streams
Todd Kjos <[email protected]>
binder: add flag to clear buffer on txn complete
Stefan Haberland <[email protected]>
s390/dasd: fix list corruption of lcu list
Stefan Haberland <[email protected]>
s390/dasd: fix list corruption of pavgroup group list
Stefan Haberland <[email protected]>
s390/dasd: prevent inconsistent LCU device data
Stefan Haberland <[email protected]>
s390/dasd: fix hanging device offline processing
Philipp Rudo <[email protected]>
s390/kexec_file: fix diag308 subcode when loading crash kernel
Sven Schnelle <[email protected]>
s390/smp: perform initial CPU reset also for SMT siblings
Robin Gong <[email protected]>
ALSA: core: memalloc: add page alignment for iram
Takashi Iwai <[email protected]>
ALSA: usb-audio: Disable sample read check if firmware doesn't give back
Amadej Kastelic <[email protected]>
ALSA: usb-audio: Add VID to support native DSD reproduction on FiiO devices
Chris Chiu <[email protected]>
ALSA: hda/realtek: Apply jack fixup for Quanta NL3
Takashi Iwai <[email protected]>
ALSA: hda/realtek: Add quirk for MSI-GP73
Chris Chiu <[email protected]>
ALSA/hda: apply jack fixup for the Acer Veriton N4640G/N6640G/N2510G
Takashi Iwai <[email protected]>
ALSA: pcm: oss: Fix a few more UBSAN fixes
Kailang Yang <[email protected]>
ALSA: hda/realtek - Add supported for more Lenovo ALC285 Headset Button
Chris Chiu <[email protected]>
ALSA: hda/realtek - Enable headset mic of ASUS Q524UQK with ALC255
Chris Chiu <[email protected]>
ALSA: hda/realtek - Enable headset mic of ASUS X430UN with ALC256
Hui Wang <[email protected]>
ALSA: hda/realtek: make bass spk volume adjustable on a yoga laptop
Connor McAdams <[email protected]>
ALSA: hda/ca0132 - Fix AE-5 rear headphone pincfg.
Takashi Iwai <[email protected]>
ALSA: hda: Fix regressions on clear and reconfig sysfs
Hui Wang <[email protected]>
ACPI: PNP: compare the string length in the matching_id()
Daniel Scally <[email protected]>
Revert "ACPI / resources: Use AE_CTRL_TERMINATE to terminate resources walks"
Rafael J. Wysocki <[email protected]>
PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup()
Connor McAdams <[email protected]>
ALSA: hda/ca0132 - Change Input Source enum strings.
Arnd Bergmann <[email protected]>
Input: cyapa_gen6 - fix out-of-bounds stack access
Sakari Ailus <[email protected]>
media: ipu3-cio2: Make the field on subdev format V4L2_FIELD_NONE
Sakari Ailus <[email protected]>
media: ipu3-cio2: Validate mbus format in setting subdev format
Sakari Ailus <[email protected]>
media: ipu3-cio2: Serialise access to pad format
Sakari Ailus <[email protected]>
media: ipu3-cio2: Return actual subdev format
Sakari Ailus <[email protected]>
media: ipu3-cio2: Remove traces of returned buffers
Lukas Wunner <[email protected]>
media: netup_unidvb: Don't leak SPI master in probe error path
Sean Young <[email protected]>
media: sunxi-cir: ensure IR is handled when it is continuous
Alan Stern <[email protected]>
media: gspca: Fix memory leak in probe
Alexey Kardashevskiy <[email protected]>
vfio/pci/nvlink2: Do not attempt NPU2 setup on POWER8NVL NPU
Simon Beginn <[email protected]>
Input: goodix - add upside-down quirk for Teclast X98 Pro tablet
Arnd Bergmann <[email protected]>
initramfs: fix clang build failure
Dmitry Torokhov <[email protected]>
Input: cros_ec_keyb - send 'scancodes' in addition to key events
Felix Kuehling <[email protected]>
drm/amdkfd: Fix leak in dmabuf import
Chris Park <[email protected]>
drm/amd/display: Prevent bandwidth overflow
Dongdong Wang <[email protected]>
lwt: Disable BH too in run_lwt_bpf()
Serge Hallyn <[email protected]>
fix namespaced fscaps when !CONFIG_SECURITY
Sara Sharon <[email protected]>
cfg80211: initialize rekey_data
Paul Kocialkowski <[email protected]>
ARM: sunxi: Add machine match for the Allwinner V3 SoC
Arnaldo Carvalho de Melo <[email protected]>
perf probe: Fix memory leak when synthesizing SDT probes
Masahiro Yamada <[email protected]>
kconfig: fix return value of do_error_if()
Jernej Skrabec <[email protected]>
clk: sunxi-ng: Make sure divider tables have sentinel
Christophe JAILLET <[email protected]>
clk: s2mps11: Fix a resource leak in error handling paths in the probe function
Alexandre Belloni <[email protected]>
clk: at91: sam9x60: remove atmel,osc-bypass support
Dan Carpenter <[email protected]>
virtio_ring: Fix two use after free bugs
Dan Carpenter <[email protected]>
virtio_net: Fix error code in probe()
Dan Carpenter <[email protected]>
virtio_ring: Cut and paste bugs in vring_create_virtqueue_packed()
Dan Carpenter <[email protected]>
qlcnic: Fix error code in probe
Zheng Zengkai <[email protected]>
perf record: Fix memory leak when using '--user-regs=?' to list registers
Lokesh Vutla <[email protected]>
pwm: lp3943: Dynamically allocate PWM chip base
Uwe Kleine-König <[email protected]>
pwm: zx: Add missing cleanup in error path
Zhang Qilong <[email protected]>
clk: ti: Fix memleak in ti_fapll_synth_setup
Arnd Bergmann <[email protected]>
watchdog: coh901327: add COMMON_CLK dependency
Manivannan Sadhasivam <[email protected]>
watchdog: qcom: Avoid context switch in restart handler
Zhang Qilong <[email protected]>
libnvdimm/label: Return -ENXIO for no slot in __blk_label_update
Vincent Stehlé <[email protected]>
net: korina: fix return value
Christophe JAILLET <[email protected]>
net: allwinner: Fix some resources leak in the error handling path of the probe and in the remove function
Christophe JAILLET <[email protected]>
net: bcmgenet: Fix a resource leak in an error handling path in the probe functin
Sven Van Asbroeck <[email protected]>
lan743x: fix rx_napi_poll/interrupt ping-pong
Dwaipayan Ray <[email protected]>
checkpatch: fix unescaped left brace
Johannes Weiner <[email protected]>
mm: don't wake kswapd prematurely when watermark boosting is disabled
Matthew Wilcox (Oracle) <[email protected]>
sparc: fix handling of page table constructor failure
Vincent Stehlé <[email protected]>
powerpc/ps3: use dma_mapping_error()
Bongsu Jeon <[email protected]>
nfc: s3fwrn5: Release the nfc firmware
Leon Romanovsky <[email protected]>
RDMA/cma: Don't overwrite sgid_attr after device is released
Dan Aloni <[email protected]>
sunrpc: fix xs_read_xdr_buf for partial pages receive
Anton Ivanov <[email protected]>
um: chan_xterm: Fix fd leak
Anton Ivanov <[email protected]>
um: tty: Fix handling of close in tty lines
Anton Ivanov <[email protected]>
um: Monitor error events in IRQ controller
Wang ShaoBo <[email protected]>
ubifs: Fix error return code in ubifs_init_authentication()
Wang Wensheng <[email protected]>
watchdog: Fix potential dereferencing of null pointer
Lingling Xu <[email protected]>
watchdog: sprd: check busy bit before new loading rather than after that
Lingling Xu <[email protected]>
watchdog: sprd: remove watchdog disable from resume fail path
Guenter Roeck <[email protected]>
watchdog: sirfsoc: Add missing dependency on HAS_IOMEM
Guenter Roeck <[email protected]>
watchdog: armada_37xx: Add missing dependency on HAS_IOMEM
Marc Zyngier <[email protected]>
irqchip/alpine-msi: Fix freeing of interrupts on allocation error path
Dan Carpenter <[email protected]>
ASoC: wm_adsp: remove "ctl" from list on error in wm_adsp_create_control()
Johannes Berg <[email protected]>
mac80211: don't set set TDLS STA bandwidth wider than possible
Arnd Bergmann <[email protected]>
crypto: atmel-i2c - select CONFIG_BITREVERSE
Marek Szyprowski <[email protected]>
extcon: max77693: Fix modalias string
Han Xu <[email protected]>
mtd: rawnand: gpmi: Fix the random DMA timeout issue
Dan Carpenter <[email protected]>
mtd: rawnand: meson: Fix a resource leak in init
Zhang Qilong <[email protected]>
mtd: rawnand: gpmi: fix reference count leak in gpmi ops
Dmitry Osipenko <[email protected]>
clk: tegra: Fix duplicated SE clock entry
Zhang Changzhong <[email protected]>
remoteproc: qcom: Fix potential NULL dereference in adsp_init_mmio()
Zhang Qilong <[email protected]>
remoteproc: qcom: fix reference leak in adsp_start
Zhang Qilong <[email protected]>
remoteproc: q6v5-mss: fix error handling in q6v5_pds_enable
Jack Morgenstein <[email protected]>
RDMA/core: Do not indicate device ready when device enablement fails
Sean Nyekjaer <[email protected]>
can: m_can: m_can_config_endisable(): remove double clearing of clock stop request bit
Huang Jianan <[email protected]>
erofs: avoid using generic_block_bmap
Johannes Berg <[email protected]>
iwlwifi: mvm: hook up missing RX handlers
Qinglang Miao <[email protected]>
s390/cio: fix use-after-free in ccw_device_destroy_console
Zhang Changzhong <[email protected]>
bus: fsl-mc: fix error return code in fsl_mc_object_allocate()
Stephen Boyd <[email protected]>
platform/chrome: cros_ec_spi: Don't overwrite spi::mode
Masami Hiramatsu <[email protected]>
x86/kprobes: Restore BTF if the single-stepping is cancelled
Cheng Lin <[email protected]>
nfs_common: need lock during iterate through the list
kazuo ito <[email protected]>
nfsd: Fix message level for normal termination
Yang Yingliang <[email protected]>
speakup: fix uninitialized flush_lock
Zhang Qilong <[email protected]>
usb: oxu210hp-hcd: Fix memory leak in oxu_create
Zhang Qilong <[email protected]>
usb: ehci-omap: Fix PM disable depth umbalance in ehci_hcd_omap_probe
Christophe Leroy <[email protected]>
powerpc/mm: sanity_check_fault() should work for all, not only BOOK3S
Chuhong Yuan <[email protected]>
ASoC: amd: change clk_get() to devm_clk_get() and add missed checks
Colin Ian King <[email protected]>
drm/mediatek: avoid dereferencing a null hdmi_phy on an error message
Nathan Lynch <[email protected]>
powerpc/pseries/hibernation: remove redundant cacheinfo update
Nathan Lynch <[email protected]>
powerpc/pseries/hibernation: drop pseries_suspend_begin() from suspend ops
Vadim Pasternak <[email protected]>
platform/x86: mlx-platform: Fix item counter assignment for MSN2700, MSN24xx systems
Zhang Changzhong <[email protected]>
scsi: fnic: Fix error return code in fnic_probe()
Arnd Bergmann <[email protected]>
seq_buf: Avoid type mismatch for seq_buf_init
Zhang Qilong <[email protected]>
scsi: pm80xx: Fix error return in pm8001_pci_probe()
Qinglang Miao <[email protected]>
scsi: qedi: Fix missing destroy_workqueue() on error in __qedi_probe
Stefan Agner <[email protected]>
arm64: dts: meson: g12a: x96-max: fix PHY deassert timing requirements
Stefan Agner <[email protected]>
ARM: dts: meson: fix PHY deassert timing requirements
Stefan Agner <[email protected]>
arm64: dts: meson: fix PHY deassert timing requirements
Jing Xiangfeng <[email protected]>
Bluetooth: btmtksdio: Add the missed release_firmware() in mtk_setup_firmware()
Jing Xiangfeng <[email protected]>
Bluetooth: btusb: Add the missed release_firmware() in btusb_mtk_setup_firmware()
Pali Rohár <[email protected]>
cpufreq: scpi: Add missing MODULE_ALIAS
Pali Rohár <[email protected]>
cpufreq: loongson1: Add missing MODULE_ALIAS
Pali Rohár <[email protected]>
cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE
Pali Rohár <[email protected]>
cpufreq: st: Add missing MODULE_DEVICE_TABLE
Pali Rohár <[email protected]>
cpufreq: qcom: Add missing MODULE_DEVICE_TABLE
Pali Rohár <[email protected]>
cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE
Pali Rohár <[email protected]>
cpufreq: highbank: Add missing MODULE_DEVICE_TABLE
Pali Rohár <[email protected]>
cpufreq: ap806: Add missing MODULE_DEVICE_TABLE
Keqian Zhu <[email protected]>
clocksource/drivers/arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI
Keqian Zhu <[email protected]>
clocksource/drivers/arm_arch_timer: Use stable count reader in erratum sne
Wang Li <[email protected]>
phy: renesas: rcar-gen3-usb2: disable runtime pm in case of failure
Qinglang Miao <[email protected]>
dm ioctl: fix error return code in target_message
Chuhong Yuan <[email protected]>
ASoC: jz4740-i2s: add missed checks for clk_get()
Leon Romanovsky <[email protected]>
net/mlx5: Properly convey driver version to firmware
Alexander Sverdlin <[email protected]>
MIPS: Don't round up kernel sections size for memblock_add()
Jing Xiangfeng <[email protected]>
memstick: r592: Fix error return in r592_probe()
Chen-Yu Tsai <[email protected]>
arm64: dts: rockchip: Fix UART pull-ups on rk3328
Yu Kuai <[email protected]>
pinctrl: falcon: add missing put_device() call in pinctrl_falcon_probe()
Andrii Nakryiko <[email protected]>
bpf: Fix bpf_put_raw_tracepoint()'s use of __module_address()
Claudiu Beznea <[email protected]>
ARM: dts: at91: sama5d2: map securam as device
Lars-Peter Clausen <[email protected]>
iio: hrtimer-trigger: Mark hrtimer to expire in hard interrupt context
Yu Kuai <[email protected]>
clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent()
Yang Yingliang <[email protected]>
clocksource/drivers/orion: Add missing clk_disable_unprepare() on error path
Jordan Niethe <[email protected]>
powerpc/64: Fix an EMIT_BUG_ENTRY in head_64.S
Athira Rajeev <[email protected]>
powerpc/perf: Fix crash with is_sier_available when pmu is not set
Dan Carpenter <[email protected]>
media: saa7146: fix array overflow in vidioc_s_audio()
Zhang Qilong <[email protected]>
hwmon: (ina3221) Fix PM usage counter unbalance in ina3221_write_enable
Jason Gunthorpe <[email protected]>
vfio-pci: Use io_remap_pfn_range() for PCI IO memory
Mickaël Salaün <[email protected]>
selftests/seccomp: Update kernel config
NeilBrown <[email protected]>
NFS: switch nfsiod to be an UNBOUND workqueue.
Calum Mackay <[email protected]>
lockd: don't use interval-based rebinding over TCP
Fedor Tokarev <[email protected]>
net: sunrpc: Fix 'snprintf' return value check in 'do_xprt_debugfs'
Trond Myklebust <[email protected]>
NFSv4: Fix the alignment of page data in the getdeviceinfo reply
Trond Myklebust <[email protected]>
SUNRPC: xprt_load_transport() needs to support the netid "rdma6"
Olga Kornievskaia <[email protected]>
NFSv4.2: condition READDIR's mask for security label based on LSM state
Trond Myklebust <[email protected]>
SUNRPC: rpc_wake_up() should wake up tasks in the correct order
Christophe JAILLET <[email protected]>
ath10k: Release some resources in an error handling path
Christophe JAILLET <[email protected]>
ath10k: Fix an error handling path
Rakesh Pillai <[email protected]>
ath10k: Fix the parsing error in service available event
Qinglang Miao <[email protected]>
platform/x86: dell-smbios-base: Fix error return code in dell_smbios_init
Alexandre Belloni <[email protected]>
ARM: dts: at91: at91sam9rl: fix ADC triggers
Yu Kuai <[email protected]>
soc: amlogic: canvas: add missing put_device() call in meson_canvas_get()
Dongjin Kim <[email protected]>
arm64: dts: meson-sm1: fix typo in opp table
Artem Lapkin <[email protected]>
arm64: dts: meson: fix spi-max-frequency on Khadas VIM2
Bharat Gooty <[email protected]>
PCI: iproc: Fix out-of-bound array accesses
Colin Ian King <[email protected]>
PCI: Fix overflow in command-line resource alignment requests
Bjorn Helgaas <[email protected]>
PCI: Bounds-check command-line resource alignment requests
Bjorn Andersson <[email protected]>
arm64: dts: qcom: c630: Polish i2c-hid devices
Michael Walle <[email protected]>
arm64: dts: ls1028a: fix ENETC PTP clock input
Marc Zyngier <[email protected]>
genirq/irqdomain: Don't try to free an interrupt that has no mapping
Zhang Qilong <[email protected]>
power: supply: bq24190_charger: fix reference leak
Hans de Goede <[email protected]>
power: supply: axp288_charger: Fix HP Pavilion x2 10 DMI matching
Chen-Yu Tsai <[email protected]>
arm64: dts: rockchip: Set dr_mode to "host" for OTG on rk3328-roc-cc
Marek Behún <[email protected]>
arm64: dts: armada-3720-turris-mox: update ethernet-phy handle name
Chris Packham <[email protected]>
ARM: dts: Remove non-existent i2c1 from 98dx3236
Jing Xiangfeng <[email protected]>
HSI: omap_ssi: Don't jump to free ID in ssi_add_controller()
Bjorn Andersson <[email protected]>
slimbus: qcom-ngd-ctrl: Avoid sending power requests without QMI
Dan Carpenter <[email protected]>
media: max2175: fix max2175_set_csm_mode() error code
Qinglang Miao <[email protected]>
mips: cdmm: fix use-after-free in mips_cdmm_bus_discover
Daniel Gomez <[email protected]>
media: imx214: Fix stop streaming
Daniel T. Lee <[email protected]>
samples: bpf: Fix lwt_len_hist reusing previous BPF map
Vadim Pasternak <[email protected]>
platform/x86: mlx-platform: Remove PSU EEPROM from MSN274x platform configuration
Vadim Pasternak <[email protected]>
platform/x86: mlx-platform: Remove PSU EEPROM from default platform configuration
Keita Suzuki <[email protected]>
media: siano: fix memory leak of debugfs members in smsdvb_hotplug
Vidya Sagar <[email protected]>
arm64: tegra: Fix DT binding for IO High Voltage entry
Yu Kuai <[email protected]>
leds: netxbig: add missing put_device() call in netxbig_leds_get_of_pdata()
Zhihao Cheng <[email protected]>
dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe()
Qinglang Miao <[email protected]>
cw1200: fix missing destroy_workqueue() on error in cw1200_init_common
Zhang Changzhong <[email protected]>
rsi: fix error return code in rsi_reset_card()
Wang Hai <[email protected]>
qtnfmac: fix error return code in qtnf_pcie_probe()
Sebastian Andrzej Siewior <[email protected]>
orinoco: Move context allocation after processing the skb
Zhihao Cheng <[email protected]>
mmc: pxamci: Fix error return code in pxamci_probe
Cristian Birsan <[email protected]>
ARM: dts: at91: sama5d3_xplained: add pincontrol for USB Host
Cristian Birsan <[email protected]>
ARM: dts: at91: sama5d4_xplained: add pincontrol for USB Host
Qinglang Miao <[email protected]>
memstick: fix a double-free bug in memstick_check
Kamal Heib <[email protected]>
RDMA/cxgb4: Validate the number of CQEs
Kevin Hilman <[email protected]>
clk: meson: Kconfig: fix dependency for G12A
Zhang Qilong <[email protected]>
Input: omap4-keypad - fix runtime PM error handling
Zhihao Cheng <[email protected]>
drivers: soc: ti: knav_qmss_queue: Fix error return code in knav_queue_probe
Zhang Qilong <[email protected]>
soc: ti: Fix reference imbalance in knav_dma_probe
Zhang Qilong <[email protected]>
soc: ti: knav_qmss: fix reference leak in knav_queue_probe
Uwe Kleine-König <[email protected]>
spi: fix resource leak for drivers without .remove callback
Zhang Qilong <[email protected]>
crypto: omap-aes - Fix PM disable depth imbalance in omap_aes_probe
Nathan Chancellor <[email protected]>
crypto: crypto4xx - Replace bitwise OR with logical OR in crypto4xx_build_pd
Yazen Ghannam <[email protected]>
EDAC/mce_amd: Use struct cpuinfo_x86.cpu_die_id for AMD NodeId
Christophe Leroy <[email protected]>
powerpc/feature: Fix CPU_FTRS_ALWAYS by removing CPU_FTRS_GENERIC_32
Ard Biesheuvel <[email protected]>
powerpc: Avoid broken GCC __attribute__((optimize))
Björn Töpel <[email protected]>
selftests/bpf: Fix broken riscv build
Zhang Qilong <[email protected]>
spi: mxs: fix reference leak in mxs_spi_probe
Yang Yingliang <[email protected]>
usb/max3421: fix return error code in max3421_probe()
Dmitry Torokhov <[email protected]>
Input: ads7846 - fix unaligned access on 7845
Oleksij Rempel <[email protected]>
Input: ads7846 - fix integer overflow on Rt calculation
David Jander <[email protected]>
Input: ads7846 - fix race that causes missing releases
Yang Yingliang <[email protected]>
drm/omap: dmm_tiler: fix return error code in omap_dmm_probe()
Yang Yingliang <[email protected]>
video: fbdev: atmel_lcdfb: fix return error code in atmel_lcdfb_of_init()
Qinglang Miao <[email protected]>
media: solo6x10: fix missing snd_card_free in error handling case
Martin Wilck <[email protected]>
scsi: core: Fix VPD LUN ID designator priorities
Jerome Brunet <[email protected]>
ASoC: meson: fix COMPILE_TEST error
Lad Prabhakar <[email protected]>
media: v4l2-fwnode: Return -EINVAL for invalid bus-type
Yu Kuai <[email protected]>
media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_enc_pm()
Yu Kuai <[email protected]>
media: mtk-vcodec: add missing put_device() call in mtk_vcodec_release_dec_pm()
Yu Kuai <[email protected]>
media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_dec_pm()
Colin Ian King <[email protected]>
media: tm6000: Fix sizeof() mismatches
Jing Xiangfeng <[email protected]>
staging: gasket: interrupt: fix the missed eventfd_ctx_put() in gasket_interrupt.c
Zhang Qilong <[email protected]>
staging: greybus: codecs: Fix reference counter leak in error handling
Jack Xu <[email protected]>
crypto: qat - fix status check in qat_hal_put_rel_rd_xfer()
Necip Fazil Yildiran <[email protected]>
MIPS: BCM47XX: fix kconfig dependency bug for BCM47XX_BCMA
Arnd Bergmann <[email protected]>
RDMa/mthca: Work around -Wenum-conversion warning
Zhang Qilong <[email protected]>
ASoC: arizona: Fix a wrong free in wm8997_probe
Vincent Bernat <[email protected]>
net: evaluate net.ipv4.conf.all.proxy_arp_pvlan
Vincent Bernat <[email protected]>
net: evaluate net.ipvX.conf.all.ignore_routes_with_linkdown
Zhang Qilong <[email protected]>
spi: sprd: fix reference leak in sprd_spi_remove
Zhang Qilong <[email protected]>
ASoC: wm8998: Fix PM disable depth imbalance on error
Hangbin Liu <[email protected]>
selftest/bpf: Add missed ip6ip6 test back
Tsuchiya Yuto <[email protected]>
mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure
Qinglang Miao <[email protected]>
spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in bcm63xx_hsspi_resume
Zhang Qilong <[email protected]>
spi: tegra114: fix reference leak in tegra spi ops
Zhang Qilong <[email protected]>
spi: tegra20-sflash: fix reference leak in tegra_sflash_resume
Zhang Qilong <[email protected]>
spi: tegra20-slink: fix reference leak in slink ops of tegra20
Qinglang Miao <[email protected]>
spi: mt7621: fix missing clk_disable_unprepare() on error in mt7621_spi_probe
Zhang Qilong <[email protected]>
spi: spi-ti-qspi: fix reference leak in ti_qspi_setup
Anant Thazhemadam <[email protected]>
Bluetooth: hci_h5: fix memory leak in h5_close
Anmol Karn <[email protected]>
Bluetooth: Fix null pointer dereference in hci_event_packet()
Paweł Chmiel <[email protected]>
arm64: dts: exynos: Correct psci compatible used on Exynos7
Paweł Chmiel <[email protected]>
arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7
Seung-Woo Kim <[email protected]>
brcmfmac: Fix memory leak for unpaired brcmf_{alloc/free}Zhang Qilong <[email protected]>
spi: stm32: fix reference leak in stm32_spi_resume
Paul Moore <[email protected]>
selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handling
Andrii Nakryiko <[email protected]>
libbpf: Fix BTF data layout checks and allow empty BTF
Cezary Rojewski <[email protected]>
ASoC: pcm: DRAIN support reactivation
Zhang Qilong <[email protected]>
spi: spi-mem: fix reference leak in spi_mem_access_start
Dmitry Baryshkov <[email protected]>
drm/msm/dsi_pll_10nm: restore VCO rate during restore_state
Jaegeuk Kim <[email protected]>
f2fs: call f2fs_get_meta_page_retry for nat page
Zhang Qilong <[email protected]>
spi: img-spfi: fix reference leak in img_spfi_resume
Jordan Niethe <[email protected]>
powerpc/64: Set up a kernel stack for secondaries before cpu_restore()
Arnd Bergmann <[email protected]>
drm/amdgpu: fix build_coefficients() argument
Vijay Khemka <[email protected]>
ARM: dts: aspeed: tiogapass: Remove vuart
Clément Péron <[email protected]>
ASoC: sun4i-i2s: Fix lrck_period computation for I2S justified mode
Colin Ian King <[email protected]>
crypto: inside-secure - Fix sizeof() mismatch
Christophe Leroy <[email protected]>
crypto: talitos - Fix return type of current_desc_hdr()
Christophe Leroy <[email protected]>
crypto: talitos - Endianess in current_desc_hdr()
Arnd Bergmann <[email protected]>
drm/amdgpu: fix incorrect enum type
Thomas Gleixner <[email protected]>
sched: Reenable interrupts in do_sched_yield()
Peng Liu <[email protected]>
sched/deadline: Fix sched_dl_global_validate()
David Woodhouse <[email protected]>
x86/apic: Fix x2apic enablement without interrupt remapping
Ard Biesheuvel <[email protected]>
ARM: p2v: fix handling of LPAE translation in BE mode
Arvind Sankar <[email protected]>
x86/mm/ident_map: Check for errors from ident_pud_init()
Bob Pearson <[email protected]>
RDMA/rxe: Compute PSN windows correctly
Joel Stanley <[email protected]>
ARM: dts: aspeed: s2600wf: Fix VGA memory region location
Tianyue Ren <[email protected]>
selinux: fix error initialization in inode_doinit_with_dentry()
Dan Carpenter <[email protected]>
rtc: pcf2127: fix pcf2127_nvmem_read/write() returns
Kamal Heib <[email protected]>
RDMA/bnxt_re: Set queue pair state when being queried
Douglas Anderson <[email protected]>
Revert "i2c: i2c-qcom-geni: Fix DMA transfer race"
Douglas Anderson <[email protected]>
soc: qcom: geni: More properly switch to DMA mode
Nicolas Boichat <[email protected]>
soc: mediatek: Check if power domains can be powered on at boot time
Dan Carpenter <[email protected]>
soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains()
Biju Das <[email protected]>
arm64: dts: renesas: cat875: Remove rxc-skew-ps from ethernet-phy node
Biju Das <[email protected]>
arm64: dts: renesas: hihope-rzg2-ex: Drop rxc-skew-ps from ethernet-phy node
Krzysztof Kozlowski <[email protected]>
drm/tve200: Fix handling of platform_get_irq() error
Krzysztof Kozlowski <[email protected]>
drm/mcde: Fix handling of platform_get_irq() error
Randy Dunlap <[email protected]>
drm/aspeed: Fix Kconfig warning & subsequent build errors
Tom Rix <[email protected]>
drm/gma500: fix double free of gma_connector
Dae R. Jeong <[email protected]>
md: fix a warning caused by a race between concurrent md_ioctl()s
Eric Biggers <[email protected]>
crypto: af_alg - avoid undefined behavior accessing salg_name
Antti Palosaari <[email protected]>
media: msi2500: assign SPI bus number dynamically
Jan Kara <[email protected]>
quota: Sanity-check quota file headers on load
Peilin Ye <[email protected]>
Bluetooth: Fix slab-out-of-bounds read in hci_le_direct_adv_report_evt()
Alexey Kardashevskiy <[email protected]>
serial_core: Check for port state when tty is in error state
Julian Sax <[email protected]>
HID: i2c-hid: add Vero K147 to descriptor override
Arnd Bergmann <[email protected]>
scsi: megaraid_sas: Check user-provided offsets
Sai Prakash Ranjan <[email protected]>
coresight: etb10: Fix possible NULL ptr dereference in etb_enable_perf()
Suzuki K Poulose <[email protected]>
coresight: tmc-etr: Fix barrier packet insertion for perf buffer
Mao Jinlong <[email protected]>
coresight: tmc-etr: Check if page is valid before dma_map_page()
Sai Prakash Ranjan <[email protected]>
coresight: tmc-etf: Fix NULL ptr dereference in tmc_enable_etf_sink_perf()
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: fix USB 3.0 pins supply being turned off on Odroid XU
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: fix USB 3.0 VBUS control and over-current pins on Exynos5410
Krzysztof Kozlowski <[email protected]>
ARM: dts: exynos: fix roles of USB 3.0 ports on Odroid XU
Fabio Estevam <[email protected]>
usb: chipidea: ci_hdrc_imx: Pass DISABLE_DEVICE_STREAMING flag to imx6ul
Will McVicker <[email protected]>
USB: gadget: f_rndis: fix bitrate for SuperSpeed and above
Jack Pham <[email protected]>
usb: gadget: f_fs: Re-use SS descriptors for SuperSpeedPlus
Will McVicker <[email protected]>
USB: gadget: f_midi: setup SuperSpeed Plus descriptors
taehyun.cho <[email protected]>
USB: gadget: f_acm: add support for SuperSpeed Plus
Johan Hovold <[email protected]>
USB: serial: option: add interface-number sanity check to flag handling
Dan Carpenter <[email protected]>
usb: mtu3: fix memory corruption in mtu3_debugfs_regset()
Nicolin Chen <[email protected]>
soc/tegra: fuse: Fix index bug in get_process_id
Masahiro Yamada <[email protected]>
kbuild: avoid split lines in .mod files
Stephane Eranian <[email protected]>
perf/x86/intel: Check PEBS status correctly
Brandon Syu <[email protected]>
drm/amd/display: Init clock value by current vbios CLKs
Luca Coelho <[email protected]>
iwlwifi: pcie: add one missing entry for AX210
Thomas Gleixner <[email protected]>
dm table: Remove BUG_ON(in_interrupt())
Sreekanth Reddy <[email protected]>
scsi: mpt3sas: Increase IOCInit request timeout to 30s
Sven Eckelmann <[email protected]>
vxlan: Copy needed_tailroom from lowerdev
Sven Eckelmann <[email protected]>
vxlan: Add needed_headroom for lower device
Mark Rutland <[email protected]>
arm64: syscall: exit userspace before unmasking exceptions
Ofir Bitton <[email protected]>
habanalabs: put devices before driver removal
Qinglang Miao <[email protected]>
drm/tegra: sor: Disable clocks on error in tegra_sor_init()
Nicholas Piggin <[email protected]>
kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling
Deepak R Varma <[email protected]>
drm/tegra: replace idr_init() by idr_init_base()
Russell King <[email protected]>
net: mvpp2: add mvpp2_phylink_to_port() helper
Paolo Abeni <[email protected]>
selftests: fix poll error in udpgro.sh
Björn Töpel <[email protected]>
ixgbe: avoid premature Rx buffer reuse
Björn Töpel <[email protected]>
i40e: avoid premature Rx buffer reuse
Li RongQing <[email protected]>
i40e: optimise prefetch page refcount
Björn Töpel <[email protected]>
i40e: Refactor rx_bi accesses
Leon Romanovsky <[email protected]>
RDMA/cm: Fix an attempt to use non-valid pointer when cleaning timewait
Toke Høiland-Jørgensen <[email protected]>
selftests/bpf/test_offload.py: Reset ethtool features after failed setting
Brett Mastbergen <[email protected]>
netfilter: nft_ct: Remove confirmation check for NFT_CT_ID
Chunyan Zhang <[email protected]>
gpio: eic-sprd: break loop when getting NULL device resource
Baolin Wang <[email protected]>
Revert "gpio: eic-sprd: Use devm_platform_ioremap_resource()"
David Howells <[email protected]>
afs: Fix memory leak when mounting with multiple source parameters
Pablo Neira Ayuso <[email protected]>
netfilter: nft_dynset: fix timeouts later than 23 days
Florian Westphal <[email protected]>
netfilter: nft_compat: make sure xtables destructors have run
Subash Abhinov Kasiviswanathan <[email protected]>
netfilter: x_tables: Switch synchronization to RCU
Andrew Jeffery <[email protected]>
pinctrl: aspeed: Fix GPIO requests on pass-through banks
Douglas Anderson <[email protected]>
blk-mq: In blk_mq_dispatch_rq_list() "no budget" is a reason to kick
Johannes Thumshirn <[email protected]>
block: factor out requeue handling from dispatch code
Damien Le Moal <[email protected]>
block: Simplify REQ_OP_ZONE_RESET_ALL handling
Geert Uytterhoeven <[email protected]>
clk: renesas: r9a06g032: Drop __packed for portability
Zhang Qilong <[email protected]>
can: softing: softing_netdev_open(): fix error handling
Xuan Zhuo <[email protected]>
xsk: Replace datagram_poll by sock_poll_wait
Luc Van Oostenryck <[email protected]>
xsk: Fix xsk_poll()'s return type
Randy Dunlap <[email protected]>
scsi: bnx2i: Requires MMU
Baruch Siach <[email protected]>
gpio: mvebu: fix potential user-after-free on probe
Qinglang Miao <[email protected]>
gpio: zynq: fix reference leak in zynq_gpio functions
Zhang Qilong <[email protected]>
PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter
Bernd Bauer <[email protected]>
ARM: dts: imx6qdl-kontron-samx6i: fix I2C_PM scl pin
Fabio Estevam <[email protected]>
ARM: dts: imx6qdl-wandboard-revd1: Remove PAD_GPIO_6 from enetgrp
Adam Sampson <[email protected]>
ARM: dts: sun7i: pcduino3-nano: enable RGMII RX/TX delay on PHY
Icenowy Zheng <[email protected]>
ARM: dts: sun8i: v3s: fix GIC node memory range
Andy Shevchenko <[email protected]>
pinctrl: baytrail: Avoid clearing debounce value when turning it off
Andy Shevchenko <[email protected]>
pinctrl: merrifield: Set default bias in case no particular value given
Pablo Greco <[email protected]>
ARM: dts: sun8i: v40: bananapi-m2-berry: Fix ethernet node
Pablo Greco <[email protected]>
ARM: dts: sun8i: r40: bananapi-m2-berry: Fix dcdc1 regulator
Pablo Greco <[email protected]>
ARM: dts: sun7i: bananapi: Enable RGMII RX/TX delay on Ethernet PHY
-------------
Diffstat:
Documentation/networking/ip-sysctl.txt | 3 + Makefile | 4 +- arch/Kconfig | 16 +++ arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 5 - .../arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts | 5 - arch/arm/boot/dts/aspeed-bmc-intel-s2600wf.dts | 4 +- arch/arm/boot/dts/at91-sama5d3_xplained.dts | 7 ++ arch/arm/boot/dts/at91-sama5d4_xplained.dts | 7 ++ arch/arm/boot/dts/at91sam9rl.dtsi | 19 ++-- arch/arm/boot/dts/exynos5410-odroidxu.dts | 6 +- arch/arm/boot/dts/exynos5410-pinctrl.dtsi | 28 +++++ arch/arm/boot/dts/exynos5410.dtsi | 4 + arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 2 +- arch/arm/boot/dts/imx6qdl-wandboard-revd1.dtsi | 1 - arch/arm/boot/dts/meson8b-odroidc1.dts | 2 +- arch/arm/boot/dts/meson8m2-mxiii-plus.dts | 2 +- arch/arm/boot/dts/omap4-panda-es.dts | 2 +- arch/arm/boot/dts/sama5d2.dtsi | 7 +- arch/arm/boot/dts/sun7i-a20-bananapi.dts | 2 +- arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 4 +- arch/arm/boot/dts/sun8i-v3s.dtsi | 2 +- arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 12 +- arch/arm/crypto/aes-ce-core.S | 32 ++++-- arch/arm/kernel/head.S | 6 +- arch/arm/mach-sunxi/sunxi.c | 1 + arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 2 +- .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 +- .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +- .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 2 +- .../boot/dts/amlogic/meson-gxl-s905d-p230.dts | 2 +- .../boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 4 +- .../arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 2 +- arch/arm64/boot/dts/exynos/exynos7.dtsi | 12 +- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 +- .../boot/dts/marvell/armada-3720-turris-mox.dts | 2 +- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 4 +- .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 31 ++--- arch/arm64/boot/dts/renesas/cat875.dtsi | 1 - arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi | 1 - arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 1 + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 16 +-- arch/arm64/include/asm/kvm_host.h | 1 + arch/arm64/kernel/syscall.c | 2 +- arch/arm64/kvm/sys_regs.c | 1 + arch/mips/bcm47xx/Kconfig | 1 + arch/mips/kernel/setup.c | 4 +- arch/powerpc/include/asm/book3s/32/pgtable.h | 4 +- arch/powerpc/include/asm/cpm1.h | 1 + arch/powerpc/include/asm/cputable.h | 7 +- arch/powerpc/include/asm/nohash/pgtable.h | 4 +- arch/powerpc/kernel/Makefile | 3 + arch/powerpc/kernel/head_64.S | 10 +- arch/powerpc/kernel/paca.c | 4 +- arch/powerpc/kernel/rtas.c | 2 +- arch/powerpc/kernel/setup-common.c | 4 +- arch/powerpc/kernel/setup.h | 6 - arch/powerpc/kernel/setup_64.c | 2 +- arch/powerpc/mm/fault.c | 8 +- arch/powerpc/mm/mem.c | 2 +- arch/powerpc/perf/core-book3s.c | 13 +++ arch/powerpc/platforms/8xx/micropatch.c | 11 ++ arch/powerpc/platforms/powernv/memtrace.c | 44 +++++-- arch/powerpc/platforms/powernv/npu-dma.c | 16 ++- arch/powerpc/platforms/pseries/suspend.c | 4 - arch/powerpc/xmon/nonstdio.c | 2 +- arch/s390/kernel/smp.c | 18 +-- arch/s390/purgatory/head.S | 9 +- arch/sparc/mm/init_64.c | 2 +- arch/um/drivers/chan_user.c | 4 +- arch/um/drivers/xterm.c | 5 + arch/um/os-Linux/irq.c | 2 +- arch/um/os-Linux/umid.c | 17 +-- arch/x86/events/intel/core.c | 5 +- arch/x86/events/intel/ds.c | 2 +- arch/x86/include/asm/apic.h | 1 + arch/x86/kernel/apic/apic.c | 14 ++- arch/x86/kernel/apic/x2apic_phys.c | 9 ++ arch/x86/kernel/kprobes/core.c | 5 + arch/x86/mm/ident_map.c | 12 +- block/blk-mq.c | 37 +++--- block/blk-zoned.c | 40 +++---- crypto/af_alg.c | 10 +- crypto/ecdh.c | 9 +- drivers/acpi/acpi_pnp.c | 3 + drivers/acpi/device_pm.c | 41 ++----- drivers/acpi/resource.c | 2 +- drivers/android/binder.c | 1 + drivers/android/binder_alloc.c | 48 ++++++++ drivers/android/binder_alloc.h | 4 +- drivers/block/xen-blkback/xenbus.c | 4 +- drivers/bluetooth/btmtksdio.c | 2 +- drivers/bluetooth/btusb.c | 2 +- drivers/bluetooth/hci_h5.c | 3 + drivers/bus/fsl-mc/fsl-mc-allocator.c | 4 +- drivers/bus/mips_cdmm.c | 4 +- drivers/clk/at91/sam9x60.c | 6 +- drivers/clk/clk-s2mps11.c | 1 + drivers/clk/ingenic/cgu.c | 14 ++- drivers/clk/meson/Kconfig | 1 + drivers/clk/mvebu/armada-37xx-xtal.c | 4 +- drivers/clk/renesas/r9a06g032-clocks.c | 2 +- drivers/clk/sunxi-ng/ccu-sun50i-a64.c | 1 + drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 1 + drivers/clk/tegra/clk-dfll.c | 4 +- drivers/clk/tegra/clk-id.h | 1 + drivers/clk/tegra/clk-tegra-periph.c | 2 +- drivers/clk/ti/fapll.c | 11 +- drivers/clocksource/arm_arch_timer.c | 27 +++-- drivers/clocksource/timer-cadence-ttc.c | 18 +-- drivers/clocksource/timer-orion.c | 11 +- drivers/cpufreq/armada-8k-cpufreq.c | 6 + drivers/cpufreq/highbank-cpufreq.c | 7 ++ drivers/cpufreq/loongson1-cpufreq.c | 1 + drivers/cpufreq/mediatek-cpufreq.c | 1 + drivers/cpufreq/qcom-cpufreq-nvmem.c | 1 + drivers/cpufreq/scpi-cpufreq.c | 1 + drivers/cpufreq/sti-cpufreq.c | 7 ++ drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 + drivers/crypto/Kconfig | 1 + drivers/crypto/amcc/crypto4xx_core.c | 2 +- drivers/crypto/inside-secure/safexcel.c | 2 +- drivers/crypto/omap-aes.c | 3 +- drivers/crypto/qat/qat_common/qat_hal.c | 2 +- drivers/crypto/talitos.c | 10 +- drivers/dax/super.c | 1 + drivers/dma-buf/dma-resv.c | 2 +- drivers/dma/mv_xor_v2.c | 4 +- drivers/edac/amd64_edac.c | 26 +++-- drivers/edac/i10nm_base.c | 11 +- drivers/edac/mce_amd.c | 2 +- drivers/extcon/extcon-max77693.c | 2 +- drivers/gpio/gpio-eic-sprd.c | 9 +- drivers/gpio/gpio-mvebu.c | 16 ++- drivers/gpio/gpio-zynq.c | 4 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 2 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 ++- .../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 13 ++- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +- .../drm/amd/display/modules/color/color_gamma.c | 2 +- drivers/gpu/drm/aspeed/Kconfig | 1 + drivers/gpu/drm/drm_dp_aux_dev.c | 2 +- drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +- drivers/gpu/drm/mcde/mcde_drv.c | 4 +- drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 5 +- drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c | 8 ++ drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 + drivers/gpu/drm/tegra/drm.c | 2 +- drivers/gpu/drm/tegra/sor.c | 10 +- drivers/gpu/drm/tve200/tve200_drv.c | 4 +- drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c | 8 ++ drivers/hsi/controllers/omap_ssi_core.c | 2 +- drivers/hwmon/ina3221.c | 2 +- drivers/hwtracing/coresight/coresight-etb10.c | 4 +- drivers/hwtracing/coresight/coresight-priv.h | 2 + drivers/hwtracing/coresight/coresight-tmc-etf.c | 4 +- drivers/hwtracing/coresight/coresight-tmc-etr.c | 4 +- drivers/i2c/busses/i2c-qcom-geni.c | 6 +- drivers/iio/adc/rockchip_saradc.c | 2 +- drivers/iio/adc/ti-ads124s08.c | 13 ++- drivers/iio/imu/bmi160/bmi160_core.c | 4 +- drivers/iio/industrialio-buffer.c | 6 +- drivers/iio/light/rpr0521.c | 17 ++- drivers/iio/light/st_uvis25.h | 5 + drivers/iio/light/st_uvis25_core.c | 8 +- drivers/iio/magnetometer/mag3110.c | 13 ++- drivers/iio/pressure/mpl3115.c | 9 +- drivers/iio/trigger/iio-trig-hrtimer.c | 4 +- drivers/infiniband/core/cm.c | 2 + drivers/infiniband/core/cma.c | 7 +- drivers/infiniband/core/device.c | 7 +- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 + drivers/infiniband/hw/cxgb4/cq.c | 3 + drivers/infiniband/hw/mthca/mthca_cq.c | 2 +- drivers/infiniband/hw/mthca/mthca_dev.h | 1 - drivers/infiniband/sw/rxe/rxe_req.c | 3 +- drivers/input/keyboard/cros_ec_keyb.c | 1 + drivers/input/keyboard/omap4-keypad.c | 89 +++++++++------ drivers/input/mouse/cyapa_gen6.c | 2 +- drivers/input/touchscreen/ads7846.c | 52 +++++---- drivers/input/touchscreen/goodix.c | 12 ++ drivers/irqchip/irq-alpine-msi.c | 3 +- drivers/leds/leds-netxbig.c | 35 ++++-- drivers/md/dm-ioctl.c | 1 + drivers/md/dm-table.c | 6 - drivers/md/md-cluster.c | 67 ++++++----- drivers/md/md.c | 21 +++- drivers/media/common/siano/smsdvb-main.c | 5 +- drivers/media/i2c/imx214.c | 2 +- drivers/media/i2c/max2175.c | 2 +- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 62 +++++----- drivers/media/pci/intel/ipu3/ipu3-cio2.h | 1 + drivers/media/pci/netup_unidvb/netup_unidvb_spi.c | 5 +- drivers/media/pci/saa7146/mxb.c | 19 ++-- drivers/media/pci/solo6x10/solo6x10-g723.c | 2 +- .../media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 19 +++- .../media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c | 26 +++-- drivers/media/rc/sunxi-cir.c | 2 + drivers/media/usb/gspca/gspca.c | 1 + drivers/media/usb/msi2500/msi2500.c | 2 +- drivers/media/usb/tm6000/tm6000-video.c | 5 +- drivers/media/v4l2-core/v4l2-fwnode.c | 6 +- drivers/memstick/core/memstick.c | 1 - drivers/memstick/host/r592.c | 12 +- drivers/misc/habanalabs/device.c | 16 +-- drivers/mmc/host/pxamci.c | 1 + drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 38 +++++-- drivers/mtd/nand/raw/meson_nand.c | 7 +- drivers/mtd/nand/raw/qcom_nandc.c | 2 + drivers/mtd/nand/spi/core.c | 4 + drivers/mtd/parsers/cmdlinepart.c | 14 ++- drivers/net/can/m_can/m_can.c | 4 - drivers/net/can/softing/softing_main.c | 9 +- drivers/net/ethernet/allwinner/sun4i-emac.c | 7 +- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 +- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 46 +++++--- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 18 ++- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 24 ++-- drivers/net/ethernet/korina.c | 2 +- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 29 +++-- drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 +- drivers/net/ethernet/microchip/lan743x_main.c | 43 +++---- drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 + drivers/net/virtio_net.c | 1 + drivers/net/vxlan.c | 3 + drivers/net/wireless/ath/ath10k/usb.c | 7 +- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 4 +- drivers/net/wireless/ath/ath10k/wmi.c | 9 +- drivers/net/wireless/ath/ath10k/wmi.h | 1 + .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 6 +- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + .../net/wireless/intersil/orinoco/orinoco_usb.c | 14 +-- drivers/net/wireless/marvell/mwifiex/main.c | 2 + drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +- drivers/net/wireless/rsi/rsi_91x_usb.c | 30 ++--- drivers/net/wireless/st/cw1200/main.c | 2 + drivers/net/xen-netback/xenbus.c | 6 +- drivers/nfc/s3fwrn5/firmware.c | 4 +- drivers/nvdimm/label.c | 13 ++- drivers/pci/controller/pcie-iproc.c | 10 +- drivers/pci/pci-acpi.c | 4 +- drivers/pci/pci.c | 14 ++- drivers/pci/slot.c | 6 +- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 6 +- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 74 +++++++++++- drivers/pinctrl/aspeed/pinmux-aspeed.h | 7 +- drivers/pinctrl/intel/pinctrl-baytrail.c | 8 +- drivers/pinctrl/intel/pinctrl-merrifield.c | 8 ++ drivers/pinctrl/pinctrl-falcon.c | 14 ++- drivers/pinctrl/sunxi/pinctrl-sunxi.c | 6 +- drivers/platform/chrome/cros_ec_spi.c | 1 - drivers/platform/x86/dell-smbios-base.c | 1 + drivers/platform/x86/intel-vbtn.c | 6 + drivers/platform/x86/mlx-platform.c | 16 +-- drivers/power/supply/axp288_charger.c | 28 +++-- drivers/power/supply/bq24190_charger.c | 20 +++- drivers/ps3/ps3stor_lib.c | 2 +- drivers/pwm/pwm-lp3943.c | 1 + drivers/pwm/pwm-zx.c | 1 + drivers/regulator/axp20x-regulator.c | 2 +- drivers/remoteproc/qcom_q6v5_adsp.c | 13 +-- drivers/remoteproc/qcom_q6v5_mss.c | 5 +- drivers/rtc/rtc-ep93xx.c | 6 +- drivers/rtc/rtc-pcf2127.c | 12 +- drivers/s390/block/dasd_alias.c | 22 +++- drivers/s390/cio/device.c | 4 +- drivers/scsi/bnx2i/Kconfig | 1 + drivers/scsi/fnic/fnic_main.c | 1 + drivers/scsi/lpfc/lpfc_mem.c | 6 +- drivers/scsi/lpfc/lpfc_sli.c | 10 +- drivers/scsi/megaraid/megaraid_sas_base.c | 16 ++- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- drivers/scsi/pm8001/pm8001_init.c | 3 +- drivers/scsi/qedi/qedi_main.c | 4 +- drivers/scsi/qla2xxx/qla_tmpl.c | 9 +- drivers/scsi/qla2xxx/qla_tmpl.h | 2 +- drivers/scsi/scsi_lib.c | 126 ++++++++++++++------- drivers/slimbus/qcom-ngd-ctrl.c | 6 + drivers/soc/amlogic/meson-canvas.c | 4 +- drivers/soc/mediatek/mtk-scpsys.c | 5 +- drivers/soc/qcom/qcom-geni-se.c | 17 ++- drivers/soc/qcom/smp2p.c | 5 +- drivers/soc/renesas/rmobile-sysc.c | 1 + drivers/soc/tegra/fuse/speedo-tegra210.c | 2 +- drivers/soc/ti/knav_dma.c | 13 ++- drivers/soc/ti/knav_qmss_queue.c | 4 +- drivers/spi/atmel-quadspi.c | 27 +++-- drivers/spi/spi-bcm63xx-hsspi.c | 4 +- drivers/spi/spi-davinci.c | 2 +- drivers/spi/spi-fsl-spi.c | 11 +- drivers/spi/spi-gpio.c | 15 +-- drivers/spi/spi-img-spfi.c | 4 +- drivers/spi/spi-mem.c | 1 + drivers/spi/spi-mt7621.c | 11 +- drivers/spi/spi-mxic.c | 10 +- drivers/spi/spi-mxs.c | 1 + drivers/spi/spi-pic32.c | 1 + drivers/spi/spi-pxa2xx.c | 5 +- drivers/spi/spi-rb4xx.c | 2 +- drivers/spi/spi-sc18is602.c | 13 +-- drivers/spi/spi-sh.c | 13 +-- drivers/spi/spi-sprd.c | 1 + drivers/spi/spi-st-ssc4.c | 5 +- drivers/spi/spi-stm32.c | 1 + drivers/spi/spi-synquacer.c | 15 +-- drivers/spi/spi-tegra114.c | 2 + drivers/spi/spi-tegra20-sflash.c | 1 + drivers/spi/spi-tegra20-slink.c | 2 + drivers/spi/spi-ti-qspi.c | 1 + drivers/spi/spi.c | 19 ++-- drivers/staging/comedi/drivers/mf6x4.c | 3 +- drivers/staging/gasket/gasket_interrupt.c | 15 ++- drivers/staging/greybus/audio_codec.c | 2 + drivers/staging/speakup/speakup_dectlk.c | 2 +- drivers/tty/serial/serial_core.c | 4 + drivers/usb/chipidea/ci_hdrc_imx.c | 3 +- drivers/usb/gadget/function/f_acm.c | 2 +- drivers/usb/gadget/function/f_fs.c | 5 +- drivers/usb/gadget/function/f_midi.c | 6 + drivers/usb/gadget/function/f_rndis.c | 4 +- drivers/usb/host/ehci-omap.c | 1 + drivers/usb/host/max3421-hcd.c | 3 +- drivers/usb/host/oxu210hp-hcd.c | 4 +- drivers/usb/mtu3/mtu3_debugfs.c | 2 +- drivers/usb/serial/digi_acceleport.c | 45 +++----- drivers/usb/serial/keyspan_pda.c | 63 ++++++----- drivers/usb/serial/mos7720.c | 2 + drivers/usb/serial/option.c | 23 +++- drivers/vfio/pci/vfio_pci.c | 4 +- drivers/vfio/pci/vfio_pci_nvlink2.c | 7 +- drivers/video/fbdev/atmel_lcdfb.c | 2 +- drivers/virtio/virtio_ring.c | 8 +- drivers/watchdog/Kconfig | 4 +- drivers/watchdog/qcom-wdt.c | 2 +- drivers/watchdog/sprd_wdt.c | 34 +++--- drivers/watchdog/watchdog_core.c | 22 ++-- drivers/xen/xen-pciback/xenbus.c | 2 +- drivers/xen/xenbus/xenbus.h | 2 + drivers/xen/xenbus/xenbus_client.c | 8 +- drivers/xen/xenbus/xenbus_probe.c | 1 + drivers/xen/xenbus/xenbus_probe_backend.c | 7 ++ drivers/xen/xenbus/xenbus_xs.c | 34 ++++-- fs/afs/super.c | 3 + fs/btrfs/extent-tree.c | 22 +++- fs/btrfs/extent_io.h | 2 + fs/btrfs/volumes.c | 4 + fs/ceph/caps.c | 11 +- fs/cifs/smb2ops.c | 3 +- fs/erofs/data.c | 26 ++--- fs/ext4/inode.c | 19 +++- fs/ext4/mballoc.c | 1 + fs/f2fs/node.c | 2 +- fs/jffs2/readinode.c | 16 +++ fs/jffs2/super.c | 17 +++ fs/jfs/jfs_dmap.h | 2 +- fs/lockd/host.c | 20 ++-- fs/nfs/inode.c | 2 +- fs/nfs/nfs4proc.c | 10 +- fs/nfs/nfs4xdr.c | 10 +- fs/nfs_common/grace.c | 6 +- fs/nfsd/nfssvc.c | 3 +- fs/quota/quota_v2.c | 19 ++++ fs/ubifs/auth.c | 4 +- fs/ubifs/io.c | 13 ++- include/acpi/acpi_bus.h | 5 - include/linux/inetdevice.h | 4 +- include/linux/netfilter/x_tables.h | 5 +- include/linux/pm_runtime.h | 21 ++++ include/linux/prefetch.h | 8 ++ include/linux/security.h | 2 +- include/linux/seq_buf.h | 2 +- include/linux/sunrpc/xprt.h | 1 + include/linux/trace_seq.h | 4 +- include/media/v4l2-mediabus.h | 2 + include/net/netfilter/nf_tables.h | 6 + include/uapi/linux/android/binder.h | 1 + include/uapi/linux/if_alg.h | 16 +++ include/xen/xenbus.h | 15 ++- init/initramfs.c | 2 +- kernel/cgroup/cpuset.c | 33 +++++- kernel/cpu.c | 6 +- kernel/irq/irqdomain.c | 11 +- kernel/sched/core.c | 6 +- kernel/sched/deadline.c | 5 +- kernel/sched/sched.h | 42 +++---- kernel/trace/bpf_trace.c | 8 +- kernel/trace/ring_buffer.c | 17 ++- mm/page_alloc.c | 13 ++- net/bluetooth/hci_event.c | 17 +-- net/core/lwt_bpf.c | 8 +- net/ipv4/netfilter/arp_tables.c | 14 +-- net/ipv4/netfilter/ip_tables.c | 14 +-- net/ipv6/netfilter/ip6_tables.c | 14 +-- net/mac80211/vht.c | 14 ++- net/netfilter/nf_tables_api.c | 14 ++- net/netfilter/nft_compat.c | 36 +++++- net/netfilter/nft_ct.c | 2 - net/netfilter/nft_dynset.c | 8 +- net/netfilter/x_tables.c | 49 +++----- net/sunrpc/debugfs.c | 4 +- net/sunrpc/sched.c | 65 ++++++----- net/sunrpc/xprt.c | 65 ++++++++--- net/sunrpc/xprtrdma/module.c | 1 + net/sunrpc/xprtrdma/rpc_rdma.c | 40 +++++-- net/sunrpc/xprtrdma/transport.c | 1 + net/sunrpc/xprtsock.c | 7 +- net/wireless/nl80211.c | 2 +- net/xdp/xsk.c | 10 +- samples/bpf/lwt_len_hist.sh | 2 + samples/bpf/test_lwt_bpf.sh | 0 scripts/Makefile.build | 12 +- scripts/checkpatch.pl | 2 +- scripts/kconfig/preprocess.c | 2 +- security/integrity/ima/ima_crypto.c | 20 +--- security/selinux/hooks.c | 16 ++- sound/core/memalloc.c | 3 +- sound/core/oss/pcm_oss.c | 22 ++-- sound/pci/hda/hda_codec.c | 2 +- sound/pci/hda/hda_sysfs.c | 2 +- sound/pci/hda/patch_ca0132.c | 4 +- sound/pci/hda/patch_realtek.c | 18 +++ sound/soc/amd/acp-da7219-max98357a.c | 9 +- sound/soc/codecs/cx2072x.c | 4 +- sound/soc/codecs/wm8997.c | 2 + sound/soc/codecs/wm8998.c | 4 +- sound/soc/codecs/wm_adsp.c | 5 +- sound/soc/jz4740/jz4740-i2s.c | 4 + sound/soc/meson/Kconfig | 2 +- sound/soc/soc-pcm.c | 2 + sound/soc/sunxi/sun4i-i2s.c | 4 +- sound/usb/clock.c | 6 + sound/usb/quirks.c | 1 + tools/lib/bpf/btf.c | 16 +-- tools/perf/util/parse-regs-options.c | 2 +- tools/perf/util/probe-file.c | 13 ++- tools/testing/selftests/bpf/Makefile | 3 +- .../testing/selftests/bpf/progs/test_tunnel_kern.c | 42 ++----- tools/testing/selftests/bpf/test_offload.py | 1 + tools/testing/selftests/bpf/test_tunnel.sh | 43 ++++++- tools/testing/selftests/net/udpgso_bench_rx.c | 3 + tools/testing/selftests/seccomp/config | 1 + 448 files changed, 2712 insertions(+), 1477 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 13/453 scsi: bnx2i: Requires MMU
From: Randy Dunlap <[email protected]>
[ Upstream commit 2d586494c4a001312650f0b919d534e429dd1e09 ]
The SCSI_BNX2_ISCSI kconfig symbol selects CNIC and CNIC selects UIO, which depends on MMU.
Since 'select' does not follow dependency chains, add the same MMU dependency to SCSI_BNX2_ISCSI.
Quietens this kconfig warning:
WARNING: unmet direct dependencies detected for CNIC
Depends on [n]: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_BROADCOM [=y] && PCI [=y] && (IPV6 [=m] || IPV6 [=m]=n) && MMU [=n] Selected by [m]:
- SCSI_BNX2_ISCSI [=m] && SCSI_LOWLEVEL [=y] && SCSI [=y] && NET [=y] && PCI [=y] && (IPV6 [=m] || IPV6 [=m]=n)
--- drivers/scsi/bnx2i/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/bnx2i/Kconfig +1 -0
@@ -4,6 +4,7 @@ config SCSI_BNX2_ISCSI depends on NET depends on PCI depends on (IPV6 || IPV6=n) + depends on MMU select SCSI_ISCSI_ATTRS select NETDEVICES select ETHERNET
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 18/453 block: Simplify REQ_OP_ZONE_RESET_ALL handling
In reply to Greg Kroah-HartmanFrom: Damien Le Moal <[email protected]>
[ Upstream commit c7a1d926dc4076aadad187614500afcd8de78818 ]
There is no need for the function __blkdev_reset_all_zones() as REQ_OP_ZONE_RESET_ALL can be handled directly in blkdev_reset_zones() bio loop with an early break from the loop. This patch removes this function and modifies blkdev_reset_zones(), simplifying the code.
--- block/blk-zoned.c | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-)
block/blk-zoned.c +13 -27
@@ -202,32 +202,14 @@ int blkdev_report_zones(struct block_device *bdev, sector_t sector, }EXPORT_SYMBOL_GPL (blkdev_report_zones); -/* -* Special case of zone reset operation to reset all zones in one command, -* useful for applications like mkfs. -*/ -static int __blkdev_reset_all_zones (struct block_device *bdev,gfp_t gfp_mask) -{ -struct bio *bio =bio_alloc (gfp_mask,0 ); -int ret; - -/* across the zones operations, don't need any sectors */ -bio_set_dev (bio, bdev); -bio_set_op_attrs (bio,REQ_OP_ZONE_RESET_ALL ,0 ); - - ret =submit_bio_wait (bio); -bio_put (bio); - -return ret; -} -static inline bool blkdev_allow_reset_all_zones (struct block_device *bdev, +sector_t sector,sector_t nr_sectors) {if (!blk_queue_zone_resetall (bdev_get_queue (bdev)))return false; -if (nr_sectors !=part_nr_sects_read (bdev->bd_part)) +if (sector || nr_sectors !=part_nr_sects_read (bdev->bd_part))return false;/* * REQ_OP_ZONE_RESET_ALL can be executed only if the block device is
@@ -271,9 +253,6 @@ int blkdev_reset_zones(struct block_device *bdev,/* Out of range */ return -EINVAL ; -if (blkdev_allow_reset_all_zones (bdev, nr_sectors)) -return __blkdev_reset_all_zones (bdev, gfp_mask); -/* Check alignment (handle eventual smaller last zone) */ zone_sectors =blk_queue_zone_sectors (q);if (sector & (zone_sectors -1 ))
@@ -285,17 +264,24 @@ int blkdev_reset_zones(struct block_device *bdev,blk_start_plug (&plug);while (sector < end_sector) { - bio =blk_next_bio (bio,0 , gfp_mask); - bio->bi_iter.bi_sector = sector;bio_set_dev (bio, bdev); -bio_set_op_attrs (bio,REQ_OP_ZONE_RESET ,0 ); +/* +* Special case for the zone reset operation that reset all +* zones, this is useful for applications like mkfs. +*/ +if (blkdev_allow_reset_all_zones (bdev, sector, nr_sectors)) { + bio->bi_opf =REQ_OP_ZONE_RESET_ALL ; +break ; + } + + bio->bi_opf =REQ_OP_ZONE_RESET ; + bio->bi_iter.bi_sector = sector; sector += zone_sectors;/* This may take a while, so be nice to others */ cond_resched (); - } ret =submit_bio_wait (bio);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 21/453 pinctrl: aspeed: Fix GPIO requests on pass-through banks
In reply to Greg Kroah-HartmanFrom: Andrew Jeffery <[email protected]>
[ Upstream commit 7aeb353802611a8e655e019f09a370ff682af1a6 ]
Commit 6726fbff19bf ("pinctrl: aspeed: Fix GPI only function problem.") fixes access to GPIO banks T and U on the AST2600. Both banks contain input-only pins and the GPIO pin function is named GPITx and GPIUx respectively. Unfortunately the fix had a negative impact on GPIO banks D and E for the AST2400 and AST2500 where the GPIO pass-through functions take similar "GPI"-style names. The net effect on the older SoCs was that when the GPIO subsystem requested a pin in banks D or E be muxed for GPIO, they were instead muxed for pass-through mode. Mistakenly muxing pass-through mode e.g. breaks booting the host on IBM's Witherspoon (AC922) platform where GPIOE0 is used for FSI.
Further exploit the names in the provided expression structure to differentiate pass-through from pin-specific GPIO modes.
This follow-up fix gives the expected behaviour for the following tests:
Witherspoon BMC (AST2500):
1. Power-on the Witherspoon host
2. Request GPIOD1 be muxed via /sys/class/gpio/export
3. Request GPIOE1 be muxed via /sys/class/gpio/export
4. Request the balls for GPIOs E2 and E3 be muxed as GPIO pass-through ("GPIE2" mode) via a pinctrl hog in the devicetree
Rainier BMC (AST2600):
5. Request GPIT0 be muxed via /sys/class/gpio/export
6. Request GPIU0 be muxed via /sys/class/gpio/export
Together the tests demonstrate that all three pieces of functionality (general GPIOs via 1, 2 and 3, input-only GPIOs via 5 and 6, pass-through mode via 4) operate as desired across old and new SoCs.
--- drivers/pinctrl/aspeed/pinctrl-aspeed.c | 74 +++++++++++++++++++++++-- drivers/pinctrl/aspeed/pinmux-aspeed.h | 7 ++- 2 files changed, 72 insertions(+), 9 deletions(-)
drivers/pinctrl/aspeed/pinctrl-aspeed.c +68 -6
@@ -277,14 +277,76 @@ int aspeed_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned int function,static bool aspeed_expr_is_gpio (const struct aspeed_sig_expr *expr) {/* -* The signal type is GPIO if the signal name has "GPI" as a prefix. -* strncmp (rather than strcmp) is used to implement the prefix -* requirement. +* We need to differentiate between GPIO and non-GPIO signals to +* implement the gpio_request_enable() interface. For better or worse +* the ASPEED pinctrl driver uses the expression names to determine +* whether an expression will mux a pin for GPIO. * -* expr->signal might look like "GPIOB1" in the GPIO case. -* expr->signal might look like "GPIT0" in the GPI case. +* Generally we have the following - A GPIO such as B1 has: +* +* - expr->signal set to "GPIOB1" +* - expr->function set to "GPIOB1" +* +* Using this fact we can determine whether the provided expression is +* a GPIO expression by testing the signal name for the string prefix +* "GPIO". +* +* However, some GPIOs are input-only, and the ASPEED datasheets name +* them differently. An input-only GPIO such as T0 has: +* +* - expr->signal set to "GPIT0" +* - expr->function set to "GPIT0" +* +* It's tempting to generalise the prefix test from "GPIO" to "GPI" to +* account for both GPIOs and GPIs, but in doing so we run aground on +* another feature: +* +* Some pins in the ASPEED BMC SoCs have a "pass-through" GPIO +* function where the input state of one pin is replicated as the +* output state of another (as if they were shorted together - a mux +* configuration that is typically enabled by hardware strapping). +* This feature allows the BMC to pass e.g. power button state through +* to the host while the BMC is yet to boot, but take control of the +* button state once the BMC has booted by muxing each pin as a +* separate, pin-specific GPIO. +* +* Conceptually this pass-through mode is a form of GPIO and is named +* as such in the datasheets, e.g. "GPID0". This naming similarity +* trips us up with the simple GPI-prefixed-signal-name scheme +* discussed above, as the pass-through configuration is not what we +* want when muxing a pin as GPIO for the GPIO subsystem. +* +* On e.g. the AST2400, a pass-through function "GPID0" is grouped on +* balls A18 and D16, where we have: +* +* For ball A18: +* - expr->signal set to "GPID0IN" +* - expr->function set to "GPID0" +* +* For ball D16: +* - expr->signal set to "GPID0OUT" +* - expr->function set to "GPID0" +* +* By contrast, the pin-specific GPIO expressions for the same pins are +* as follows: +* +* For ball A18: +* - expr->signal looks like "GPIOD0" +* - expr->function looks like "GPIOD0" +* +* For ball D16: +* - expr->signal looks like "GPIOD1" +* - expr->function looks like "GPIOD1" +* +* Testing both the signal _and_ function names gives us the means +* differentiate the pass-through GPIO pinmux configuration from the +* pin-specific configuration that the GPIO subsystem is after: An +* expression is a pin-specific (non-pass-through) GPIO configuration +* if the signal prefix is "GPI" and the signal name matches the +* function name. */ -return strncmp (expr->signal,"GPI" ,3 ) ==0 ; +return !strncmp (expr->signal,"GPI" ,3 ) && + !strcmp (expr->signal, expr->function); }static bool aspeed_gpio_in_exprs (const struct aspeed_sig_expr **exprs)
drivers/pinctrl/aspeed/pinmux-aspeed.h +4 -3
@@ -452,10 +452,11 @@ struct aspeed_sig_desc {* evaluation of the descriptors. * * @signal: The signal name for the priority level on the pin. If the signal -* type is GPIO, then the signal name must begin with the string -* "GPIO", e.g. GPIOA0, GPIOT4 etc. +* type is GPIO, then the signal name must begin with the +* prefix "GPI", e.g. GPIOA0, GPIT0 etc. * @function: The name of the function the signal participates in for the -* associated expression +* associated expression. For pin-specific GPIO, the function +* name must match the signal name. * @ndescs: The number of signal descriptors in the expression * @descs: Pointer to an array of signal descriptors that comprise the * function expression
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 3/453 ARM: dts: sun8i: v40: bananapi-m2-berry: Fix ethernet node
In reply to Greg Kroah-HartmanFrom: Pablo Greco <[email protected]>
[ Upstream commit 8a82d91fa275aaea49be06d7f5b1407ce1c0dd4b ]
Ethernet PHY on BananaPi M2 Berry provides RX and TX delays. Fix ethernet node to reflect that fact.
--- arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts +1 -1
@@ -120,7 +120,7 @@ pinctrl-names = "default"; pinctrl-0 = <&gmac_rgmii_pins>; phy-handle = <&phy1>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-supply = <®_dc1sw>; status = "okay"; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 17/453 clk: renesas: r9a06g032: Drop __packed for portability
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit ceabbf94c317c6175dee6e91805fca4a6353745a ]
The R9A06G032 clock driver uses an array of packed structures to reduce kernel size. However, this array contains pointers, which are no longer aligned naturally, and cannot be relocated on PPC64. Hence when compile-testing this driver on PPC64 with CONFIG_RELOCATABLE=y (e.g. PowerPC allyesconfig), the following warnings are produced:
WARNING: 136 bad relocations
c000000000616be3 R_PPC64_UADDR64 .rodata+0x00000000000cf338
c000000000616bfe R_PPC64_UADDR64 .rodata+0x00000000000cf370
...Fix this by dropping the __packed attribute from the r9a06g032_clkdesc definition, trading a small size increase for portability.
This increases the 156-entry clock table by 1 byte per entry, but due to the compiler generating more efficient code for unpacked accesses, the net size increase is only 76 bytes (gcc 9.3.0 on arm32).
--- drivers/clk/renesas/r9a06g032-clocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/renesas/r9a06g032-clocks.c +1 -1
@@ -55,7 +55,7 @@ struct r9a06g032_clkdesc {u16 sel, g1, r1, g2, r2; } dual; }; -} __packed; +};#define I_GATE (_clk, _rst, _rdy, _midle, _scon, _mirack, _mistat) \ { .gate = _clk, .reset = _rst, \
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 14/453 xsk: Fix xsk_poll()s return type
In reply to Greg Kroah-HartmanFrom: Luc Van Oostenryck <[email protected]>
[ Upstream commit 5d946c5abbaf68083fa6a41824dd79e1f06286d8 ]
xsk_poll() is defined as returning 'unsigned int' but the .poll method is declared as returning '__poll_t', a bitwise type.
Fix this by using the proper return type and using the EPOLL constants instead of the POLL ones, as required for __poll_t.
--- net/xdp/xsk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/xdp/xsk.c +4 -4
@@ -426,10 +426,10 @@ static int xsk_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)return __xsk_sendmsg (sk); } -static unsigned int xsk_poll (struct file *file,struct socket *sock, +static __poll_t xsk_poll (struct file *file,struct socket *sock,struct poll_table_struct *wait) { -unsigned int mask =datagram_poll (file, sock, wait); +__poll_t mask =datagram_poll (file, sock, wait);struct sock *sk = sock->sk;struct xdp_sock *xs =xdp_sk (sk);struct xdp_umem *umem;
@@ -448,9 +448,9 @@ static unsigned int xsk_poll(struct file *file, struct socket *sock, }if (xs->rx && !xskq_empty_desc (xs->rx)) - mask |=POLLIN |POLLRDNORM ; + mask |=EPOLLIN |EPOLLRDNORM ;if (xs->tx && !xskq_full_desc (xs->tx)) - mask |=POLLOUT |POLLWRNORM ; + mask |=EPOLLOUT |EPOLLWRNORM ;return mask; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 16/453 can: softing: softing_netdev_open(): fix error handling
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit 4d1be581ec6b92a338bb7ed23e1381f45ddf336f ]
If softing_netdev_open() fails, we should call close_candev() to avoid reference leak.
--- drivers/net/can/softing/softing_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/can/softing/softing_main.c +7 -2
@@ -382,8 +382,13 @@ static int softing_netdev_open(struct net_device *ndev)/* check or determine and set bittime */ ret =open_candev (ndev); -if (!ret) - ret =softing_startstop (ndev,1 ); +if (ret) +return ret; + + ret =softing_startstop (ndev,1 ); +if (ret <0 ) +close_candev (ndev); +return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 20/453 blk-mq: In blk_mq_dispatch_rq_list() "no budget" is a reason to kick
In reply to Greg Kroah-HartmanFrom: Douglas Anderson <[email protected]>
[ Upstream commit ab3cee3762e5e69f27c302c43691289fdfc12316 ]
In blk_mq_dispatch_rq_list(), if blk_mq_sched_needs_restart() returns true and the driver returns BLK_STS_RESOURCE then we'll kick the queue. However, there's another case where we might need to kick it. If we were unable to get budget we can be in much the same state as when the driver returns BLK_STS_RESOURCE, so we should treat it the same.
It should be noted that even if we add a whole bunch of extra kicking to the queue in other patches this patch is still important. Specifically any kicking that happened before we re-spliced leftover requests into 'hctx->dispatch' wouldn't have found any work, so we really need to make sure we kick ourselves after we've done the splicing.
--- block/blk-mq.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
block/blk-mq.c +6 -2
@@ -1233,6 +1233,7 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list,bool no_tag = false;int errors, queued;blk_status_t ret =BLK_STS_OK ; +bool no_budget_avail = false;if (list_empty (list))return false;
@@ -1251,6 +1252,7 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list, hctx = rq->mq_hctx;if (!got_budget && !blk_mq_get_dispatch_budget (hctx)) {blk_mq_put_driver_tag (rq); + no_budget_avail = true;break ; }
@@ -1356,13 +1358,15 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list,* * If driver returns BLK_STS_RESOURCE and SCHED_RESTART * bit is set, run queue after a delay to avoid IO stalls -* that could otherwise occur if the queue is idle. +* that could otherwise occur if the queue is idle. We'll do +* similar if we couldn't get budget and SCHED_RESTART is set. */ needs_restart =blk_mq_sched_needs_restart (hctx);if (!needs_restart || (no_tag &&list_empty_careful (&hctx->dispatch_wait.entry)))blk_mq_run_hw_queue (hctx, true); -else if (needs_restart && (ret ==BLK_STS_RESOURCE )) +else if (needs_restart && (ret ==BLK_STS_RESOURCE || + no_budget_avail))blk_mq_delay_run_hw_queue (hctx,BLK_MQ_RESOURCE_DELAY );blk_mq_update_dispatch_busy (hctx, true);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 24/453 netfilter: nft_dynset: fix timeouts later than 23 days
In reply to Greg Kroah-HartmanFrom: Pablo Neira Ayuso <[email protected]>
[ Upstream commit 917d80d376ffbaa9725fde9e3c0282f63643f278 ]
Use nf_msecs_to_jiffies64 and nf_jiffies64_to_msecs as provided by 8e1102d5a159 ("netfilter: nf_tables: support timeouts larger than 23 days"), otherwise ruleset listing breaks.
--- include/net/netfilter/nf_tables.h | 4 ++++ net/netfilter/nf_tables_api.c | 4 ++-- net/netfilter/nft_dynset.c | 8 +++++--- 3 files changed, 11 insertions(+), 5 deletions(-)
include/net/netfilter/nf_tables.h +4 -0
@@ -1464,4 +1464,8 @@ void __init nft_chain_route_init(void);void nft_chain_route_fini (void );void nf_tables_trans_destroy_flush_work (void ); + +int nf_msecs_to_jiffies64 (const struct nlattr *nla,u64 *result); +__be64 nf_jiffies64_to_msecs (u64 input); +#endif /* _NET_NF_TABLES_H */
net/netfilter/nf_tables_api.c +2 -2
@@ -3277,7 +3277,7 @@ static int nf_tables_set_alloc_name(struct nft_ctx *ctx, struct nft_set *set,return 0 ; } -static int nf_msecs_to_jiffies64 (const struct nlattr *nla,u64 *result) +int nf_msecs_to_jiffies64 (const struct nlattr *nla,u64 *result) {u64 ms =be64_to_cpu (nla_get_be64 (nla));u64 max = (u64)(~((u64 )0 ));
@@ -3291,7 +3291,7 @@ static int nf_msecs_to_jiffies64(const struct nlattr *nla, u64 *result)return 0 ; } -static __be64 nf_jiffies64_to_msecs (u64 input) +__be64 nf_jiffies64_to_msecs (u64 input) {return cpu_to_be64 (jiffies64_to_msecs (input)); }
net/netfilter/nft_dynset.c +5 -3
@@ -180,8 +180,10 @@ static int nft_dynset_init(const struct nft_ctx *ctx,if (tb[NFTA_DYNSET_TIMEOUT ] !=NULL ) {if (!(set->flags &NFT_SET_TIMEOUT ))return -EINVAL ; - timeout =msecs_to_jiffies (be64_to_cpu (nla_get_be64 ( - tb[NFTA_DYNSET_TIMEOUT ]))); + + err =nf_msecs_to_jiffies64 (tb[NFTA_DYNSET_TIMEOUT ], &timeout); +if (err) +return err; } priv->sreg_key =nft_parse_register (tb[NFTA_DYNSET_SREG_KEY ]);
@@ -296,7 +298,7 @@ static int nft_dynset_dump(struct sk_buff *skb, const struct nft_expr *expr)if (nla_put_string (skb,NFTA_DYNSET_SET_NAME , priv->set->name)) goto nla_put_failure;if (nla_put_be64 (skb,NFTA_DYNSET_TIMEOUT , -cpu_to_be64 (jiffies_to_msecs (priv->timeout)), +nf_jiffies64_to_msecs (priv->timeout),NFTA_DYNSET_PAD )) goto nla_put_failure;if (priv->expr &&nft_expr_dump (skb,NFTA_DYNSET_EXPR , priv->expr))
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 4/453 pinctrl: merrifield: Set default bias in case no particular value given
In reply to Greg Kroah-HartmanFrom: Andy Shevchenko <[email protected]>
[ Upstream commit 0fa86fc2e28227f1e64f13867e73cf864c6d25ad ]
When GPIO library asks pin control to set the bias, it doesn't pass any value of it and argument is considered boolean (and this is true for ACPI GpioIo() / GpioInt() resources, by the way). Thus, individual drivers must behave well, when they got the resistance value of 1 Ohm, i.e. transforming it to sane default.
In case of Intel Merrifield pin control hardware the 20 kOhm sounds plausible because it gives a good trade off between weakness and minimization of leakage current (will be only 50 uA with the above choice).
Depends-on: 2956b5d94a76 ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips")
--- drivers/pinctrl/intel/pinctrl-merrifield.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/pinctrl/intel/pinctrl-merrifield.c +8 -0
@@ -741,6 +741,10 @@ static int mrfld_config_set_pin(struct mrfld_pinctrl *mp, unsigned int pin, mask |= BUFCFG_Px_EN_MASK |BUFCFG_PUPD_VAL_MASK ; bits |=BUFCFG_PU_EN ; +/* Set default strength value in case none is given */ +if (arg ==1 ) + arg =20000 ; +switch (arg) {case 50000 : bits |=BUFCFG_PUPD_VAL_50K <<BUFCFG_PUPD_VAL_SHIFT ;
@@ -761,6 +765,10 @@ static int mrfld_config_set_pin(struct mrfld_pinctrl *mp, unsigned int pin, mask |= BUFCFG_Px_EN_MASK |BUFCFG_PUPD_VAL_MASK ; bits |=BUFCFG_PD_EN ; +/* Set default strength value in case none is given */ +if (arg ==1 ) + arg =20000 ; +switch (arg) {case 50000 : bits |=BUFCFG_PUPD_VAL_50K <<BUFCFG_PUPD_VAL_SHIFT ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 25/453 afs: Fix memory leak when mounting with multiple source parameters
In reply to Greg Kroah-HartmanFrom: David Howells <[email protected]>
[ Upstream commit 4cb682964706deffb4861f0a91329ab3a705039f ]
There's a memory leak in afs_parse_source() whereby multiple source= parameters overwrite fc->source in the fs_context struct without freeing the previously recorded source.
Fix this by only permitting a single source parameter and rejecting with an error all subsequent ones.
This was caught by syzbot with the kernel memory leak detector, showing something like the following trace:
unreferenced object 0xffff888114375440 (size 32):
comm "repro", pid 5168, jiffies 4294923723 (age 569.948s)
backtrace:
slab_post_alloc_hook+0x42/0x79
__kmalloc_track_caller+0x125/0x16a
kmemdup_nul+0x24/0x3c
vfs_parse_fs_string+0x5a/0xa1
generic_parse_monolithic+0x9d/0xc5
do_new_mount+0x10d/0x15a
do_mount+0x5f/0x8e
__do_sys_mount+0xff/0x127
do_syscall_64+0x2d/0x3a
entry_SYSCALL_64_after_hwframe+0x44/0xa9--- fs/afs/super.c | 3 +++ 1 file changed, 3 insertions(+)
fs/afs/super.c +3 -0
@@ -236,6 +236,9 @@ static int afs_parse_source(struct fs_context *fc, struct fs_parameter *param)_enter (",%s" , name); +if (fc->source) +return invalf (fc,"kAFS: Multiple sources not supported" ); +if (!name) {printk (KERN_ERR "kAFS: no volume name specified\n" );return -EINVAL ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 28/453 netfilter: nft_ct: Remove confirmation check for NFT_CT_ID
In reply to Greg Kroah-HartmanFrom: Brett Mastbergen <[email protected]>
[ Upstream commit 2d94b20b95b009eec1a267dcf026b01af627c0cd ]
Since commit 656c8e9cc1ba ("netfilter: conntrack: Use consistent ct id hash calculation") the ct id will not change from initialization to confirmation. Removing the confirmation check allows for things like adding an element to a 'typeof ct id' set in prerouting upon reception of the first packet of a new connection, and then being able to reference that set consistently both before and after the connection is confirmed.
--- net/netfilter/nft_ct.c | 2 -- 1 file changed, 2 deletions(-)
net/netfilter/nft_ct.c +0 -2
@@ -177,8 +177,6 @@ static void nft_ct_get_eval(const struct nft_expr *expr, }#endif case NFT_CT_ID : -if (!nf_ct_is_confirmed (ct)) - goto err; *dest =nf_ct_get_id (ct);return ;default :
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 22/453 netfilter: x_tables: Switch synchronization to RCU
In reply to Greg Kroah-HartmanFrom: Subash Abhinov Kasiviswanathan <[email protected]>
[ Upstream commit cc00bcaa589914096edef7fb87ca5cee4a166b5c ]
When running concurrent iptables rules replacement with data, the per CPU sequence count is checked after the assignment of the new information. The sequence count is used to synchronize with the packet path without the use of any explicit locking. If there are any packets in the packet path using the table information, the sequence count is incremented to an odd value and is incremented to an even after the packet process completion.
The new table value assignment is followed by a write memory barrier so every CPU should see the latest value. If the packet path has started with the old table information, the sequence counter will be odd and the iptables replacement will wait till the sequence count is even prior to freeing the old table info.
However, this assumes that the new table information assignment and the memory barrier is actually executed prior to the counter check in the replacement thread. If CPU decides to execute the assignment later as there is no user of the table information prior to the sequence check, the packet path in another CPU may use the old table information. The replacement thread would then free the table information under it leading to a use after free in the packet processing context-
Unable to handle kernel NULL pointer dereference at virtual address 000000000000008e pc : ip6t_do_table+0x5d0/0x89c lr : ip6t_do_table+0x5b8/0x89c ip6t_do_table+0x5d0/0x89c ip6table_filter_hook+0x24/0x30 nf_hook_slow+0x84/0x120 ip6_input+0x74/0xe0 ip6_rcv_finish+0x7c/0x128 ipv6_rcv+0xac/0xe4 __netif_receive_skb+0x84/0x17c process_backlog+0x15c/0x1b8 napi_poll+0x88/0x284 net_rx_action+0xbc/0x23c __do_softirq+0x20c/0x48c
This could be fixed by forcing instruction order after the new table information assignment or by switching to RCU for the synchronization.
--- include/linux/netfilter/x_tables.h | 5 ++- net/ipv4/netfilter/arp_tables.c | 14 ++++----- net/ipv4/netfilter/ip_tables.c | 14 ++++----- net/ipv6/netfilter/ip6_tables.c | 14 ++++----- net/netfilter/x_tables.c | 49 +++++++++--------------------- 5 files changed, 40 insertions(+), 56 deletions(-)
include/linux/netfilter/x_tables.h +4 -1
@@ -227,7 +227,7 @@ struct xt_table {unsigned int valid_hooks;/* Man behind the curtain... */ -struct xt_table_info *private; +struct xt_table_info __rcu *private;/* Set this to THIS_MODULE if you are a module, otherwise NULL */ struct module *me;
@@ -448,6 +448,9 @@ xt_get_per_cpu_counter(struct xt_counters *cnt, unsigned int cpu)struct nf_hook_ops *xt_hook_ops_alloc (const struct xt_table *,nf_hookfn *); +struct xt_table_info +*xt_table_get_private_protected (const struct xt_table *table); +#ifdef CONFIG_COMPAT #include <net/compat.h>
net/ipv4/netfilter/arp_tables.c +7 -7
@@ -203,7 +203,7 @@ unsigned int arpt_do_table(struct sk_buff *skb,local_bh_disable (); addend =xt_write_recseq_begin (); - private =READ_ONCE (table->private);/* Address dependency. */ + private =rcu_access_pointer (table->private); cpu =smp_processor_id (); table_base = private->entries; jumpstack = (struct arpt_entry **)private->jumpstack[cpu];
@@ -649,7 +649,7 @@ static struct xt_counters *alloc_counters(const struct xt_table *table) {unsigned int countersize;struct xt_counters *counters; -const struct xt_table_info *private = table->private; +const struct xt_table_info *private =xt_table_get_private_protected (table);/* We need atomic snapshot of counters: rest doesn't change * (other than comefrom, which userspace doesn't care
@@ -673,7 +673,7 @@ static int copy_entries_to_user(unsigned int total_size,unsigned int off, num;const struct arpt_entry *e;struct xt_counters *counters; -struct xt_table_info *private = table->private; +struct xt_table_info *private =xt_table_get_private_protected (table);int ret =0 ;void *loc_cpu_entry;
@@ -808,7 +808,7 @@ static int get_info(struct net *net, void __user *user, t =xt_request_find_table_lock (net,NFPROTO_ARP , name);if (!IS_ERR (t)) {struct arpt_getinfo info; -const struct xt_table_info *private = t->private; +const struct xt_table_info *private =xt_table_get_private_protected (t);#ifdef CONFIG_COMPAT struct xt_table_info tmp;
@@ -861,7 +861,7 @@ static int get_entries(struct net *net, struct arpt_get_entries __user *uptr, t =xt_find_table_lock (net,NFPROTO_ARP , get.name);if (!IS_ERR (t)) { -const struct xt_table_info *private = t->private; +const struct xt_table_info *private =xt_table_get_private_protected (t);if (get.size == private->size) ret = copy_entries_to_user(private->size,
@@ -1020,7 +1020,7 @@ static int do_add_counters(struct net *net, const void __user *user, }local_bh_disable (); - private = t->private; + private =xt_table_get_private_protected (t);if (private->number != tmp.num_counters) { ret = -EINVAL ; goto unlock_up_free;
@@ -1357,7 +1357,7 @@ static int compat_copy_entries_to_user(unsigned int total_size, void __user *userptr) {struct xt_counters *counters; -const struct xt_table_info *private = table->private; +const struct xt_table_info *private =xt_table_get_private_protected (table);void __user *pos;unsigned int size;int ret =0 ;
net/ipv4/netfilter/ip_tables.c +7 -7
@@ -258,7 +258,7 @@ ipt_do_table(struct sk_buff *skb,WARN_ON (!(table->valid_hooks & (1 << hook)));local_bh_disable (); addend =xt_write_recseq_begin (); - private =READ_ONCE (table->private);/* Address dependency. */ + private =rcu_access_pointer (table->private); cpu =smp_processor_id (); table_base = private->entries; jumpstack = (struct ipt_entry **)private->jumpstack[cpu];
@@ -791,7 +791,7 @@ static struct xt_counters *alloc_counters(const struct xt_table *table) {unsigned int countersize;struct xt_counters *counters; -const struct xt_table_info *private = table->private; +const struct xt_table_info *private =xt_table_get_private_protected (table);/* We need atomic snapshot of counters: rest doesn't change (other than comefrom, which userspace doesn't care
@@ -815,7 +815,7 @@ copy_entries_to_user(unsigned int total_size,unsigned int off, num;const struct ipt_entry *e;struct xt_counters *counters; -const struct xt_table_info *private = table->private; +const struct xt_table_info *private =xt_table_get_private_protected (table);int ret =0 ;const void *loc_cpu_entry;
@@ -965,7 +965,7 @@ static int get_info(struct net *net, void __user *user, t =xt_request_find_table_lock (net,AF_INET , name);if (!IS_ERR (t)) {struct ipt_getinfo info; -const struct xt_table_info *private = t->private; +const struct xt_table_info *private =xt_table_get_private_protected (t);#ifdef CONFIG_COMPAT struct xt_table_info tmp;
@@ -1019,7 +1019,7 @@ get_entries(struct net *net, struct ipt_get_entries __user *uptr, t =xt_find_table_lock (net,AF_INET , get.name);if (!IS_ERR (t)) { -const struct xt_table_info *private = t->private; +const struct xt_table_info *private =xt_table_get_private_protected (t);if (get.size == private->size) ret =copy_entries_to_user (private->size, t, uptr->entrytable);
@@ -1175,7 +1175,7 @@ do_add_counters(struct net *net, const void __user *user, }local_bh_disable (); - private = t->private; + private =xt_table_get_private_protected (t);if (private->number != tmp.num_counters) { ret = -EINVAL ; goto unlock_up_free;
@@ -1570,7 +1570,7 @@ compat_copy_entries_to_user(unsigned int total_size, struct xt_table *table, void __user *userptr) {struct xt_counters *counters; -const struct xt_table_info *private = table->private; +const struct xt_table_info *private =xt_table_get_private_protected (table);void __user *pos;unsigned int size;int ret =0 ;
net/ipv6/netfilter/ip6_tables.c +7 -7
@@ -280,7 +280,7 @@ ip6t_do_table(struct sk_buff *skb,local_bh_disable (); addend =xt_write_recseq_begin (); - private =READ_ONCE (table->private);/* Address dependency. */ + private =rcu_access_pointer (table->private); cpu =smp_processor_id (); table_base = private->entries; jumpstack = (struct ip6t_entry **)private->jumpstack[cpu];
@@ -807,7 +807,7 @@ static struct xt_counters *alloc_counters(const struct xt_table *table) {unsigned int countersize;struct xt_counters *counters; -const struct xt_table_info *private = table->private; +const struct xt_table_info *private =xt_table_get_private_protected (table);/* We need atomic snapshot of counters: rest doesn't change (other than comefrom, which userspace doesn't care
@@ -831,7 +831,7 @@ copy_entries_to_user(unsigned int total_size,unsigned int off, num;const struct ip6t_entry *e;struct xt_counters *counters; -const struct xt_table_info *private = table->private; +const struct xt_table_info *private =xt_table_get_private_protected (table);int ret =0 ;const void *loc_cpu_entry;
@@ -981,7 +981,7 @@ static int get_info(struct net *net, void __user *user, t =xt_request_find_table_lock (net,AF_INET6 , name);if (!IS_ERR (t)) {struct ip6t_getinfo info; -const struct xt_table_info *private = t->private; +const struct xt_table_info *private =xt_table_get_private_protected (t);#ifdef CONFIG_COMPAT struct xt_table_info tmp;
@@ -1036,7 +1036,7 @@ get_entries(struct net *net, struct ip6t_get_entries __user *uptr, t =xt_find_table_lock (net,AF_INET6 , get.name);if (!IS_ERR (t)) { -struct xt_table_info *private = t->private; +struct xt_table_info *private =xt_table_get_private_protected (t);if (get.size == private->size) ret =copy_entries_to_user (private->size, t, uptr->entrytable);
@@ -1191,7 +1191,7 @@ do_add_counters(struct net *net, const void __user *user, unsigned int len, }local_bh_disable (); - private = t->private; + private =xt_table_get_private_protected (t);if (private->number != tmp.num_counters) { ret = -EINVAL ; goto unlock_up_free;
@@ -1579,7 +1579,7 @@ compat_copy_entries_to_user(unsigned int total_size, struct xt_table *table, void __user *userptr) {struct xt_counters *counters; -const struct xt_table_info *private = table->private; +const struct xt_table_info *private =xt_table_get_private_protected (table);void __user *pos;unsigned int size;int ret =0 ;
net/netfilter/x_tables.c +15 -34
94 lines not on this page · raw message
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 29/453 selftests/bpf/test_offload.py: Reset ethtool features after failed setting
In reply to Greg Kroah-HartmanFrom: Toke Høiland-Jørgensen <[email protected]>
[ Upstream commit 766e62b7fcd2cf1d43e6594ba37c659dc48f7ddb ]
When setting the ethtool feature flag fails (as expected for the test), the kernel now tracks that the feature was requested to be 'off' and refuses to subsequently disable it again. So reset it back to 'on' so a subsequent disable (that's not supposed to fail) can succeed.
--- tools/testing/selftests/bpf/test_offload.py | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/bpf/test_offload.py +1 -0
@@ -930,6 +930,7 @@ try: start_test("Test disabling TC offloads is rejected while filters installed...") ret, _ = sim.set_ethtool_tc_offloads(False, fail=False) fail(ret == 0, "Driver should refuse to disable TC offloads with filters installed...") + sim.set_ethtool_tc_offloads(True) start_test("Test qdisc removal frees things...") sim.tc_flush_filters()
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 5/453 pinctrl: baytrail: Avoid clearing debounce value when turning it off
In reply to Greg Kroah-HartmanFrom: Andy Shevchenko <[email protected]>
[ Upstream commit 0b74e40a4e41f3cbad76dff4c50850d47b525b26 ]
Baytrail pin control has a common register to set up debounce timeout. When a pin configuration requested debounce to be disabled, the rest of the pins may still want to have debounce enabled and thus rely on the common timeout value. Avoid clearing debounce value when turning it off for one pin while others may still use it.
Depends-on: 04ff5a095d66 ("pinctrl: baytrail: Rectify debounce support")
Depends-on: 827e1579e1d5 ("pinctrl: baytrail: Rectify debounce support (part 2)")
--- drivers/pinctrl/intel/pinctrl-baytrail.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/pinctrl/intel/pinctrl-baytrail.c +7 -1
@@ -1060,7 +1060,6 @@ static int byt_pin_config_set(struct pinctrl_dev *pctl_dev,break ;case PIN_CONFIG_INPUT_DEBOUNCE : debounce =readl (db_reg); - debounce &= ~BYT_DEBOUNCE_PULSE_MASK ;if (arg) conf |=BYT_DEBOUNCE_EN ;
@@ -1069,24 +1068,31 @@ static int byt_pin_config_set(struct pinctrl_dev *pctl_dev,switch (arg) {case 375 : + debounce &= ~BYT_DEBOUNCE_PULSE_MASK ; debounce |=BYT_DEBOUNCE_PULSE_375US ;break ;case 750 : + debounce &= ~BYT_DEBOUNCE_PULSE_MASK ; debounce |=BYT_DEBOUNCE_PULSE_750US ;break ;case 1500 : + debounce &= ~BYT_DEBOUNCE_PULSE_MASK ; debounce |=BYT_DEBOUNCE_PULSE_1500US ;break ;case 3000 : + debounce &= ~BYT_DEBOUNCE_PULSE_MASK ; debounce |=BYT_DEBOUNCE_PULSE_3MS ;break ;case 6000 : + debounce &= ~BYT_DEBOUNCE_PULSE_MASK ; debounce |=BYT_DEBOUNCE_PULSE_6MS ;break ;case 12000 : + debounce &= ~BYT_DEBOUNCE_PULSE_MASK ; debounce |=BYT_DEBOUNCE_PULSE_12MS ;break ;case 24000 : + debounce &= ~BYT_DEBOUNCE_PULSE_MASK ; debounce |=BYT_DEBOUNCE_PULSE_24MS ;break ;default :
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 33/453 i40e: avoid premature Rx buffer reuse
In reply to Greg Kroah-HartmanFrom: Björn Töpel <[email protected]>
[ Upstream commit 75aab4e10ae6a4593a60f66d13de755d4e91f400 ]
The page recycle code, incorrectly, relied on that a page fragment could not be freed inside xdp_do_redirect(). This assumption leads to that page fragments that are used by the stack/XDP redirect can be reused and overwritten.
To avoid this, store the page count prior invoking xdp_do_redirect().
Longer explanation:
Intel NICs have a recycle mechanism. The main idea is that a page is split into two parts. One part is owned by the driver, one part might be owned by someone else, such as the stack.
t0: Page is allocated, and put on the Rx ring
+---------------
used by NIC ->| upper buffer
(rx_buffer) +---------------
| lower buffer
+---------------
page count == USHRT_MAX rx_buffer->pagecnt_bias == USHRT_MAX
t1: Buffer is received, and passed to the stack (e.g.)
+---------------
| upper buff (skb)
+---------------
used by NIC ->| lower buffer
(rx_buffer) +---------------
page count == USHRT_MAX rx_buffer->pagecnt_bias == USHRT_MAX - 1
t2: Buffer is received, and redirected
+---------------
| upper buff (skb)
+---------------
used by NIC ->| lower buffer
(rx_buffer) +---------------Now, prior calling xdp_do_redirect():
page count == USHRT_MAX
rx_buffer->pagecnt_bias == USHRT_MAX - 2
This means that buffer *cannot* be flipped/reused, because the skb is still using it.
The problem arises when xdp_do_redirect() actually frees the segment. Then we get:
page count == USHRT_MAX - 1 rx_buffer->pagecnt_bias == USHRT_MAX - 2
Quoted 1 line
From a recycle perspective, the buffer can be flipped and reused,
which means that the skb data area is passed to the Rx HW ring!
To work around this, the page count is stored prior calling xdp_do_redirect().
Note that this is not optimal, since the NIC could actually reuse the "lower buffer" again. However, then we need to track whether XDP_REDIRECT consumed the buffer or not.
--- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 27 +++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +20 -7
@@ -1869,6 +1869,7 @@ static inline bool i40e_page_is_reusable(struct page *page)* the adapter for another receive * * @rx_buffer: buffer containing the page +* @rx_buffer_pgcnt: buffer page refcount pre xdp_do_redirect() call * * If page is reusable, rx_buffer->page_offset is adjusted to point to * an unused region in the page.
@@ -1891,7 +1892,8 @@ static inline bool i40e_page_is_reusable(struct page *page)* * In either case, if the page is reusable its refcount is increased. **/ -static bool i40e_can_reuse_rx_page (struct i40e_rx_buffer *rx_buffer) +static bool i40e_can_reuse_rx_page (struct i40e_rx_buffer *rx_buffer, +int rx_buffer_pgcnt) {unsigned int pagecnt_bias = rx_buffer->pagecnt_bias;struct page *page = rx_buffer->page;
@@ -1902,7 +1904,7 @@ static bool i40e_can_reuse_rx_page(struct i40e_rx_buffer *rx_buffer)#if (PAGE_SIZE <8192 )/* if we are only owner of page we can reuse it */ -if (unlikely ((page_count (page) - pagecnt_bias) >1 )) +if (unlikely ((rx_buffer_pgcnt - pagecnt_bias) >1 ))return false;#else #define I40E_LAST_OFFSET \
@@ -1961,16 +1963,24 @@ static void i40e_add_rx_frag(struct i40e_ring *rx_ring,* i40e_get_rx_buffer - Fetch Rx buffer and synchronize data for use * @rx_ring: rx descriptor ring to transact packets on * @size: size of buffer to add to skb +* @rx_buffer_pgcnt: buffer page refcount * * This function will pull an Rx buffer from the ring and synchronize it * for use by the CPU. */ static struct i40e_rx_buffer *i40e_get_rx_buffer (struct i40e_ring *rx_ring, -const unsigned int size) +const unsigned int size, +int *rx_buffer_pgcnt) {struct i40e_rx_buffer *rx_buffer; rx_buffer =i40e_rx_bi (rx_ring, rx_ring->next_to_clean); + *rx_buffer_pgcnt = +#if (PAGE_SIZE <8192 ) +page_count (rx_buffer->page); +#else +0 ; +#endif prefetch_page_address (rx_buffer->page);/* we are reusing so sync this buffer for CPU use */
@@ -2125,14 +2135,16 @@ static struct sk_buff *i40e_build_skb(struct i40e_ring *rx_ring,* i40e_put_rx_buffer - Clean up used buffer and either recycle or free * @rx_ring: rx descriptor ring to transact packets on * @rx_buffer: rx buffer to pull data from +* @rx_buffer_pgcnt: rx buffer page refcount pre xdp_do_redirect() call * * This function will clean up the contents of the rx_buffer. It will * either recycle the buffer or unmap it and free the associated resources. */ static void i40e_put_rx_buffer (struct i40e_ring *rx_ring, -struct i40e_rx_buffer *rx_buffer) +struct i40e_rx_buffer *rx_buffer, +int rx_buffer_pgcnt) { -if (i40e_can_reuse_rx_page (rx_buffer)) { +if (i40e_can_reuse_rx_page (rx_buffer, rx_buffer_pgcnt)) {/* hand second half of page back to the ring */ i40e_reuse_rx_page (rx_ring, rx_buffer); }else {
@@ -2345,6 +2357,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)while (likely (total_rx_packets < (unsigned int )budget)) {struct i40e_rx_buffer *rx_buffer;union i40e_rx_desc *rx_desc; +int rx_buffer_pgcnt;unsigned int size;u64 qword;
@@ -2384,7 +2397,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)break ;i40e_trace (clean_rx_irq, rx_ring, rx_desc, skb); - rx_buffer =i40e_get_rx_buffer (rx_ring, size); + rx_buffer =i40e_get_rx_buffer (rx_ring, size, &rx_buffer_pgcnt);/* retrieve a buffer from the ring */ if (!skb) {
@@ -2424,7 +2437,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)break ; } -i40e_put_rx_buffer (rx_ring, rx_buffer); +i40e_put_rx_buffer (rx_ring, rx_buffer, rx_buffer_pgcnt); cleaned_count++;if (i40e_is_non_eop (rx_ring, rx_desc, skb))
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 7/453 ARM: dts: sun7i: pcduino3-nano: enable RGMII RX/TX delay on PHY
In reply to Greg Kroah-HartmanFrom: Adam Sampson <[email protected]>
[ Upstream commit a7361b9c4615951f52ffd2b1afa09a1384c7b4e4 ]
The RX/TX delays for the Ethernet PHY on the Linksprite pcDuino 3 Nano are configured in hardware, using resistors that are populated to pull the RTL8211E's RXDLY/TXDLY pins low or high as needed.
phy-mode should be set to rgmii-id to reflect this. Previously it was set to rgmii, which used to work but now results in the delays being disabled again as a result of the bugfix in commit bbc4d71d6354 ("net:
phy: realtek: fix rtl8211e rx/tx delay config").
Tested on two pcDuino 3 Nano boards purchased in 2015. Without this fix, Ethernet works unreliably on one board and doesn't work at all on the other.
--- arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts +2 -2
@@ -1,5 +1,5 @@ /* - * Copyright 2015 Adam Sampson <[email protected]> + * Copyright 2015-2020 Adam Sampson <[email protected]> * * This file is dual-licensed: you can use it either under the terms * of the GPL or the X11 license, at your option. Note that this dual
@@ -115,7 +115,7 @@ pinctrl-names = "default"; pinctrl-0 = <&gmac_rgmii_pins>; phy-handle = <&phy1>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; status = "okay"; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 8/453 ARM: dts: imx6qdl-wandboard-revd1: Remove PAD_GPIO_6 from enetgrp
In reply to Greg Kroah-HartmanFrom: Fabio Estevam <[email protected]>
[ Upstream commit 58d6bca5efc73235b0f84c0d53321737177c651e ]
Since commit 8ad2d1dcce54 ("ARM: dts: imx6qdl-wandboard: Add OV5645 camera support") the PAD_GPIO_6 is used for providing the camera sensor clock.
Remove it from the enetgrp to fix the following IOMXU conflict:
[ 9.972414] imx6q-pinctrl 20e0000.pinctrl: pin MX6Q_PAD_GPIO_6 already requested by 2188000.ethernet; cannot claim for 1-003c [ 9.983857] imx6q-pinctrl 20e0000.pinctrl: pin-140 (1-003c) status -22 [ 9.990514] imx6q-pinctrl 20e0000.pinctrl: could not request pin 140 (MX6Q_PAD_GPIO_6) from group ov5645grp on device 20e0000.pinctrl
--- arch/arm/boot/dts/imx6qdl-wandboard-revd1.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm/boot/dts/imx6qdl-wandboard-revd1.dtsi +0 -1
@@ -166,7 +166,6 @@ MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b030 MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b030 MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b030 - MX6QDL_PAD_GPIO_6__ENET_IRQ 0x000b1 >; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 11/453 gpio: zynq: fix reference leak in zynq_gpio functions
In reply to Greg Kroah-HartmanFrom: Qinglang Miao <[email protected]>
[ Upstream commit 7f57b295f990c0fa07f96d51ca1c82c52dbf79cc ]
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in a reference leak here.
A new function pm_runtime_resume_and_get is introduced in
[0] to keep usage counter balanced. So We fix the reference leak by replacing it with new funtion.
[0] dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter")
--- drivers/gpio/gpio-zynq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpio-zynq.c +2 -2
@@ -556,7 +556,7 @@ static int zynq_gpio_irq_reqres(struct irq_data *d)struct gpio_chip *chip =irq_data_get_irq_chip_data (d);int ret; - ret =pm_runtime_get_sync (chip->parent); + ret =pm_runtime_resume_and_get (chip->parent);if (ret <0 )return ret;
@@ -884,7 +884,7 @@ static int zynq_gpio_probe(struct platform_device *pdev)pm_runtime_set_active (&pdev->dev);pm_runtime_enable (&pdev->dev); - ret =pm_runtime_get_sync (&pdev->dev); + ret =pm_runtime_resume_and_get (&pdev->dev);if (ret <0 ) goto err_pm_dis;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 34/453 ixgbe: avoid premature Rx buffer reuse
In reply to Greg Kroah-HartmanFrom: Björn Töpel <[email protected]>
[ Upstream commit a06316dc87bdc000f7f39a315476957af2ba0f05 ]
The page recycle code, incorrectly, relied on that a page fragment could not be freed inside xdp_do_redirect(). This assumption leads to that page fragments that are used by the stack/XDP redirect can be reused and overwritten.
To avoid this, store the page count prior invoking xdp_do_redirect().
--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +17 -7
@@ -1947,7 +1947,8 @@ static inline bool ixgbe_page_is_reserved(struct page *page)return (page_to_nid (page) !=numa_mem_id ()) ||page_is_pfmemalloc (page); } -static bool ixgbe_can_reuse_rx_page (struct ixgbe_rx_buffer *rx_buffer) +static bool ixgbe_can_reuse_rx_page (struct ixgbe_rx_buffer *rx_buffer, +int rx_buffer_pgcnt) {unsigned int pagecnt_bias = rx_buffer->pagecnt_bias;struct page *page = rx_buffer->page;
@@ -1958,7 +1959,7 @@ static bool ixgbe_can_reuse_rx_page(struct ixgbe_rx_buffer *rx_buffer)#if (PAGE_SIZE <8192 )/* if we are only owner of page we can reuse it */ -if (unlikely ((page_ref_count (page) - pagecnt_bias) >1 )) +if (unlikely ((rx_buffer_pgcnt - pagecnt_bias) >1 ))return false;#else /* The last offset is a bit aggressive in that we assume the
@@ -2023,11 +2024,18 @@ static void ixgbe_add_rx_frag(struct ixgbe_ring *rx_ring,static struct ixgbe_rx_buffer *ixgbe_get_rx_buffer (struct ixgbe_ring *rx_ring,union ixgbe_adv_rx_desc *rx_desc,struct sk_buff **skb, -const unsigned int size) +const unsigned int size, +int *rx_buffer_pgcnt) {struct ixgbe_rx_buffer *rx_buffer; rx_buffer = &rx_ring->rx_buffer_info[rx_ring->next_to_clean]; + *rx_buffer_pgcnt = +#if (PAGE_SIZE <8192 ) +page_count (rx_buffer->page); +#else +0 ; +#endif prefetchw (rx_buffer->page); *skb = rx_buffer->skb;
@@ -2057,9 +2065,10 @@ static struct ixgbe_rx_buffer *ixgbe_get_rx_buffer(struct ixgbe_ring *rx_ring,static void ixgbe_put_rx_buffer (struct ixgbe_ring *rx_ring,struct ixgbe_rx_buffer *rx_buffer, -struct sk_buff *skb) +struct sk_buff *skb, +int rx_buffer_pgcnt) { -if (ixgbe_can_reuse_rx_page (rx_buffer)) { +if (ixgbe_can_reuse_rx_page (rx_buffer, rx_buffer_pgcnt)) {/* hand second half of page back to the ring */ ixgbe_reuse_rx_page (rx_ring, rx_buffer); }else {
@@ -2295,6 +2304,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,union ixgbe_adv_rx_desc *rx_desc;struct ixgbe_rx_buffer *rx_buffer;struct sk_buff *skb; +int rx_buffer_pgcnt;unsigned int size;/* return some buffers to hardware, one at a time is too slow */
@@ -2314,7 +2324,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,*/ dma_rmb (); - rx_buffer =ixgbe_get_rx_buffer (rx_ring, rx_desc, &skb, size); + rx_buffer =ixgbe_get_rx_buffer (rx_ring, rx_desc, &skb, size, &rx_buffer_pgcnt);/* retrieve a buffer from the ring */ if (!skb) {
@@ -2356,7 +2366,7 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,break ; } -ixgbe_put_rx_buffer (rx_ring, rx_buffer, skb); +ixgbe_put_rx_buffer (rx_ring, rx_buffer, skb, rx_buffer_pgcnt); cleaned_count++;/* place incomplete frames back on ring for completion */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 9/453 ARM: dts: imx6qdl-kontron-samx6i: fix I2C_PM scl pin
In reply to Greg Kroah-HartmanFrom: Bernd Bauer <[email protected]>
[ Upstream commit 19ba8fb810c60b46869acc9f455613de454e0fca ]
Use the correct pin for the i2c scl signal else we can't access the SoM eeprom.
--- arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi +1 -1
@@ -551,7 +551,7 @@ pinctrl_i2c3: i2c3grp { fsl,pins = < - MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 + MX6QDL_PAD_GPIO_5__I2C3_SCL 0x4001b8b1 MX6QDL_PAD_GPIO_16__I2C3_SDA 0x4001b8b1 >; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 10/453 PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit dd8088d5a8969dc2b42f71d7bc01c25c61a78066 ]
In many case, we need to check return value of pm_runtime_get_sync, but it brings a trouble to the usage counter processing. Many callers forget to decrease the usage counter when it failed, which could resulted in reference leak. It has been discussed a lot[0][1]. So we add a function to deal with the usage counter for better coding.
[0]https://lkml.org/lkml/2020/6/14/88 [1]https://patchwork.ozlabs.org/project/linux-tegra/list/?series=178139
--- include/linux/pm_runtime.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
include/linux/pm_runtime.h +21 -0
@@ -224,6 +224,27 @@ static inline int pm_runtime_get_sync(struct device *dev)return __pm_runtime_resume (dev,RPM_GET_PUT ); } +/** +* pm_runtime_resume_and_get - Bump up usage counter of a device and resume it. +* @dev: Target device. +* +* Resume @dev synchronously and if that is successful, increment its runtime +* PM usage counter. Return 0 if the runtime PM usage counter of @dev has been +* incremented or a negative error code otherwise. +*/ +static inline int pm_runtime_resume_and_get (struct device *dev) +{ +int ret; + + ret =__pm_runtime_resume (dev,RPM_GET_PUT ); +if (ret <0 ) { +pm_runtime_put_noidle (dev); +return ret; + } + +return 0 ; +} +static inline int pm_runtime_put (struct device *dev) {return __pm_runtime_idle (dev,RPM_GET_PUT |RPM_ASYNC );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 2/453 ARM: dts: sun8i: r40: bananapi-m2-berry: Fix dcdc1 regulator
In reply to Greg Kroah-HartmanFrom: Pablo Greco <[email protected]>
[ Upstream commit bd5cdcdc66e1f7179ff6d172d1e5f55e43403aa8 ]
DCDC1 regulator powers many different subsystems. While some of them can work at 3.0 V, some of them can not. For example, VCC-HDMI can only work between 3.24 V and 3.36 V. According to OS images provided by the board manufacturer this regulator should be set to 3.3 V.
Set DCDC1 and DCDC1SW to 3.3 V in order to fix this.
--- arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts +5 -5
@@ -198,16 +198,16 @@ }; ®_dc1sw { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-name = "vcc-gmac-phy"; }; ®_dcdc1 { regulator-always-on; - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - regulator-name = "vcc-3v0"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-name = "vcc-3v3"; }; ®_dcdc2 {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 45/453 dm table: Remove BUG_ON(in_interrupt())
In reply to Greg Kroah-HartmanFrom: Thomas Gleixner <[email protected]>
[ Upstream commit e7b624183d921b49ef0a96329f21647d38865ee9 ]
The BUG_ON(in_interrupt()) in dm_table_event() is a historic leftover from a rework of the dm table code which changed the calling context.
Issuing a BUG for a wrong calling context is frowned upon and in_interrupt() is deprecated and only covering parts of the wrong contexts. The sanity check for the context is covered by CONFIG_DEBUG_ATOMIC_SLEEP and other debug facilities already.
--- drivers/md/dm-table.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/md/dm-table.c +0 -6
@@ -1320,12 +1320,6 @@ void dm_table_event_callback(struct dm_table *t,void dm_table_event (struct dm_table *t) { -/* -* You can no longer call dm_table_event() from interrupt -* context, use a bottom half instead. -*/ -BUG_ON (in_interrupt ()); -mutex_lock (&_event_lock);if (t->event_fn) t->event_fn (t->event_context);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 46/453 iwlwifi: pcie: add one missing entry for AX210
In reply to Greg Kroah-HartmanFrom: Luca Coelho <[email protected]>
[ Upstream commit 5febcdef30902fa870128b9789b873199f13aff1 ]
The 0x0024 subsytem device ID was missing from the list, so some AX210 devices were not recognized. Add it.
--- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/intel/iwlwifi/pcie/drv.c +1 -0
@@ -968,6 +968,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x2725, 0x0090, iwlax211_2ax_cfg_so_gf_a0)}, {IWL_PCI_DEVICE(0x2725, 0x0020, iwlax210_2ax_cfg_ty_gf_a0)}, + {IWL_PCI_DEVICE(0x2725, 0x0024, iwlax210_2ax_cfg_ty_gf_a0)}, {IWL_PCI_DEVICE(0x2725, 0x0310, iwlax210_2ax_cfg_ty_gf_a0)}, {IWL_PCI_DEVICE(0x2725, 0x0510, iwlax210_2ax_cfg_ty_gf_a0)}, {IWL_PCI_DEVICE(0x2725, 0x0A10, iwlax210_2ax_cfg_ty_gf_a0)},
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 47/453 drm/amd/display: Init clock value by current vbios CLKs
In reply to Greg Kroah-HartmanFrom: Brandon Syu <[email protected]>
[ Upstream commit 7e0b367db85ef7b91399006253759a024eab7653 ]
[Why]
While booting into OS, driver updates DPP/DISP CLKs. But init clock value is zero which is invalid.
[How]
Get current clocks value to update init clocks. To avoid underflow.
--- .../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c +11 -2
@@ -97,8 +97,17 @@ void rn_update_clocks(struct clk_mgr *clk_mgr_base, new_clocks->dppclk_khz =100000 ; } -if (should_set_clock (safe_to_lower, new_clocks->dppclk_khz, clk_mgr->base.clks.dppclk_khz)) { -if (clk_mgr->base.clks.dppclk_khz > new_clocks->dppclk_khz) +/* +* Temporally ignore thew 0 cases for disp and dpp clks. +* We may have a new feature that requires 0 clks in the future. +*/ +if (new_clocks->dppclk_khz ==0 || new_clocks->dispclk_khz ==0 ) { + new_clocks->dppclk_khz = clk_mgr_base->clks.dppclk_khz; + new_clocks->dispclk_khz = clk_mgr_base->clks.dispclk_khz; + } + +if (should_set_clock (safe_to_lower, new_clocks->dppclk_khz, clk_mgr_base->clks.dppclk_khz)) { +if (clk_mgr_base->clks.dppclk_khz > new_clocks->dppclk_khz) dpp_clock_lowered = true; clk_mgr_base->clks.dppclk_khz = new_clocks->dppclk_khz; update_dppclk = true;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 48/453 perf/x86/intel: Check PEBS status correctly
In reply to Greg Kroah-HartmanFrom: Stephane Eranian <[email protected]>
[ Upstream commit fc17db8aa4c53cbd2d5469bb0521ea0f0a6dbb27 ]
The kernel cannot disambiguate when 2+ PEBS counters overflow at the same time. This is what the comment for this code suggests. However, I see the comparison is done with the unfiltered p->status which is a copy of IA32_PERF_GLOBAL_STATUS at the time of the sample. This register contains more than the PEBS counter overflow bits. It also includes many other bits which could also be set.
--- arch/x86/events/intel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/ds.c +1 -1
@@ -1912,7 +1912,7 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs)* that caused the PEBS record. It's called collision. * If collision happened, the record will be dropped. */ -if (p->status != (1ULL << bit)) { +if (pebs_status != (1ULL << bit)) {for_each_set_bit (i, (unsigned long *)&pebs_status, size) error[i]++;continue ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 50/453 soc/tegra: fuse: Fix index bug in get_process_id
In reply to Greg Kroah-HartmanFrom: Nicolin Chen <[email protected]>
commit b9ce9b0f83b536a4ac7de7567a265d28d13e5bea upstream.
This patch simply fixes a bug of referencing speedos[num] in every for-loop iteration in get_process_id function.
--- drivers/soc/tegra/fuse/speedo-tegra210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/tegra/fuse/speedo-tegra210.c +1 -1
@@ -94,7 +94,7 @@ static int get_process_id(int value, conunsigned int i;for (i =0 ; i < num; i++) -if (value < speedos[num]) +if (value < speedos[i])return i;return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 51/453 usb: mtu3: fix memory corruption in mtu3_debugfs_regset()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 3f6f6343a29d9ea7429306b83b18e66dc1331d5c upstream.
This code is using the wrong sizeof() so it does not allocate enough memory. It allocates 32 bytes but 72 are required. That will lead to memory corruption.
--- drivers/usb/mtu3/mtu3_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/mtu3/mtu3_debugfs.c +1 -1
@@ -127,7 +127,7 @@ static void mtu3_debugfs_regset(struct mstruct debugfs_regset32 *regset;struct mtu3_regset *mregs; - mregs =devm_kzalloc (mtu->dev,sizeof (*regset),GFP_KERNEL ); + mregs =devm_kzalloc (mtu->dev,sizeof (*mregs),GFP_KERNEL );if (!mregs)return ;
Greg Kroah-Hartman
maintainerPATCH 53/453 USB: gadget: f_acm: add support for SuperSpeed Plus
In reply to Greg Kroah-HartmanFrom: taehyun.cho <[email protected]>
commit 3ee05c20656782387aa9eb010fdb9bb16982ac3f upstream.
Setup the SuperSpeed Plus descriptors for f_acm. This allows the gadget to work properly without crashing at SuperSpeed rates.
--- drivers/usb/gadget/function/f_acm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/f_acm.c +1 -1
@@ -684,7 +684,7 @@ acm_bind(struct usb_configuration *c, st acm_ss_out_desc.bEndpointAddress = acm_fs_out_desc.bEndpointAddress; status =usb_assign_descriptors (f, acm_fs_function, acm_hs_function, - acm_ss_function,NULL ); + acm_ss_function, acm_ss_function);if (status) goto fail;
Greg Kroah-Hartman
maintainerPATCH 57/453 usb: chipidea: ci_hdrc_imx: Pass DISABLE_DEVICE_STREAMING flag to imx6ul
In reply to Greg Kroah-HartmanFrom: Fabio Estevam <[email protected]>
commit c7721e15f434920145c376e8fe77e1c079fc3726 upstream.
According to the i.MX6UL Errata document:
https://www.nxp.com/docs/en/errata/IMX6ULCE.pdf
ERR007881 also affects i.MX6UL, so pass the CI_HDRC_DISABLE_DEVICE_STREAMING flag to workaround the issue.
--- drivers/usb/chipidea/ci_hdrc_imx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/chipidea/ci_hdrc_imx.c +2 -1
@@ -57,7 +57,8 @@ static const struct ci_hdrc_imx_platformstatic const struct ci_hdrc_imx_platform_flag imx6ul_usb_data = { .flags =CI_HDRC_SUPPORTS_RUNTIME_PM | -CI_HDRC_TURN_VBUS_EARLY_ON , +CI_HDRC_TURN_VBUS_EARLY_ON | +CI_HDRC_DISABLE_DEVICE_STREAMING , };static const struct ci_hdrc_imx_platform_flag imx7d_usb_data = {
Greg Kroah-Hartman
maintainerPATCH 58/453 ARM: dts: exynos: fix roles of USB 3.0 ports on Odroid XU
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit ecc1ff532b499d20304a4f682247137025814c34 upstream.
On Odroid XU board the USB3-0 port is a microUSB and USB3-1 port is USB type A (host). The roles were copied from Odroid XU3 (Exynos5422) design which has it reversed.
--- arch/arm/boot/dts/exynos5410-odroidxu.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/exynos5410-odroidxu.dts +2 -2
@@ -637,11 +637,11 @@ }; &usbdrd_dwc3_0 { - dr_mode = "host"; + dr_mode = "peripheral"; }; &usbdrd_dwc3_1 { - dr_mode = "peripheral"; + dr_mode = "host"; }; &usbdrd3_0 {
Greg Kroah-Hartman
maintainerPATCH 52/453 USB: serial: option: add interface-number sanity check to flag handling
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit a251963f76fa0226d0fdf0c4f989496f18d9ae7f upstream.
Add an interface-number sanity check before testing the device flags to avoid relying on undefined behaviour when left shifting in case a device uses an interface number greater than or equal to BITS_PER_LONG (i.e. 64 or 32).
--- drivers/usb/serial/option.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-)
drivers/usb/serial/option.c +21 -2
@@ -563,6 +563,9 @@ static void option_instat_callback(struc/* Device flags */ +/* Highest interface number which can be used with NCTRL() and RSVD() */ +#define FLAG_IFNUM_MAX 7 +/* Interface does not support modem-control requests */ #define NCTRL (ifnum) ((BIT(ifnum) & 0xff) << 8)
@@ -2101,6 +2104,14 @@ static struct usb_serial_driver * constmodule_usb_serial_driver (serial_drivers, option_ids); +static bool iface_is_reserved (unsigned long device_flags,u8 ifnum) +{ +if (ifnum >FLAG_IFNUM_MAX ) +return false; + +return device_flags &RSVD (ifnum); +} +static int option_probe (struct usb_serial *serial,const struct usb_device_id *id) {
@@ -2117,7 +2128,7 @@ static int option_probe(struct usb_seria* the same class/subclass/protocol as the serial interfaces. Look at * the Windows driver .INF files for reserved interface numbers. */ -if (device_flags &RSVD (iface_desc->bInterfaceNumber)) +if (iface_is_reserved (device_flags, iface_desc->bInterfaceNumber))return -ENODEV ;/*
@@ -2133,6 +2144,14 @@ static int option_probe(struct usb_seriareturn 0 ; } +static bool iface_no_modem_control (unsigned long device_flags,u8 ifnum) +{ +if (ifnum >FLAG_IFNUM_MAX ) +return false; + +return device_flags &NCTRL (ifnum); +} +static int option_attach (struct usb_serial *serial) {struct usb_interface_descriptor *iface_desc;
@@ -2148,7 +2167,7 @@ static int option_attach(struct usb_seri iface_desc = &serial->interface->cur_altsetting->desc; -if (!(device_flags &NCTRL (iface_desc->bInterfaceNumber))) +if (!iface_no_modem_control (device_flags, iface_desc->bInterfaceNumber)) data->use_send_setup =1 ;if (device_flags &ZLP )
Greg Kroah-Hartman
maintainerPATCH 54/453 USB: gadget: f_midi: setup SuperSpeed Plus descriptors
In reply to Greg Kroah-HartmanFrom: Will McVicker <[email protected]>
commit 457a902ba1a73b7720666b21ca038cd19764db18 upstream.
Needed for SuperSpeed Plus support for f_midi. This allows the gadget to work properly without crashing at SuperSpeed rates.
--- drivers/usb/gadget/function/f_midi.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/usb/gadget/function/f_midi.c +6 -0
@@ -1048,6 +1048,12 @@ static int f_midi_bind(struct usb_config f->ss_descriptors =usb_copy_descriptors (midi_function);if (!f->ss_descriptors) goto fail_f_midi; + +if (gadget_is_superspeed_plus (c->cdev->gadget)) { + f->ssp_descriptors =usb_copy_descriptors (midi_function); +if (!f->ssp_descriptors) + goto fail_f_midi; + } }kfree (midi_function);
Greg Kroah-Hartman
maintainerPATCH 37/453 drm/tegra: replace idr_init() by idr_init_base()
In reply to Greg Kroah-HartmanFrom: Deepak R Varma <[email protected]>
[ Upstream commit 41f71629b4c432f8dd47d70ace813be5f79d4d75 ]
idr_init() uses base 0 which is an invalid identifier for this driver. The new function idr_init_base allows IDR to set the ID lookup from base 1. This avoids all lookups that otherwise starts from 0 since 0 is always unused.
--- drivers/gpu/drm/tegra/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tegra/drm.c +1 -1
@@ -256,7 +256,7 @@ static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp)if (!fpriv)return -ENOMEM ; -idr_init (&fpriv->contexts); +idr_init_base (&fpriv->contexts,1 );mutex_init (&fpriv->lock); filp->driver_priv = fpriv;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 55/453 usb: gadget: f_fs: Re-use SS descriptors for SuperSpeedPlus
In reply to Greg Kroah-HartmanFrom: Jack Pham <[email protected]>
commit a353397b0d5dfa3c99b372505db3378fc919c6c6 upstream.
In many cases a function that supports SuperSpeed can very well operate in SuperSpeedPlus, if a gadget controller supports it, as the endpoint descriptors (and companion descriptors) are generally identical and can be re-used. This is true for two commonly used functions: Android's ADB and MTP. So we can simply assign the usb_function's ssp_descriptors array to point to its ss_descriptors, if available. Similarly, we need to allow an epfile's ioctl for FUNCTIONFS_ENDPOINT_DESC to correctly return the corresponding SuperSpeed endpoint descriptor in case the connected speed is SuperSpeedPlus as well.
The only exception is if a function wants to implement an Isochronous endpoint capable of transferring more than 48KB per service interval when operating at greater than USB 3.1 Gen1 speed, in which case it would require an additional SuperSpeedPlus Isochronous Endpoint Companion descriptor to be returned as part of the Configuration Descriptor. Support for that would need to be separately added to the userspace-facing FunctionFS API which may not be a trivial task--likely a new descriptor format (v3?) may need to be devised to allow for separate SS and SSP descriptors to be supplied.
--- drivers/usb/gadget/function/f_fs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/usb/gadget/function/f_fs.c +4 -1
@@ -1332,6 +1332,7 @@ static long ffs_epfile_ioctl(struct fileswitch (epfile->ffs->gadget->speed) {case USB_SPEED_SUPER : +case USB_SPEED_SUPER_PLUS : desc_idx =2 ;break ;case USB_SPEED_HIGH :
@@ -3193,7 +3194,8 @@ static int _ffs_func_bind(struct usb_con }if (likely (super)) { - func->function.ss_descriptors =vla_ptr (vlabuf, d, ss_descs); + func->function.ss_descriptors = func->function.ssp_descriptors = +vla_ptr (vlabuf, d, ss_descs); ss_len = ffs_do_descs(ffs->ss_descs_count, vla_ptr(vlabuf, d, raw_descs) + fs_len + hs_len, d_raw_descs__sz - fs_len - hs_len,
@@ -3603,6 +3605,7 @@ static void ffs_func_unbind(struct usb_c func->function.fs_descriptors =NULL ; func->function.hs_descriptors =NULL ; func->function.ss_descriptors =NULL ; + func->function.ssp_descriptors =NULL ; func->interfaces_nums =NULL ;ffs_event_add (ffs,FUNCTIONFS_UNBIND );
Greg Kroah-Hartman
maintainerPATCH 59/453 ARM: dts: exynos: fix USB 3.0 VBUS control and over-current pins on Exynos5410
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit 3d992fd8f4e0f09c980726308d2f2725587b32d6 upstream.
The VBUS control (PWREN) and over-current pins of USB 3.0 DWC3 controllers are on Exynos5410 regular GPIOs. This is different than for example on Exynos5422 where these are special ETC pins with proper reset values (pulls, functions).
Therefore these pins should be configured to enable proper USB 3.0 peripheral and host modes. This also fixes over-current warning:
[ 6.024658] usb usb4-port1: over-current condition
[ 6.028271] usb usb3-port1: over-current condition--- arch/arm/boot/dts/exynos5410-pinctrl.dtsi | 28 ++++++++++++++++++++++++++++ arch/arm/boot/dts/exynos5410.dtsi | 4 ++++ 2 files changed, 32 insertions(+)
arch/arm/boot/dts/exynos5410-pinctrl.dtsi +28 -0
@@ -560,6 +560,34 @@ interrupt-controller; #interrupt-cells = <2>; }; + + usb3_1_oc: usb3-1-oc { + samsung,pins = "gpk2-4", "gpk2-5"; + samsung,pin-function = <EXYNOS_PIN_FUNC_2>; + samsung,pin-pud = <EXYNOS_PIN_PULL_UP>; + samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>; + }; + + usb3_1_vbusctrl: usb3-1-vbusctrl { + samsung,pins = "gpk2-6", "gpk2-7"; + samsung,pin-function = <EXYNOS_PIN_FUNC_2>; + samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; + samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>; + }; + + usb3_0_oc: usb3-0-oc { + samsung,pins = "gpk3-0", "gpk3-1"; + samsung,pin-function = <EXYNOS_PIN_FUNC_2>; + samsung,pin-pud = <EXYNOS_PIN_PULL_UP>; + samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>; + }; + + usb3_0_vbusctrl: usb3-0-vbusctrl { + samsung,pins = "gpk3-2", "gpk3-3"; + samsung,pin-function = <EXYNOS_PIN_FUNC_2>; + samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>; + samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>; + }; }; &pinctrl_2 {
arch/arm/boot/dts/exynos5410.dtsi +4 -0
@@ -398,6 +398,8 @@ &usbdrd3_0 { clocks = <&clock CLK_USBD300>; clock-names = "usbdrd30"; + pinctrl-names = "default"; + pinctrl-0 = <&usb3_0_oc>, <&usb3_0_vbusctrl>; }; &usbdrd_phy0 {
@@ -409,6 +411,8 @@ &usbdrd3_1 { clocks = <&clock CLK_USBD301>; clock-names = "usbdrd30"; + pinctrl-names = "default"; + pinctrl-0 = <&usb3_1_oc>, <&usb3_1_vbusctrl>; }; &usbdrd_dwc3_1 {
Greg Kroah-Hartman
maintainerPATCH 60/453 ARM: dts: exynos: fix USB 3.0 pins supply being turned off on Odroid XU
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit bd7e7ff56feea7810df900fb09c9741d259861d9 upstream.
On Odroid XU LDO12 and LDO15 supplies the power to USB 3.0 blocks but the GPK GPIO pins are supplied by LDO7 (VDDQ_LCD). LDO7 also supplies GPJ GPIO pins.
The Exynos pinctrl driver does not take any supplies, so to have entire GPIO block always available, make the regulator always on.
--- arch/arm/boot/dts/exynos5410-odroidxu.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/exynos5410-odroidxu.dts +2 -0
@@ -327,6 +327,8 @@ regulator-name = "vddq_lcd"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + /* Supplies also GPK and GPJ */ + regulator-always-on; }; ldo8_reg: LDO8 {
Greg Kroah-Hartman
maintainerPATCH 61/453 coresight: tmc-etf: Fix NULL ptr dereference in tmc_enable_etf_sink_perf()
In reply to Greg Kroah-HartmanFrom: Sai Prakash Ranjan <[email protected]>
commit 868663dd5d69fef05bfb004f91da5c30e9b93461 upstream.
There was a report of NULL pointer dereference in ETF enable path for perf CS mode with PID monitoring. It is almost 100% reproducible when the process to monitor is something very active such as chrome and with ETF as the sink and not ETR. Currently in a bid to find the pid, the owner is dereferenced via task_pid_nr() call in tmc_enable_etf_sink_perf() and with owner being NULL, we get a NULL pointer dereference.
Looking at the ETR and other places in the kernel, ETF and the ETB are the only places trying to dereference the task(owner) in tmc_enable_etf_sink_perf() which is also called from the sched_in path as in the call trace. Owner(task) is NULL even in the case of ETR in tmc_enable_etr_sink_perf(), but since we cache the PID in alloc_buffer() callback and it is done as part of etm_setup_aux() when allocating buffer for ETR sink, we never dereference this NULL pointer and we are safe. So lets do the same thing with ETF and cache the PID to which the cs_buffer belongs in tmc_alloc_etf_buffer() as done for ETR. This will also remove the unnecessary function calls(task_pid_nr()) since we are caching the PID.
Easily reproducible running below:
perf record -e cs_etm/@tmc_etf0/ -N -p <pid>
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000548
Mem abort info:
ESR = 0x96000006
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
Data abort info:
ISV = 0, ISS = 0x00000006
CM = 0, WnR = 0
<snip>...
Call trace: tmc_enable_etf_sink+0xe4/0x280 coresight_enable_path+0x168/0x1fc etm_event_start+0x8c/0xf8 etm_event_add+0x38/0x54 event_sched_in+0x194/0x2ac group_sched_in+0x54/0x12c flexible_sched_in+0xd8/0x120 visit_groups_merge+0x100/0x16c ctx_flexible_sched_in+0x50/0x74 ctx_sched_in+0xa4/0xa8 perf_event_sched_in+0x60/0x6c perf_event_context_sched_in+0x98/0xe0 __perf_event_task_sched_in+0x5c/0xd8 finish_task_switch+0x184/0x1cc schedule_tail+0x20/0xec ret_from_fork+0x4/0x18
--- drivers/hwtracing/coresight/coresight-priv.h | 2 ++ drivers/hwtracing/coresight/coresight-tmc-etf.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-priv.h +2 -0
@@ -86,6 +86,7 @@ enum cs_mode {* struct cs_buffer - keep track of a recording session' specifics * @cur: index of the current buffer * @nr_pages: max number of pages granted to us +* @pid: PID this cs_buffer belongs to * @offset: offset within the current buffer * @data_size: how much we collected in this run * @snapshot: is this run in snapshot mode
@@ -94,6 +95,7 @@ enum cs_mode {struct cs_buffers {unsigned int cur;unsigned int nr_pages; +pid_t pid;unsigned long offset;local_t data_size;bool snapshot;
drivers/hwtracing/coresight/coresight-tmc-etf.c +3 -1
@@ -227,6 +227,7 @@ static int tmc_enable_etf_sink_perf(struunsigned long flags;struct tmc_drvdata *drvdata =dev_get_drvdata (csdev->dev.parent);struct perf_output_handle *handle = data; +struct cs_buffers *buf =etm_perf_sink_config (handle);spin_lock_irqsave (&drvdata->spinlock, flags); do {
@@ -243,7 +244,7 @@ static int tmc_enable_etf_sink_perf(stru }/* Get a handle on the pid of the process to monitor */ - pid =task_pid_nr (handle->event->owner); + pid = buf->pid;if (drvdata->pid !=-1 && drvdata->pid != pid) { ret = -EBUSY ;
@@ -399,6 +400,7 @@ static void *tmc_alloc_etf_buffer(structif (!buf)return NULL ; + buf->pid =task_pid_nr (event->owner); buf->snapshot = overwrite; buf->nr_pages = nr_pages; buf->data_pages = pages;
Greg Kroah-Hartman
maintainerPATCH 62/453 coresight: tmc-etr: Check if page is valid before dma_map_page()
In reply to Greg Kroah-HartmanFrom: Mao Jinlong <[email protected]>
commit 1cc573d5754e92372a7e30e35468644f8811e1a4 upstream.
alloc_pages_node() return should be checked before calling dma_map_page() to make sure that valid page is mapped or else it can lead to aborts as below:
Unable to handle kernel paging request at virtual address ffffffc008000000 Mem abort info: <snip>... pc : __dma_inv_area+0x40/0x58 lr : dma_direct_map_page+0xd8/0x1c8 Call trace: __dma_inv_area tmc_pages_alloc tmc_alloc_data_pages tmc_alloc_sg_table tmc_init_etr_sg_table tmc_alloc_etr_buf tmc_enable_etr_sink_sysfs tmc_enable_etr_sink coresight_enable_path coresight_enable enable_source_store dev_attr_store sysfs_kf_write
--- drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/hwtracing/coresight/coresight-tmc-etr.c +2 -0
@@ -217,6 +217,8 @@ static int tmc_pages_alloc(struct tmc_pa }else { page =alloc_pages_node (node,GFP_KERNEL | __GFP_ZERO,0 ); +if (!page) + goto err; } paddr =dma_map_page (real_dev, page,0 ,PAGE_SIZE , dir);if (dma_mapping_error (real_dev, paddr))
Greg Kroah-Hartman
maintainerPATCH 63/453 coresight: tmc-etr: Fix barrier packet insertion for perf buffer
In reply to Greg Kroah-HartmanFrom: Suzuki K Poulose <[email protected]>
commit 83be0b84fe846edf0c722fefe225482d5f0d7395 upstream.
When the ETR is used in perf mode with a larger buffer (configured via sysfs or the default size of 1M) than the perf aux buffer size, we end up inserting the barrier packet at the wrong offset, while moving the offset forward. i.e, instead of the "new moved offset", we insert it at the current hardware buffer offset. These packets will not be visible as they are never copied and could lead to corruption in the trace decoding side, as the decoder is not aware that it needs to reset the decoding.
--- drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-tmc-etr.c +1 -1
@@ -1535,7 +1535,7 @@ tmc_update_etr_buffer(struct coresight_d/* Insert barrier packets at the beginning, if there was an overflow */ if (lost) -tmc_etr_buf_insert_barrier_packet (etr_buf, etr_buf->offset); +tmc_etr_buf_insert_barrier_packet (etr_buf, offset);tmc_etr_sync_perf_buffer (etr_perf, offset, size);/*
Greg Kroah-Hartman
maintainerPATCH 38/453 kernel/cpu: add arch override for clear_tasks_mm_cpumask() mm handling
In reply to Greg Kroah-HartmanFrom: Nicholas Piggin <[email protected]>
[ Upstream commit 8ff00399b153440c1c83e20c43020385b416415b ]
powerpc/64s keeps a counter in the mm which counts bits set in mm_cpumask as well as other things. This means it can't use generic code to clear bits out of the mask and doesn't adjust the arch specific counter.
Add an arch override that allows powerpc/64s to use clear_tasks_mm_cpumask().
--- kernel/cpu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
kernel/cpu.c +5 -1
@@ -815,6 +815,10 @@ void __init cpuhp_threads_init(void) }#ifdef CONFIG_HOTPLUG_CPU +#ifndef arch_clear_mm_cpumask_cpu +#define arch_clear_mm_cpumask_cpu (cpu, mm) cpumask_clear_cpu(cpu, mm_cpumask(mm)) +#endif +/** * clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU * @cpu: a CPU id
@@ -850,7 +854,7 @@ void clear_tasks_mm_cpumask(int cpu) t =find_lock_task_mm (p);if (!t)continue ; -cpumask_clear_cpu (cpu,mm_cpumask (t->mm)); +arch_clear_mm_cpumask_cpu (cpu, t->mm);task_unlock (t); }rcu_read_unlock ();
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 40/453 habanalabs: put devices before driver removal
In reply to Greg Kroah-HartmanFrom: Ofir Bitton <[email protected]>
[ Upstream commit 5555b7c56bdec7a29c789fec27f84d40f52fbdfa ]
Driver never puts its device and control_device objects, hence a memory leak is introduced every driver removal.
--- drivers/misc/habanalabs/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/misc/habanalabs/device.c +8 -8
@@ -229,16 +229,16 @@ static int device_cdev_sysfs_add(struct hl_device *hdev)static void device_cdev_sysfs_del (struct hl_device *hdev) { -/* device_release() won't be called so must free devices explicitly */ -if (!hdev->cdev_sysfs_created) { -kfree (hdev->dev_ctrl); -kfree (hdev->dev); -return ; - } +if (!hdev->cdev_sysfs_created) + goto put_devices;hl_sysfs_fini (hdev);cdev_device_del (&hdev->cdev_ctrl, hdev->dev_ctrl);cdev_device_del (&hdev->cdev, hdev->dev); + +put_devices: +put_device (hdev->dev); +put_device (hdev->dev_ctrl); }/*
@@ -1285,9 +1285,9 @@ int hl_device_init(struct hl_device *hdev, struct class *hclass) early_fini:device_early_fini (hdev); free_dev_ctrl: -kfree (hdev->dev_ctrl); +put_device (hdev->dev_ctrl); free_dev: -kfree (hdev->dev); +put_device (hdev->dev); out_disabled: hdev->disabled = true;if (add_cdev_sysfs_on_err)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 64/453 coresight: etb10: Fix possible NULL ptr dereference in etb_enable_perf()
In reply to Greg Kroah-HartmanFrom: Sai Prakash Ranjan <[email protected]>
commit 22b2beaa7f166f550424cbb3b988aeaa7ef0425a upstream.
There was a report of NULL pointer dereference in ETF enable path for perf CS mode with PID monitoring. It is almost 100% reproducible when the process to monitor is something very active such as chrome and with ETF as the sink, not ETR.
But code path shows that ETB has a similar path as ETF, so there could be possible NULL pointer dereference crash in ETB as well. Currently in a bid to find the pid, the owner is dereferenced via task_pid_nr() call in etb_enable_perf() and with owner being NULL, we can get a NULL pointer dereference, so have a similar fix as ETF where we cache PID in alloc_buffer() callback which is called as the part of etm_setup_aux().
--- drivers/hwtracing/coresight/coresight-etb10.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-etb10.c +3 -1
@@ -176,6 +176,7 @@ static int etb_enable_perf(struct coresiunsigned long flags;struct etb_drvdata *drvdata =dev_get_drvdata (csdev->dev.parent);struct perf_output_handle *handle = data; +struct cs_buffers *buf =etm_perf_sink_config (handle);spin_lock_irqsave (&drvdata->spinlock, flags);
@@ -186,7 +187,7 @@ static int etb_enable_perf(struct coresi }/* Get a handle on the pid of the process to monitor */ - pid =task_pid_nr (handle->event->owner); + pid = buf->pid;if (drvdata->pid !=-1 && drvdata->pid != pid) { ret = -EBUSY ;
@@ -383,6 +384,7 @@ static void *etb_alloc_buffer(struct corif (!buf)return NULL ; + buf->pid =task_pid_nr (event->owner); buf->snapshot = overwrite; buf->nr_pages = nr_pages; buf->data_pages = pages;
Greg Kroah-Hartman
maintainerPATCH 65/453 scsi: megaraid_sas: Check user-provided offsets
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
commit 381d34e376e3d9d27730fda8a0e870600e6c8196 upstream.
It sounds unwise to let user space pass an unchecked 32-bit offset into a kernel structure in an ioctl. This is an unsigned variable, so checking the upper bound for the size of the structure it points into is sufficient to avoid data corruption, but as the pointer might also be unaligned, it has to be written carefully as well.
While I stumbled over this problem by reading the code, I did not continue checking the function for further problems like it.
--- drivers/scsi/megaraid/megaraid_sas_base.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +11 -5
@@ -8038,7 +8038,7 @@ megasas_mgmt_fw_ioctl(struct megasas_insint error =0 , i;void *sense =NULL ;dma_addr_t sense_handle; -unsigned long *sense_ptr; +void *sense_ptr;u32 opcode =0 ;memset (kbuff_arr,0 ,sizeof (kbuff_arr));
@@ -8160,6 +8160,13 @@ megasas_mgmt_fw_ioctl(struct megasas_ins }if (ioc->sense_len) { +/* make sure the pointer is part of the frame */ +if (ioc->sense_off > + (sizeof (union megasas_frame ) -sizeof (__le64))) { + error = -EINVAL ; + goto out; + } + sense =dma_alloc_coherent (&instance->pdev->dev, ioc->sense_len, &sense_handle,GFP_KERNEL );if (!sense) {
@@ -8167,12 +8174,11 @@ megasas_mgmt_fw_ioctl(struct megasas_ins goto out; } - sense_ptr = - (unsigned long *) ((unsigned long )cmd->frame + ioc->sense_off); + sense_ptr = (void *)cmd->frame + ioc->sense_off;if (instance->consistent_mask_64bit) - *sense_ptr =cpu_to_le64 (sense_handle); +put_unaligned_le64 (sense_handle, sense_ptr);else - *sense_ptr =cpu_to_le32 (sense_handle); +put_unaligned_le32 (sense_handle, sense_ptr); }/*
Greg Kroah-Hartman
maintainerPATCH 67/453 serial_core: Check for port state when tty is in error state
In reply to Greg Kroah-HartmanFrom: Alexey Kardashevskiy <[email protected]>
commit 2f70e49ed860020f5abae4f7015018ebc10e1f0e upstream.
At the moment opening a serial device node (such as /dev/ttyS3) succeeds even if there is no actual serial device behind it. Reading/writing/ioctls fail as expected because the uart port is not initialized (the type is PORT_UNKNOWN) and the TTY_IO_ERROR error state bit is set fot the tty.
However setting line discipline does not have these checks 8250_port.c (8250 is the default choice made by univ8250_console_init()). As the result of PORT_UNKNOWN, uart_port::iobase is NULL which a platform translates onto some address accessing which produces a crash like below.
This adds tty_port_initialized() to uart_set_ldisc() to prevent the crash.
Found by syzkaller.
--- drivers/tty/serial/serial_core.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/tty/serial/serial_core.c +4 -0
@@ -1465,6 +1465,10 @@ static void uart_set_ldisc(struct tty_st {struct uart_state *state = tty->driver_data;struct uart_port *uport; +struct tty_port *port = &state->port; + +if (!tty_port_initialized (port)) +return ;mutex_lock (&state->port.mutex); uport =uart_port_check (state);
Greg Kroah-Hartman
maintainerPATCH 42/453 vxlan: Add needed_headroom for lower device
In reply to Greg Kroah-HartmanFrom: Sven Eckelmann <[email protected]>
[ Upstream commit 0a35dc41fea67ac4495ce7584406bf9557a6e7d0 ]
It was observed that sending data via batadv over vxlan (on top of wireguard) reduced the performance massively compared to raw ethernet or batadv on raw ethernet. A check of perf data showed that the vxlan_build_skb was calling all the time pskb_expand_head to allocate enough headroom for:
min_headroom = LL_RESERVED_SPACE(dst->dev) + dst->header_len
+ VXLAN_HLEN + iphdr_len;
But the vxlan_config_apply only requested needed headroom for:
lowerdev->hard_header_len + VXLAN6_HEADROOM or VXLAN_HEADROOM
So it completely ignored the needed_headroom of the lower device. The first caller of net_dev_xmit could therefore never make sure that enough headroom was allocated for the rest of the transmit path.
--- drivers/net/vxlan.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/vxlan.c +1 -0
@@ -3538,6 +3538,7 @@ static void vxlan_config_apply(struct net_device *dev, dev->gso_max_segs = lowerdev->gso_max_segs; needed_headroom = lowerdev->hard_header_len; + needed_headroom += lowerdev->needed_headroom; max_mtu = lowerdev->mtu - (use_ipv6 ?VXLAN6_HEADROOM :VXLAN_HEADROOM );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 83/453 RDMA/bnxt_re: Set queue pair state when being queried
In reply to Greg Kroah-HartmanFrom: Kamal Heib <[email protected]>
[ Upstream commit 53839b51a7671eeb3fb44d479d541cf3a0f2dd45 ]
The API for ib_query_qp requires the driver to set cur_qp_state on return, add the missing set.
--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +1 -0
@@ -1793,6 +1793,7 @@ int bnxt_re_query_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr, goto out; } qp_attr->qp_state =__to_ib_qp_state (qplib_qp->state); + qp_attr->cur_qp_state =__to_ib_qp_state (qplib_qp->cur_qp_state); qp_attr->en_sqd_async_notify = qplib_qp->en_sqd_async_notify ?1 :0 ; qp_attr->qp_access_flags =__to_ib_access_flags (qplib_qp->access); qp_attr->pkey_index = qplib_qp->pkey_index;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 39/453 drm/tegra: sor: Disable clocks on error in tegra_sor_init()
In reply to Greg Kroah-HartmanFrom: Qinglang Miao <[email protected]>
[ Upstream commit bf3a3cdcad40e5928a22ea0fd200d17fd6d6308d ]
Fix the missing clk_disable_unprepare() before return from tegra_sor_init() in the error handling case.
--- drivers/gpu/drm/tegra/sor.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/tegra/sor.c +8 -2
@@ -2899,6 +2899,7 @@ static int tegra_sor_init(struct host1x_client *client)if (err <0 ) {dev_err (sor->dev,"failed to deassert SOR reset: %d\n" , err); +clk_disable_unprepare (sor->clk);return err; }
@@ -2906,12 +2907,17 @@ static int tegra_sor_init(struct host1x_client *client) } err =clk_prepare_enable (sor->clk_safe); -if (err <0 ) +if (err <0 ) { +clk_disable_unprepare (sor->clk);return err; + } err =clk_prepare_enable (sor->clk_dp); -if (err <0 ) +if (err <0 ) { +clk_disable_unprepare (sor->clk_safe); +clk_disable_unprepare (sor->clk);return err; + }/* * Enable and unmask the HDA codec SCRATCH0 register interrupt. This
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 84/453 rtc: pcf2127: fix pcf2127_nvmem_read/write() returns
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit ba1c30bf3f2536f248d262c6f257b5a787305991 ]
These functions should return zero on success. Non-zero returns are treated as error. On some paths, this doesn't matter but in nvmem_cell_read() a non-zero return would be passed to ERR_PTR() and lead to an Oops.
--- drivers/rtc/rtc-pcf2127.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/rtc/rtc-pcf2127.c +4 -8
@@ -230,10 +230,8 @@ static int pcf2127_nvmem_read(void *priv, unsigned int offset,if (ret)return ret; - ret =regmap_bulk_read (pcf2127->regmap,PCF2127_REG_RAM_RD_CMD , - val, bytes); - -return ret ?: bytes; +return regmap_bulk_read (pcf2127->regmap,PCF2127_REG_RAM_RD_CMD , + val, bytes); } static int pcf2127_nvmem_write(void *priv, unsigned int offset,
@@ -248,10 +246,8 @@ static int pcf2127_nvmem_write(void *priv, unsigned int offset,if (ret)return ret; - ret =regmap_bulk_write (pcf2127->regmap,PCF2127_REG_RAM_WRT_CMD , - val, bytes); - -return ret ?: bytes; +return regmap_bulk_write (pcf2127->regmap,PCF2127_REG_RAM_WRT_CMD , + val, bytes); }/* watchdog driver */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 69/453 quota: Sanity-check quota file headers on load
In reply to Greg Kroah-HartmanFrom: Jan Kara <[email protected]>
commit 11c514a99bb960941535134f0587102855e8ddee upstream.
Perform basic sanity checks of quota headers to avoid kernel crashes on corrupted quota files.
--- fs/quota/quota_v2.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
fs/quota/quota_v2.c +19 -0
@@ -159,6 +159,25 @@ static int v2_read_file_info(struct supe qinfo->dqi_entry_size =sizeof (struct v2r1_disk_dqblk ); qinfo->dqi_ops = &v2r1_qtree_ops; } + ret = -EUCLEAN ; +/* Some sanity checks of the read headers... */ +if ((loff_t )qinfo->dqi_blocks << qinfo->dqi_blocksize_bits > +i_size_read (sb_dqopt (sb)->files[type])) { +quota_error (sb,"Number of blocks too big for quota file size (%llu > %llu)." , + (loff_t )qinfo->dqi_blocks << qinfo->dqi_blocksize_bits, +i_size_read (sb_dqopt (sb)->files[type])); + goto out; + } +if (qinfo->dqi_free_blk >= qinfo->dqi_blocks) { +quota_error (sb,"Free block number too big (%u >= %u)." , + qinfo->dqi_free_blk, qinfo->dqi_blocks); + goto out; + } +if (qinfo->dqi_free_entry >= qinfo->dqi_blocks) { +quota_error (sb,"Block with free entry too big (%u >= %u)." , + qinfo->dqi_free_entry, qinfo->dqi_blocks); + goto out; + } ret =0 ; out:up_read (&dqopt->dqio_sem);
Greg Kroah-Hartman
maintainerPATCH 85/453 selinux: fix error initialization in inode_doinit_with_dentry()
In reply to Greg Kroah-HartmanFrom: Tianyue Ren <[email protected]>
[ Upstream commit 83370b31a915493231e5b9addc72e4bef69f8d31 ]
Mark the inode security label as invalid if we cannot find a dentry so that we will retry later rather than marking it initialized with the unlabeled SID.
--- security/selinux/hooks.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
security/selinux/hooks.c +16 -3
@@ -1499,7 +1499,13 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent* inode_doinit with a dentry, before these inodes could * be used again by userspace. */ - goto out; + isec->initialized =LABEL_INVALID ; +/* +* There is nothing useful to jump to the "out" +* label, except a needless spin lock/unlock +* cycle. +*/ +return 0 ; } rc = inode_doinit_use_xattr(inode, dentry, sbsec->def_sid,
@@ -1553,8 +1559,15 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent* inode_doinit() with a dentry, before these inodes * could be used again by userspace. */ -if (!dentry) - goto out; +if (!dentry) { + isec->initialized =LABEL_INVALID ; +/* +* There is nothing useful to jump to the "out" +* label, except a needless spin lock/unlock +* cycle. +*/ +return 0 ; + } rc =selinux_genfs_get_sid (dentry, sclass, sbsec->flags, &sid);if (rc) {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 89/453 ARM: p2v: fix handling of LPAE translation in BE mode
In reply to Greg Kroah-HartmanFrom: Ard Biesheuvel <[email protected]>
[ Upstream commit 4e79f0211b473f8e1eab8211a9fd50cc41a3a061 ]
When running in BE mode on LPAE hardware with a PA-to-VA translation that exceeds 4 GB, we patch bits 39:32 of the offset into the wrong byte of the opcode. So fix that, by rotating the offset in r0 to the right by 8 bits, which will put the 8-bit immediate in bits 31:24.
Note that this will also move bit #22 in its correct place when applying the rotation to the constant #0x400000.
--- arch/arm/kernel/head.S | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/kernel/head.S +1 -5
@@ -671,12 +671,8 @@ ARM_BE8(rev16 ip, ip) ldrcc r7, [r4], #4 @ use branch for delay slot bcc 1b bx lr -#else -#ifdef CONFIG_CPU_ENDIAN_BE8 - moveq r0, #0x00004000 @ set bit 22, mov to mvn instruction #else moveq r0, #0x400000 @ set bit 22, mov to mvn instruction -#endif b 2f 1: ldr ip, [r7, r3] #ifdef CONFIG_CPU_ENDIAN_BE8
@@ -685,7 +681,7 @@ ARM_BE8(rev16 ip, ip) tst ip, #0x000f0000 @ check the rotation field orrne ip, ip, r6, lsl #24 @ mask in offset bits 31-24 biceq ip, ip, #0x00004000 @ clear bit 22 - orreq ip, ip, r0 @ mask in offset bits 7-0 + orreq ip, ip, r0, ror #8 @ mask in offset bits 7-0 #else bic ip, ip, #0x000000ff tst ip, #0xf00 @ check the rotation field
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 90/453 x86/apic: Fix x2apic enablement without interrupt remapping
In reply to Greg Kroah-HartmanFrom: David Woodhouse <[email protected]>
[ Upstream commit 26573a97746c7a99f394f9d398ce91a8853b3b89 ]
Currently, Linux as a hypervisor guest will enable x2apic only if there are no CPUs present at boot time with an APIC ID above 255.
Hotplugging a CPU later with a higher APIC ID would result in a CPU which cannot be targeted by external interrupts.
Add a filter in x2apic_apic_id_valid() which can be used to prevent such CPUs from coming online, and allow x2apic to be enabled even if they are present at boot time.
--- arch/x86/include/asm/apic.h | 1 + arch/x86/kernel/apic/apic.c | 14 ++++++++------ arch/x86/kernel/apic/x2apic_phys.c | 9 +++++++++ 3 files changed, 18 insertions(+), 6 deletions(-)
arch/x86/include/asm/apic.h +1 -0
@@ -259,6 +259,7 @@ static inline u64 native_x2apic_icr_read(void)extern int x2apic_mode;extern int x2apic_phys; +extern void __init x2apic_set_max_apicid (u32 apicid);extern void __init check_x2apic (void );extern void x2apic_setup (void );static inline int x2apic_enabled (void )
arch/x86/kernel/apic/apic.c +8 -6
@@ -1886,20 +1886,22 @@ static __init void try_to_enable_x2apic(int remap_mode)return ;if (remap_mode !=IRQ_REMAP_X2APIC_MODE ) { -/* IR is required if there is APIC ID > 255 even when running -* under KVM +/* +* Using X2APIC without IR is not architecturally supported +* on bare metal but may be supported in guests. */ -if (max_physical_apicid >255 || - !x86_init.hyper.x2apic_available ()) { +if (!x86_init.hyper.x2apic_available ()) {pr_info ("x2apic: IRQ remapping doesn't support X2APIC mode\n" );x2apic_disable ();return ; }/* -* without IR all CPUs can be addressed by IOAPIC/MSI -* only in physical mode +* Without IR, all CPUs can be addressed by IOAPIC/MSI only +* in physical mode, and CPUs with an APIC ID that cannnot +* be addressed must not be brought online. */ +x2apic_set_max_apicid (255 ); x2apic_phys =1 ; }x2apic_enable ();
arch/x86/kernel/apic/x2apic_phys.c +9 -0
@@ -8,6 +8,12 @@int x2apic_phys;static struct apic apic_x2apic_phys; +static u32 x2apic_max_apicid__ro_after_init ; + +void __init x2apic_set_max_apicid (u32 apicid) +{ + x2apic_max_apicid = apicid; +}static int __init set_x2apic_phys_mode (char *arg) {
@@ -98,6 +104,9 @@ static int x2apic_phys_probe(void)/* Common x2apic functions, also used by x2apic_cluster */ int x2apic_apic_id_valid (u32 apicid) { +if (x2apic_max_apicid && apicid > x2apic_max_apicid) +return 0 ; +return 1 ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 41/453 arm64: syscall: exit userspace before unmasking exceptions
In reply to Greg Kroah-HartmanFrom: Mark Rutland <[email protected]>
[ Upstream commit ca1314d73eed493c49bb1932c60a8605530db2e4 ]
In el0_svc_common() we unmask exceptions before we call user_exit(), and so there's a window where an IRQ or debug exception can be taken while RCU is not watching. In do_debug_exception() we account for this in via debug_exception_{enter,exit}(), but in the el1_irq asm we do not and we call trace functions which rely on RCU before we have a guarantee that RCU is watching.
Let's avoid this by having el0_svc_common() exit userspace before unmasking exceptions, matching what we do for all other EL0 entry paths. We can use user_exit_irqoff() to avoid the pointless save/restore of IRQ flags while we're sure exceptions are masked in DAIF.
The workaround for Cortex-A76 erratum 1463225 may trigger a debug exception before this point, but the debug code invoked in this case is safe even when RCU is not watching.
--- arch/arm64/kernel/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/syscall.c +1 -1
@@ -102,8 +102,8 @@ static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr, regs->syscallno = scno;cortex_a76_erratum_1463225_svc_handler (); +user_exit_irqoff ();local_daif_restore (DAIF_PROCCTX ); -user_exit ();if (has_syscall_work (flags)) {/* set default errno for user-issued syscall(-1) */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 86/453 ARM: dts: aspeed: s2600wf: Fix VGA memory region location
In reply to Greg Kroah-HartmanFrom: Joel Stanley <[email protected]>
[ Upstream commit 9e1cc9679776f5b9e42481d392b1550753ebd084 ]
The VGA memory region is always from the top of RAM. On this board, that is 0x80000000 + 0x20000000 - 0x01000000 = 0x9f000000.
This was not an issue in practice as the region is "reserved" by the vendor's u-boot reducing the amount of available RAM, and the only user is the host VGA device poking at RAM over PCIe. That is, nothing from the ARM touches it.
It is worth fixing as developers copy existing device trees when building their machines, and the XDMA driver does use the memory region from the ARM side.
--- arch/arm/boot/dts/aspeed-bmc-intel-s2600wf.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/aspeed-bmc-intel-s2600wf.dts +2 -2
@@ -22,9 +22,9 @@ #size-cells = <1>; ranges; - vga_memory: framebuffer@7f000000 { + vga_memory: framebuffer@9f000000 { no-map; - reg = <0x7f000000 0x01000000>; + reg = <0x9f000000 0x01000000>; /* 16M */ }; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 87/453 RDMA/rxe: Compute PSN windows correctly
In reply to Greg Kroah-HartmanFrom: Bob Pearson <[email protected]>
[ Upstream commit bb3ab2979fd69db23328691cb10067861df89037 ]
The code which limited the number of unacknowledged PSNs was incorrect. The PSNs are limited to 24 bits and wrap back to zero from 0x00ffffff. The test was computing a 32 bit value which wraps at 32 bits so that qp->req.psn can appear smaller than the limit when it is actually larger.
Replace '>' test with psn_compare which is used for other PSN comparisons and correctly handles the 24 bit size.
--- drivers/infiniband/sw/rxe/rxe_req.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/sw/rxe/rxe_req.c +2 -1
@@ -664,7 +664,8 @@ next_wqe: }if (unlikely (qp_type (qp) ==IB_QPT_RC && - qp->req.psn > (qp->comp.psn +RXE_MAX_UNACKED_PSNS ))) { +psn_compare (qp->req.psn, (qp->comp.psn + +RXE_MAX_UNACKED_PSNS )) >0 )) { qp->req.wait_psn =1 ; goto exit; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 88/453 x86/mm/ident_map: Check for errors from ident_pud_init()
In reply to Greg Kroah-HartmanFrom: Arvind Sankar <[email protected]>
[ Upstream commit 1fcd009102ee02e217f2e7635ab65517d785da8e ]
Commit
ea3b5e60ce80 ("x86/mm/ident_map: Add 5-level paging support")
added ident_p4d_init() to support 5-level paging, but this function doesn't check and return errors from ident_pud_init().
For example, the decompressor stub uses this code to create an identity mapping. If it runs out of pages while trying to allocate a PMD pagetable, the error will be currently ignored.
Fix this to propagate errors.
[ bp: Space out statements for better readability. ]
--- arch/x86/mm/ident_map.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
arch/x86/mm/ident_map.c +10 -2
@@ -62,6 +62,7 @@ static int ident_p4d_init(struct x86_mapping_info *info, p4d_t *p4d_page, unsigned long addr, unsigned long end) {unsigned long next; +int result;for (; addr < end; addr = next) {p4d_t *p4d = p4d_page +p4d_index (addr);
@@ -73,13 +74,20 @@ static int ident_p4d_init(struct x86_mapping_info *info, p4d_t *p4d_page,if (p4d_present (*p4d)) { pud =pud_offset (p4d,0 ); -ident_pud_init (info, pud, addr, next); + result =ident_pud_init (info, pud, addr, next); +if (result) +return result; +continue ; } pud = (pud_t *)info->alloc_pgt_page (info->context);if (!pud)return -ENOMEM ; -ident_pud_init (info, pud, addr, next); + + result =ident_pud_init (info, pud, addr, next); +if (result) +return result; +set_p4d (p4d,__p4d (__pa (pud) | info->kernpg_flag)); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 92/453 sched: Reenable interrupts in do_sched_yield()
In reply to Greg Kroah-HartmanFrom: Thomas Gleixner <[email protected]>
[ Upstream commit 345a957fcc95630bf5535d7668a59ed983eb49a7 ]
do_sched_yield() invokes schedule() with interrupts disabled which is not allowed. This goes back to the pre git era to commit a6efb709806c ("[PATCH] irqlock patch 2.5.27-H6") in the history tree.
Reenable interrupts and remove the misleading comment which "explains" it.
--- kernel/sched/core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
kernel/sched/core.c +1 -5
@@ -5679,12 +5679,8 @@ static void do_sched_yield(void)schedstat_inc (rq->yld_count); current->sched_class->yield_task (rq); -/* -* Since we are going to call schedule() anyway, there's -* no need to preempt or enable interrupts: -*/ preempt_disable (); -rq_unlock (rq, &rf); +rq_unlock_irq (rq, &rf);sched_preempt_enable_no_resched ();schedule ();
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 93/453 drm/amdgpu: fix incorrect enum type
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit a110f3750bf8b93764f13bd1402c7cba03d15d61 ]
core_link_write_dpcd() returns enum dc_status, not ddc_result:
display/dc/core/dc_link_dp.c: In function 'dp_set_panel_mode':display/dc/core/dc_link_dp.c:4237:11: warning: implicit conversion from 'enum dc_status' to 'enum ddc_result' [-Wenum-conversion]
Avoid the warning by using the correct enum in the caller.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +2 -2
@@ -3378,7 +3378,7 @@ void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode)if (edp_config_set.bits.PANEL_MODE_EDP != panel_mode_edp) { -enum ddc_result result =DDC_RESULT_UNKNOWN ; +enum dc_status result =DC_ERROR_UNEXPECTED ; edp_config_set.bits.PANEL_MODE_EDP = panel_mode_edp;
@@ -3388,7 +3388,7 @@ void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode) &edp_config_set.raw, sizeof(edp_config_set.raw)); -ASSERT (result ==DDC_RESULT_SUCESSFULL ); +ASSERT (result ==DC_OK ); } } DC_LOG_DETECTION_DP_CAPS("Link: %d eDP panel mode supported: %d "
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 95/453 crypto: talitos - Fix return type of current_desc_hdr()
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
[ Upstream commit 0237616173fd363a54bd272aa3bd376faa1d7caa ]
current_desc_hdr() returns a u32 but in fact this is a __be32, leading to a lot of sparse warnings.
Change the return type to __be32 and ensure it is handled as sure by the caller.
--- drivers/crypto/talitos.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/crypto/talitos.c +3 -3
@@ -460,7 +460,7 @@ DEF_TALITOS2_DONE(ch1_3, TALITOS2_ISR_CH_1_3_DONE)/* * locate current (offending) descriptor */ -static u32 current_desc_hdr (struct device *dev,int ch) +static __be32 current_desc_hdr (struct device *dev,int ch) {struct talitos_private *priv =dev_get_drvdata (dev);int tail, iter;
@@ -501,13 +501,13 @@ static u32 current_desc_hdr(struct device *dev, int ch)/* * user diagnostics; report root cause of error based on execution unit status */ -static void report_eu_error (struct device *dev,int ch,u32 desc_hdr) +static void report_eu_error (struct device *dev,int ch,__be32 desc_hdr) {struct talitos_private *priv =dev_get_drvdata (dev);int i;if (!desc_hdr) - desc_hdr =in_be32 (priv->chan[ch].reg +TALITOS_DESCBUF ); + desc_hdr =cpu_to_be32 (in_be32 (priv->chan[ch].reg +TALITOS_DESCBUF ));switch (desc_hdr &DESC_HDR_SEL0_MASK ) {case DESC_HDR_SEL0_AFEU :
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 72/453 md: fix a warning caused by a race between concurrent md_ioctl()s
In reply to Greg Kroah-HartmanFrom: Dae R. Jeong <[email protected]>
commit c731b84b51bf7fe83448bea8f56a6d55006b0615 upstream.
Syzkaller reports a warning as belows.
WARNING: CPU: 0 PID: 9647 at drivers/md/md.c:7169 ... Call Trace: ... RIP: 0010:md_ioctl+0x4017/0x5980 drivers/md/md.c:7169 RSP: 0018:ffff888096027950 EFLAGS: 00010293 RAX: ffff88809322c380 RBX: 0000000000000932 RCX: ffffffff84e266f2 RDX: 0000000000000000 RSI: ffffffff84e299f7 RDI: 0000000000000007 RBP: ffff888096027bc0 R08: ffff88809322c380 R09: ffffed101341a482 R10: ffff888096027940 R11: ffff88809a0d240f R12: 0000000000000932 R13: ffff8880a2c14100 R14: ffff88809a0d2268 R15: ffff88809a0d2408 __blkdev_driver_ioctl block/ioctl.c:304 [inline] blkdev_ioctl+0xece/0x1c10 block/ioctl.c:606 block_ioctl+0xee/0x130 fs/block_dev.c:1930 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0xfd/0x680 arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe
This is caused by a race between two concurrenct md_ioctl()s closing the array.
CPU1 (md_ioctl()) CPU2 (md_ioctl())
------ ------set_bit(MD_CLOSING, &mddev->flags);
did_set_md_closing = true;
WARN_ON_ONCE(test_bit(MD_CLOSING,
&mddev->flags));
if(did_set_md_closing)
clear_bit(MD_CLOSING, &mddev->flags);Fix the warning by returning immediately if the MD_CLOSING bit is set in &mddev->flags which indicates that the array is being closed.
--- drivers/md/md.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/md/md.c +5 -2
@@ -7371,8 +7371,11 @@ static int md_ioctl(struct block_device err = -EBUSY ; goto out; } -WARN_ON_ONCE (test_bit (MD_CLOSING , &mddev->flags)); -set_bit (MD_CLOSING , &mddev->flags); +if (test_and_set_bit (MD_CLOSING , &mddev->flags)) { +mutex_unlock (&mddev->open_mutex); + err = -EBUSY ; + goto out; + } did_set_md_closing = true;mutex_unlock (&mddev->open_mutex);sync_blockdev (bdev);
Greg Kroah-Hartman
maintainerPATCH 75/453 drm/mcde: Fix handling of platform_get_irq() error
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit e2dae672a9d5e11856fe30ede63467c65f999a81 ]
platform_get_irq() returns -ERRNO on error. In such case comparison to 0 would pass the check.
--- drivers/gpu/drm/mcde/mcde_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/mcde/mcde_drv.c +2 -2
@@ -410,8 +410,8 @@ static int mcde_probe(struct platform_device *pdev) } irq =platform_get_irq (pdev,0 ); -if (!irq) { - ret = -EINVAL ; +if (irq <0 ) { + ret = irq; goto clk_disable; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 77/453 arm64: dts: renesas: hihope-rzg2-ex: Drop rxc-skew-ps from ethernet-phy node
In reply to Greg Kroah-HartmanFrom: Biju Das <[email protected]>
[ Upstream commit 67d3dcf12a3d245b6fd6ca5672893f7ae4e137ed ]
HiHope RZG2[HMN] boards uses Realtek phy and the driver does not support rxc-skew-ps property. So remove rxc-skew-ps from ethernet-phy node.
--- arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi +0 -1
@@ -23,7 +23,6 @@ status = "okay"; phy0: ethernet-phy@0 { - rxc-skew-ps = <1500>; reg = <0>; interrupt-parent = <&gpio2>; interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 99/453 drm/amdgpu: fix build_coefficients() argument
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit dbb60031dd0c2b85f10ce4c12ae604c28d3aaca4 ]
gcc -Wextra warns about a function taking an enum argument being called with a bool:
drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c: In function 'apply_degamma_for_user_regamma':drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c:1617:29: warning: implicit conversion from 'enum <anonymous>' to 'enum dc_transfer_func_predefined' [-Wenum-conversion]
1617 | build_coefficients(&coeff, true);
It appears that a patch was added using the old calling conventions after the type was changed, and the value should actually be 0 (TRANSFER_FUNCTION_SRGB) here instead of 1 (true).
--- drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/color/color_gamma.c +1 -1
@@ -1576,7 +1576,7 @@ static void apply_degamma_for_user_regamma(struct pwl_float_data_ex *rgb_regammastruct pwl_float_data_ex *rgb = rgb_regamma;const struct hw_x_point *coord_x = coordinates_x; -build_coefficients (&coeff, true); +build_coefficients (&coeff,TRANSFER_FUNCTION_SRGB ); i =0 ;while (i != hw_points_num +1 ) {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 101/453 spi: img-spfi: fix reference leak in img_spfi_resume
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit ee5558a9084584015c8754ffd029ce14a5827fa8 ]
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in img_spfi_resume, so we should fix it.
--- drivers/spi/spi-img-spfi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-img-spfi.c +3 -1
@@ -771,8 +771,10 @@ static int img_spfi_resume(struct device *dev)int ret; ret =pm_runtime_get_sync (dev); -if (ret) +if (ret) { +pm_runtime_put_noidle (dev);return ret; + }spfi_reset (spfi);pm_runtime_put (dev);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 117/453 spi: tegra20-sflash: fix reference leak in tegra_sflash_resume
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit 3482e797ab688da6703fe18d8bad52f94199f4f2 ]
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in tegra_sflash_resume, so we should fix it.
--- drivers/spi/spi-tegra20-sflash.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/spi-tegra20-sflash.c +1 -0
@@ -551,6 +551,7 @@ static int tegra_sflash_resume(struct device *dev) ret =pm_runtime_get_sync (dev);if (ret <0 ) { +pm_runtime_put_noidle (dev);dev_err (dev,"pm runtime failed, e = %d\n" , ret);return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 119/453 spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in bcm63xx_hsspi_resume
In reply to Greg Kroah-HartmanFrom: Qinglang Miao <[email protected]>
[ Upstream commit 9bb9ef2b3e5d9d012876e7e2d7757eb30e865bee ]
Fix the missing clk_disable_unprepare() before return from bcm63xx_hsspi_resume in the error handling case when fails to prepare and enable bs->pll_clk.
--- drivers/spi/spi-bcm63xx-hsspi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/spi/spi-bcm63xx-hsspi.c +3 -1
@@ -483,8 +483,10 @@ static int bcm63xx_hsspi_resume(struct device *dev)if (bs->pll_clk) { ret =clk_prepare_enable (bs->pll_clk); -if (ret) +if (ret) { +clk_disable_unprepare (bs->clk);return ret; + } }spi_master_resume (master);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 35/453 selftests: fix poll error in udpgro.sh
In reply to Greg Kroah-HartmanFrom: Paolo Abeni <[email protected]>
[ Upstream commit 38bf8cd821be292e7d8e6f6283d67c5d9708f887 ]
The test program udpgso_bench_rx always invokes the poll() syscall with a timeout of 10ms. If a larger timeout is specified via the command line, udpgso_bench_rx is supposed to do multiple poll() calls till the timeout is expired or an event is received.
Currently the poll() loop errors out after the first invocation with no events, and may causes self-tests failure alike:
failed
GRO with custom segment size ./udpgso_bench_rx: poll: 0x0 expected 0x1
This change addresses the issue allowing the poll() loop to consume all the configured timeout.
--- tools/testing/selftests/net/udpgso_bench_rx.c | 3 +++ 1 file changed, 3 insertions(+)
tools/testing/selftests/net/udpgso_bench_rx.c +3 -0
@@ -113,6 +113,9 @@ static void do_poll(int fd, int timeout_ms) interrupted = true;break ; } + +/* no events and more time to wait, do poll again */ +continue ; }if (pfd.revents !=POLLIN ) error(1, errno, "poll: 0x%x expected 0x%x\n",
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 43/453 vxlan: Copy needed_tailroom from lowerdev
In reply to Greg Kroah-HartmanFrom: Sven Eckelmann <[email protected]>
[ Upstream commit a5e74021e84bb5eadf760aaf2c583304f02269be ]
While vxlan doesn't need any extra tailroom, the lowerdev might need it. In that case, copy it over to reduce the chance for additional (re)allocations in the transmit path.
--- drivers/net/vxlan.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/vxlan.c +2 -0
@@ -3540,6 +3540,8 @@ static void vxlan_config_apply(struct net_device *dev, needed_headroom = lowerdev->hard_header_len; needed_headroom += lowerdev->needed_headroom; + dev->needed_tailroom = lowerdev->needed_tailroom; + max_mtu = lowerdev->mtu - (use_ipv6 ?VXLAN6_HEADROOM :VXLAN_HEADROOM );if (max_mtu <ETH_MIN_MTU )
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 68/453 Bluetooth: Fix slab-out-of-bounds read in hci_le_direct_adv_report_evt()
In reply to Greg Kroah-HartmanFrom: Peilin Ye <[email protected]>
commit f7e0e8b2f1b0a09b527885babda3e912ba820798 upstream.
num_reports is not being properly checked. A malformed event packet with a large num_reports number makes hci_le_direct_adv_report_evt() read out of bounds. Fix it.
--- net/bluetooth/hci_event.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
net/bluetooth/hci_event.c +5 -7
@@ -5711,21 +5711,19 @@ static void hci_le_direct_adv_report_evt struct sk_buff *skb) {u8 num_reports = skb->data[0 ]; -void *ptr = &skb->data[1 ]; +struct hci_ev_le_direct_adv_info *ev = (void *)&skb->data[1 ]; -hci_dev_lock (hdev); +if (!num_reports || skb->len < num_reports *sizeof (*ev) +1 ) +return ; -while (num_reports--) { -struct hci_ev_le_direct_adv_info *ev = ptr; +hci_dev_lock (hdev); +for (; num_reports; num_reports--, ev++)process_adv_report (hdev, ev->evt_type, &ev->bdaddr, ev->bdaddr_type, &ev->direct_addr, ev->direct_addr_type, ev->rssi,NULL ,0 , false); - ptr +=sizeof (*ev); - } -hci_dev_unlock (hdev); }
Greg Kroah-Hartman
maintainerPATCH 118/453 spi: tegra114: fix reference leak in tegra spi ops
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit a042184c7fb99961ea083d4ec192614bec671969 ]
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in two callers(tegra_spi_setup and tegra_spi_resume), so we should fix it.
--- drivers/spi/spi-tegra114.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/spi/spi-tegra114.c +2 -0
@@ -954,6 +954,7 @@ static int tegra_spi_setup(struct spi_device *spi) ret =pm_runtime_get_sync (tspi->dev);if (ret <0 ) { +pm_runtime_put_noidle (tspi->dev);dev_err (tspi->dev,"pm runtime failed, e = %d\n" , ret);if (cdata)tegra_spi_cleanup (spi);
@@ -1472,6 +1473,7 @@ static int tegra_spi_resume(struct device *dev) ret =pm_runtime_get_sync (dev);if (ret <0 ) { +pm_runtime_put_noidle (dev);dev_err (dev,"pm runtime failed, e = %d\n" , ret);return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 121/453 selftest/bpf: Add missed ip6ip6 test back
In reply to Greg Kroah-HartmanFrom: Hangbin Liu <[email protected]>
[ Upstream commit 58cfa49c2ba7f815adccc27a775e7cf8a8f7f539 ]
In comment 173ca26e9b51 ("samples/bpf: add comprehensive ipip, ipip6, ip6ip6 test") we added ip6ip6 test for bpf tunnel testing. But in commit 933a741e3b82 ("selftests/bpf: bpf tunnel test.") when we moved it to the current folder, we didn't add it.
This patch add the ip6ip6 test back to bpf tunnel test. Update the ipip6's topology for both IPv4 and IPv6 testing. Since iperf test is removed as currect framework simplified it in purpose, I also removed unused tcp checkings in test_tunnel_kern.c.
--- .../selftests/bpf/progs/test_tunnel_kern.c | 42 +++--------------- tools/testing/selftests/bpf/test_tunnel.sh | 43 +++++++++++++++++-- 2 files changed, 46 insertions(+), 39 deletions(-)
tools/testing/selftests/bpf/progs/test_tunnel_kern.c +7 -35
@@ -15,7 +15,6 @@#include <linux/ip.h> #include <linux/ipv6.h> #include <linux/types.h> -#include <linux/tcp.h> #include <linux/socket.h> #include <linux/pkt_cls.h> #include <linux/erspan.h>
@@ -528,12 +527,11 @@ int _ipip_set_tunnel(struct __sk_buff *skb)struct bpf_tunnel_key key = {};void *data = (void *)(long )skb->data;struct iphdr *iph = data; -struct tcphdr *tcp = data +sizeof (*iph);void *data_end = (void *)(long )skb->data_end;int ret;/* single length check */ -if (data +sizeof (*iph) +sizeof (*tcp) > data_end) { +if (data +sizeof (*iph) > data_end) {ERROR (1 );return TC_ACT_SHOT ; }
@@ -541,16 +539,6 @@ int _ipip_set_tunnel(struct __sk_buff *skb) key.tunnel_ttl =64 ;if (iph->protocol ==IPPROTO_ICMP ) { key.remote_ipv4 =0xac100164 ;/* 172.16.1.100 */ - }else { -if (iph->protocol !=IPPROTO_TCP || iph->ihl !=5 ) -return TC_ACT_SHOT ; - -if (tcp->dest ==bpf_htons (5200 )) - key.remote_ipv4 =0xac100164 ;/* 172.16.1.100 */ -else if (tcp->dest ==bpf_htons (5201 )) - key.remote_ipv4 =0xac100165 ;/* 172.16.1.101 */ -else -return TC_ACT_SHOT ; } ret =bpf_skb_set_tunnel_key (skb, &key,sizeof (key),0 );
@@ -585,19 +573,20 @@ int _ipip6_set_tunnel(struct __sk_buff *skb)struct bpf_tunnel_key key = {};void *data = (void *)(long )skb->data;struct iphdr *iph = data; -struct tcphdr *tcp = data +sizeof (*iph);void *data_end = (void *)(long )skb->data_end;int ret;/* single length check */ -if (data +sizeof (*iph) +sizeof (*tcp) > data_end) { +if (data +sizeof (*iph) > data_end) {ERROR (1 );return TC_ACT_SHOT ; }__builtin_memset (&key,0x0 ,sizeof (key)); - key.remote_ipv6[3 ] =bpf_htonl (0x11 );/* ::11 */ key.tunnel_ttl =64 ; +if (iph->protocol ==IPPROTO_ICMP ) { + key.remote_ipv6[3 ] =bpf_htonl (0x11 );/* ::11 */ + } ret =bpf_skb_set_tunnel_key (skb, &key,sizeof (key),BPF_F_TUNINFO_IPV6 );
@@ -634,35 +623,18 @@ int _ip6ip6_set_tunnel(struct __sk_buff *skb)struct bpf_tunnel_key key = {};void *data = (void *)(long )skb->data;struct ipv6hdr *iph = data; -struct tcphdr *tcp = data +sizeof (*iph);void *data_end = (void *)(long )skb->data_end;int ret;/* single length check */ -if (data +sizeof (*iph) +sizeof (*tcp) > data_end) { +if (data +sizeof (*iph) > data_end) {ERROR (1 );return TC_ACT_SHOT ; } - key.remote_ipv6[0 ] =bpf_htonl (0x2401db00 ); key.tunnel_ttl =64 ; -if (iph->nexthdr ==58 /* NEXTHDR_ICMP */ ) { - key.remote_ipv6[3 ] =bpf_htonl (1 ); - }else { -if (iph->nexthdr !=6 /* NEXTHDR_TCP */ ) { -ERROR (iph->nexthdr); -return TC_ACT_SHOT ; - } - -if (tcp->dest ==bpf_htons (5200 )) { - key.remote_ipv6[3 ] =bpf_htonl (1 ); - }else if (tcp->dest ==bpf_htons (5201 )) { - key.remote_ipv6[3 ] =bpf_htonl (2 ); - }else { -ERROR (tcp->dest); -return TC_ACT_SHOT ; - } + key.remote_ipv6[3 ] =bpf_htonl (0x11 );/* ::11 */ } ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key),
tools/testing/selftests/bpf/test_tunnel.sh +39 -4
94 lines not on this page · raw message
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 124/453 net: evaluate net.ipvX.conf.all.ignore_routes_with_linkdown
In reply to Greg Kroah-HartmanFrom: Vincent Bernat <[email protected]>
[ Upstream commit c0c5a60f0f1311bcf08bbe735122096d6326fb5b ]
Introduced in 0eeb075fad73, the "ignore_routes_with_linkdown" sysctl ignores a route whose interface is down. It is provided as a per-interface sysctl. However, while a "all" variant is exposed, it was a noop since it was never evaluated. We use the usual "or" logic for this kind of sysctls.
Tested with:
ip link add type veth # veth0 + veth1
ip link add type veth # veth1 + veth2
ip link set up dev veth0
ip link set up dev veth1 # link-status paired with veth0
ip link set up dev veth2
ip link set up dev veth3 # link-status paired with veth2
# First available path
ip -4 addr add 203.0.113.${uts#H}/24 dev veth0
ip -6 addr add 2001:db8:1::${uts#H}/64 dev veth0
# Second available path
ip -4 addr add 192.0.2.${uts#H}/24 dev veth2
ip -6 addr add 2001:db8:2::${uts#H}/64 dev veth2
# More specific route through first path
ip -4 route add 198.51.100.0/25 via 203.0.113.254 # via veth0
ip -6 route add 2001:db8:3::/56 via 2001:db8:1::ff # via veth0
# Less specific route through second path
ip -4 route add 198.51.100.0/24 via 192.0.2.254 # via veth2
ip -6 route add 2001:db8:3::/48 via 2001:db8:2::ff # via veth2
# H1: enable on "all"
# H2: enable on "veth0"
for v in ipv4 ipv6; do
case $uts in
H1)
sysctl -qw net.${v}.conf.all.ignore_routes_with_linkdown=1
;;
H2)
sysctl -qw net.${v}.conf.veth0.ignore_routes_with_linkdown=1
;;
esac
done
set -xe
# When veth0 is up, best route is through veth0
ip -o route get 198.51.100.1 | grep -Fw veth0
ip -o route get 2001:db8:3::1 | grep -Fw veth0
# When veth0 is down, best route should be through veth2 on H1/H2,
# but on veth0 on H2
ip link set down dev veth1 # down veth0
ip route show
[ $uts != H3 ] || ip -o route get 198.51.100.1 | grep -Fw veth0
[ $uts != H3 ] || ip -o route get 2001:db8:3::1 | grep -Fw veth0
[ $uts = H3 ] || ip -o route get 198.51.100.1 | grep -Fw veth2
[ $uts = H3 ] || ip -o route get 2001:db8:3::1 | grep -Fw veth2Without this patch, the two last lines would fail on H1 (the one using the "all" sysctl). With the patch, everything succeeds as expected.
Also document the sysctl in ip-sysctl.rst.
--- Documentation/networking/ip-sysctl.txt | 3 +++ include/linux/inetdevice.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
Documentation/networking/ip-sysctl.txt +3 -0
@@ -1366,6 +1366,9 @@ igmpv3_unsolicited_report_interval - INTEGER IGMPv3 report retransmit will take place. Default: 1000 (1 seconds) +ignore_routes_with_linkdown - BOOLEAN + Ignore routes whose link is down when performing a FIB lookup. + promote_secondaries - BOOLEAN When a primary IP address is removed from this interface promote a corresponding secondary IP address instead of
include/linux/inetdevice.h +1 -1
@@ -126,7 +126,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) IN_DEV_ORCONF((in_dev), ACCEPT_REDIRECTS)))#define IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN (in_dev) \ - IN_DEV_CONF_GET((in_dev), IGNORE_ROUTES_WITH_LINKDOWN) + IN_DEV_ORCONF((in_dev), IGNORE_ROUTES_WITH_LINKDOWN)#define IN_DEV_ARPFILTER (in_dev) IN_DEV_ORCONF((in_dev), ARPFILTER)#define IN_DEV_ARP_ACCEPT (in_dev) IN_DEV_ORCONF((in_dev), ARP_ACCEPT)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 79/453 soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit cf25d802e029c31efac8bdc979236927f37183bd ]
This code needs to call iounmap() on one error path.
--- drivers/soc/renesas/rmobile-sysc.c | 1 + 1 file changed, 1 insertion(+)
drivers/soc/renesas/rmobile-sysc.c +1 -0
@@ -327,6 +327,7 @@ static int __init rmobile_init_pm_domains(void) pmd =of_get_child_by_name (np,"pm-domains" );if (!pmd) { +iounmap (base);pr_warn ("%pOF lacks pm-domains node\n" , np);continue ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 104/453 spi: spi-mem: fix reference leak in spi_mem_access_start
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit c02bb16b0e826bf0e19aa42c3ae60ea339f32cf5 ]
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in spi_mem_access_start, so we should fix it.
--- drivers/spi/spi-mem.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/spi-mem.c +1 -0
@@ -237,6 +237,7 @@ static int spi_mem_access_start(struct spi_mem *mem) ret =pm_runtime_get_sync (ctlr->dev.parent);if (ret <0 ) { +pm_runtime_put_noidle (ctlr->dev.parent);dev_err (&ctlr->dev,"Failed to power device: %d\n" , ret);return ret;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 120/453 mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure
In reply to Greg Kroah-HartmanFrom: Tsuchiya Yuto <[email protected]>
[ Upstream commit fa74cb1dc0f4da46c441b735ca865ac52de42c0e ]
When a PCIe function level reset (FLR) is performed but without fw reset for some reasons (e.g., on Microsoft Surface devices, fw reset requires other quirks), it fails to reset wifi properly. You can trigger the issue on such devices via debugfs entry for reset:
$ echo 1 | sudo tee /sys/kernel/debug/mwifiex/mlan0/reset
and the resulting dmesg log:
[ 45.740508] mwifiex_pcie 0000:03:00.0: Resetting per request
[ 45.742937] mwifiex_pcie 0000:03:00.0: info: successfully disconnected from [BSSID]: reason code 3
[ 45.744666] mwifiex_pcie 0000:03:00.0: info: shutdown mwifiex...
[ 45.751530] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
[ 45.751539] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
[ 45.771691] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
[ 45.771695] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
[ 45.771697] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
[ 45.771698] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
[ 45.771699] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
[ 45.771701] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
[ 45.771702] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
[ 45.771703] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
[ 45.771704] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
[ 45.771705] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
[ 45.771707] mwifiex_pcie 0000:03:00.0: PREP_CMD: card is removed
[ 45.771708] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
[ 53.099343] mwifiex_pcie 0000:03:00.0: info: trying to associate to '[SSID]' bssid [BSSID]
[ 53.241870] mwifiex_pcie 0000:03:00.0: info: associated to bssid [BSSID] successfully
[ 75.377942] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110
[ 85.385491] mwifiex_pcie 0000:03:00.0: info: successfully disconnected from [BSSID]: reason code 15
[ 87.539408] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110
[ 87.539412] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
[ 99.699917] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110
[ 99.699925] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
[ 111.859802] mwifiex_pcie 0000:03:00.0: cmd_wait_q terminated: -110
[ 111.859808] mwifiex_pcie 0000:03:00.0: deleting the crypto keys
[...]When comparing mwifiex_shutdown_sw() with mwifiex_pcie_remove(), it lacks mwifiex_init_shutdown_fw().
This commit fixes mwifiex_shutdown_sw() by adding the missing mwifiex_init_shutdown_fw().
--- drivers/net/wireless/marvell/mwifiex/main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/marvell/mwifiex/main.c +2 -0
@@ -1469,6 +1469,8 @@ int mwifiex_shutdown_sw(struct mwifiex_adapter *adapter) priv =mwifiex_get_priv (adapter,MWIFIEX_BSS_ROLE_ANY );mwifiex_deauthenticate (priv,NULL ); +mwifiex_init_shutdown_fw (priv,MWIFIEX_FUNC_SHUTDOWN ); +mwifiex_uninit_sw (adapter); adapter->is_up = false;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 122/453 ASoC: wm8998: Fix PM disable depth imbalance on error
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit 193aa0a043645220d2a2f783ba06ae13d4601078 ]
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context.
--- sound/soc/codecs/wm8998.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/codecs/wm8998.c +3 -1
@@ -1375,7 +1375,7 @@ static int wm8998_probe(struct platform_device *pdev) ret =arizona_init_spk_irqs (arizona);if (ret <0 ) -return ret; + goto err_pm_disable; ret = devm_snd_soc_register_component(&pdev->dev, &soc_component_dev_wm8998,
@@ -1390,6 +1390,8 @@ static int wm8998_probe(struct platform_device *pdev) err_spk_irqs:arizona_free_spk_irqs (arizona); +err_pm_disable: +pm_runtime_disable (&pdev->dev);return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 127/453 RDMa/mthca: Work around -Wenum-conversion warning
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit fbb7dc5db6dee553b5a07c27e86364a5223e244c ]
gcc points out a suspicious mixing of enum types in a function that converts from MTHCA_OPCODE_* values to IB_WC_* values:
drivers/infiniband/hw/mthca/mthca_cq.c: In function 'mthca_poll_one':drivers/infiniband/hw/mthca/mthca_cq.c:607:21: warning: implicit conversion from 'enum <anonymous>' to 'enum ib_wc_opcode' [-Wenum-conversion]
607 | entry->opcode = MTHCA_OPCODE_INVALID;
Nothing seems to ever check for MTHCA_OPCODE_INVALID again, no idea if this is meaningful, but it seems harmless as it deals with an invalid input.
Remove MTHCA_OPCODE_INVALID and set the ib_wc_opcode to 0xFF, which is still bogus, but at least doesn't make compiler warnings.
--- drivers/infiniband/hw/mthca/mthca_cq.c | 2 +- drivers/infiniband/hw/mthca/mthca_dev.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/hw/mthca/mthca_cq.c +1 -1
@@ -604,7 +604,7 @@ static inline int mthca_poll_one(struct mthca_dev *dev, entry->byte_len =MTHCA_ATOMIC_BYTE_LEN ;break ;default : - entry->opcode =MTHCA_OPCODE_INVALID ; + entry->opcode =0xFF ;break ; } }else {
drivers/infiniband/hw/mthca/mthca_dev.h +0 -1
@@ -105,7 +105,6 @@ enum {MTHCA_OPCODE_ATOMIC_CS =0x11 ,MTHCA_OPCODE_ATOMIC_FA =0x12 , MTHCA_OPCODE_BIND_MW = 0x18, -MTHCA_OPCODE_INVALID =0xff }; enum {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 105/453 ASoC: pcm: DRAIN support reactivation
In reply to Greg Kroah-HartmanFrom: Cezary Rojewski <[email protected]>
[ Upstream commit 4c22b80f61540ea99d9b4af0127315338755f05b ]
soc-pcm's dpcm_fe_dai_do_trigger() supported DRAIN commnad up to kernel v5.4 where explicit switch(cmd) has been introduced which takes into account all SNDRV_PCM_TRIGGER_xxx but SNDRV_PCM_TRIGGER_DRAIN. Update switch statement to reactive support for it.
As DRAIN is somewhat unique by lacking negative/stop counterpart, bring behaviour of dpcm_fe_dai_do_trigger() for said command back to its pre-v5.4 state by adding it to START/RESUME/PAUSE_RELEASE group.
--- sound/soc/soc-pcm.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/soc-pcm.c +2 -0
@@ -2346,6 +2346,7 @@ static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd)case SNDRV_PCM_TRIGGER_START :case SNDRV_PCM_TRIGGER_RESUME :case SNDRV_PCM_TRIGGER_PAUSE_RELEASE : +case SNDRV_PCM_TRIGGER_DRAIN : ret =dpcm_dai_trigger_fe_be (substream, cmd, true);break ;case SNDRV_PCM_TRIGGER_STOP :
@@ -2363,6 +2364,7 @@ static int dpcm_fe_dai_do_trigger(struct snd_pcm_substream *substream, int cmd)case SNDRV_PCM_TRIGGER_START :case SNDRV_PCM_TRIGGER_RESUME :case SNDRV_PCM_TRIGGER_PAUSE_RELEASE : +case SNDRV_PCM_TRIGGER_DRAIN : ret =dpcm_dai_trigger_fe_be (substream, cmd, false);break ;case SNDRV_PCM_TRIGGER_STOP :
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 107/453 selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handling
In reply to Greg Kroah-HartmanFrom: Paul Moore <[email protected]>
[ Upstream commit 200ea5a2292dc444a818b096ae6a32ba3caa51b9 ]
A previous fix, commit 83370b31a915 ("selinux: fix error initialization in inode_doinit_with_dentry()"), changed how failures were handled before a SELinux policy was loaded. Unfortunately that patch was potentially problematic for two reasons: it set the isec->initialized state without holding a lock, and it didn't set the inode's SELinux label to the "default" for the particular filesystem. The later can be a problem if/when a later attempt to revalidate the inode fails and SELinux reverts to the existing inode label.
This patch should restore the default inode labeling that existed before the original fix, without affecting the LABEL_INVALID marking such that revalidation will still be attempted in the future.
--- security/selinux/hooks.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-)
security/selinux/hooks.c +13 -18
@@ -1499,13 +1499,7 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent* inode_doinit with a dentry, before these inodes could * be used again by userspace. */ - isec->initialized =LABEL_INVALID ; -/* -* There is nothing useful to jump to the "out" -* label, except a needless spin lock/unlock -* cycle. -*/ -return 0 ; + goto out_invalid; } rc = inode_doinit_use_xattr(inode, dentry, sbsec->def_sid,
@@ -1559,15 +1553,8 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent* inode_doinit() with a dentry, before these inodes * could be used again by userspace. */ -if (!dentry) { - isec->initialized =LABEL_INVALID ; -/* -* There is nothing useful to jump to the "out" -* label, except a needless spin lock/unlock -* cycle. -*/ -return 0 ; - } +if (!dentry) + goto out_invalid; rc =selinux_genfs_get_sid (dentry, sclass, sbsec->flags, &sid);if (rc) {
@@ -1592,11 +1579,10 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent out:spin_lock (&isec->lock);if (isec->initialized ==LABEL_PENDING ) { -if (!sid || rc) { +if (rc) { isec->initialized =LABEL_INVALID ; goto out_unlock; } - isec->initialized =LABEL_INITIALIZED ; isec->sid = sid; }
@@ -1604,6 +1590,15 @@ out: out_unlock:spin_unlock (&isec->lock);return rc; + +out_invalid: +spin_lock (&isec->lock); +if (isec->initialized ==LABEL_PENDING ) { + isec->initialized =LABEL_INVALID ; + isec->sid = sid; + } +spin_unlock (&isec->lock); +return 0 ; }/* Convert a Linux signal to an access vector. */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 130/453 staging: greybus: codecs: Fix reference counter leak in error handling
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit 3952659a6108f77a0d062d8e8487bdbdaf52a66c ]
gb_pm_runtime_get_sync has increased the usage counter of the device here. Forgetting to call gb_pm_runtime_put_noidle will result in usage counter leak in the error branch of (gbcodec_hw_params and gbcodec_prepare). We fixed it by adding it.
--- drivers/staging/greybus/audio_codec.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/greybus/audio_codec.c +2 -0
@@ -489,6 +489,7 @@ static int gbcodec_hw_params(struct snd_pcm_substream *substream,if (ret) {dev_err_ratelimited (dai->dev,"%d: Error during set_config\n" , ret); +gb_pm_runtime_put_noidle (bundle);mutex_unlock (&codec->lock);return ret; }
@@ -565,6 +566,7 @@ static int gbcodec_prepare(struct snd_pcm_substream *substream,break ; }if (ret) { +gb_pm_runtime_put_noidle (bundle);mutex_unlock (&codec->lock);dev_err_ratelimited (dai->dev,"set_data_size failed:%d\n" , ret);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 132/453 media: tm6000: Fix sizeof() mismatches
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit a08ad6339e0441ca12533969ed94a87e3655426e ]
The are two instances of sizeof() being used incorrectly. The sizeof(void *) is incorrect because urb_buffer is a char ** pointer, fix this by using sizeof(*dev->urb_buffer). The sizeof(dma_addr_t *) is incorrect, it should be sizeof(*dev->urb_dma), which is a dma_addr_t and not a dma_addr_t *. This errors did not cause any issues because it just so happens the sizes are the same.
Addresses-Coverity: ("Sizeof not portable (SIZEOF_MISMATCH)")
--- drivers/media/usb/tm6000/tm6000-video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/media/usb/tm6000/tm6000-video.c +3 -2
@@ -461,11 +461,12 @@ static int tm6000_alloc_urb_buffers(struct tm6000_core *dev)if (dev->urb_buffer)return 0 ; - dev->urb_buffer =kmalloc_array (num_bufs,sizeof (void *),GFP_KERNEL ); + dev->urb_buffer =kmalloc_array (num_bufs,sizeof (*dev->urb_buffer), +GFP_KERNEL );if (!dev->urb_buffer)return -ENOMEM ; - dev->urb_dma =kmalloc_array (num_bufs,sizeof (dma_addr_t *), + dev->urb_dma =kmalloc_array (num_bufs,sizeof (*dev->urb_dma),GFP_KERNEL );if (!dev->urb_dma)return -ENOMEM ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 133/453 media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_dec_pm()
In reply to Greg Kroah-HartmanFrom: Yu Kuai <[email protected]>
[ Upstream commit 5d4fa2c50125c9cda9e380d89268757cc5fa743d ]
if of_find_device_by_node() succeed, mtk_vcodec_init_dec_pm() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation.
--- .../platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c +12 -6
@@ -48,11 +48,14 @@ int mtk_vcodec_init_dec_pm(struct mtk_vcodec_dev *mtkdev) dec_clk->clk_info =devm_kcalloc (&pdev->dev, dec_clk->clk_num,sizeof (*clk_info),GFP_KERNEL ); -if (!dec_clk->clk_info) -return -ENOMEM ; +if (!dec_clk->clk_info) { + ret = -ENOMEM ; + goto put_device; + } }else {mtk_v4l2_err ("Failed to get vdec clock count" ); -return -EINVAL ; + ret = -EINVAL ; + goto put_device; }for (i =0 ; i < dec_clk->clk_num; i++) {
@@ -61,19 +64,22 @@ int mtk_vcodec_init_dec_pm(struct mtk_vcodec_dev *mtkdev) "clock-names", i, &clk_info->clk_name);if (ret) {mtk_v4l2_err ("Failed to get clock name id = %d" , i); -return ret; + goto put_device; } clk_info->vcodec_clk =devm_clk_get (&pdev->dev, clk_info->clk_name);if (IS_ERR (clk_info->vcodec_clk)) {mtk_v4l2_err ("devm_clk_get (%d)%s fail" , i, clk_info->clk_name); -return PTR_ERR (clk_info->vcodec_clk); + ret =PTR_ERR (clk_info->vcodec_clk); + goto put_device; } }pm_runtime_enable (&pdev->dev); - +return 0 ; +put_device: +put_device (pm->larbvdec);return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 109/453 brcmfmac: Fix memory leak for unpaired brcmf_{alloc/free}
In reply to Greg Kroah-HartmanFrom: Seung-Woo Kim <[email protected]>
[ Upstream commit 9db946284e07bb27309dd546b7fee528664ba82a ]
There are missig brcmf_free() for brcmf_alloc(). Fix memory leak by adding missed brcmf_free().
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 6 ++++-- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +4 -2
@@ -1936,16 +1936,18 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) fwreq =brcmf_pcie_prepare_fw_request (devinfo);if (!fwreq) { ret = -ENOMEM ; - goto fail_bus; + goto fail_brcmf; } ret =brcmf_fw_get_firmwares (bus->dev, fwreq, brcmf_pcie_setup);if (ret <0 ) {kfree (fwreq); - goto fail_bus; + goto fail_brcmf; }return 0 ; +fail_brcmf: +brcmf_free (&devinfo->pdev->dev); fail_bus:kfree (bus->msgbuf);kfree (bus);
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +1 -0
@@ -4433,6 +4433,7 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus)brcmf_sdiod_intr_unregister (bus->sdiodev);brcmf_detach (bus->sdiodev->dev); +brcmf_free (bus->sdiodev->dev);cancel_work_sync (&bus->datawork);if (bus->brcmf_wq)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 110/453 arm64: dts: exynos: Include common syscon restart/poweroff for Exynos7
In reply to Greg Kroah-HartmanFrom: Paweł Chmiel <[email protected]>
[ Upstream commit 73bc7510ea0dafb4ff1ae6808759627a8ec51f5a ]
Exynos7 uses the same syscon reboot and poweroff nodes as other Exynos SoCs, so instead of duplicating code we can just include common dtsi file, which already contains definitions of them. After this change, poweroff node will be also available, previously this dts file did contain only reboot node.
--- arch/arm64/boot/dts/exynos/exynos7.dtsi | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
arch/arm64/boot/dts/exynos/exynos7.dtsi +1 -7
@@ -494,13 +494,6 @@ pmu_system_controller: system-controller@105c0000 { compatible = "samsung,exynos7-pmu", "syscon"; reg = <0x105c0000 0x5000>; - - reboot: syscon-reboot { - compatible = "syscon-reboot"; - regmap = <&pmu_system_controller>; - offset = <0x0400>; - mask = <0x1>; - }; }; rtc: rtc@10590000 {
@@ -650,3 +643,4 @@ }; #include "exynos7-pinctrl.dtsi" +#include "arm/exynos-syscon-restart.dtsi"
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 123/453 spi: sprd: fix reference leak in sprd_spi_remove
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit e4062765bc2a41e025e29dd56bad798505036427 ]
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak in sprd_spi_remove, so we should fix it.
--- drivers/spi/spi-sprd.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/spi-sprd.c +1 -0
@@ -1008,6 +1008,7 @@ static int sprd_spi_remove(struct platform_device *pdev) ret =pm_runtime_get_sync (ss->dev);if (ret <0 ) { +pm_runtime_put_noidle (ss->dev);dev_err (ss->dev,"failed to resume SPI controller\n" );return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 136/453 media: v4l2-fwnode: Return -EINVAL for invalid bus-type
In reply to Greg Kroah-HartmanFrom: Lad Prabhakar <[email protected]>
[ Upstream commit 69baf338fc16a4d55c78da8874ce3f06feb38c78 ]
Return -EINVAL if invalid bus-type is detected while parsing endpoints.
--- drivers/media/v4l2-core/v4l2-fwnode.c | 6 +++++- include/media/v4l2-mediabus.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-)
drivers/media/v4l2-core/v4l2-fwnode.c +5 -1
@@ -93,7 +93,7 @@ v4l2_fwnode_bus_type_to_mbus(enum v4l2_fwnode_bus_type type)const struct v4l2_fwnode_bus_conv *conv =get_v4l2_fwnode_bus_conv_by_fwnode_bus (type); -return conv ? conv->mbus_type :V4L2_MBUS_UNKNOWN ; +return conv ? conv->mbus_type :V4L2_MBUS_INVALID ; } static const char *
@@ -436,6 +436,10 @@ static int __v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode,v4l2_fwnode_mbus_type_to_string (vep->bus_type), vep->bus_type); mbus_type =v4l2_fwnode_bus_type_to_mbus (bus_type); +if (mbus_type ==V4L2_MBUS_INVALID ) { +pr_debug ("unsupported bus type %u\n" , bus_type); +return -EINVAL ; + }if (vep->bus_type !=V4L2_MBUS_UNKNOWN ) { if (mbus_type != V4L2_MBUS_UNKNOWN &&
include/media/v4l2-mediabus.h +2 -0
@@ -78,6 +78,7 @@* @V4L2_MBUS_CCP2: CCP2 (Compact Camera Port 2) * @V4L2_MBUS_CSI2_DPHY: MIPI CSI-2 serial interface, with D-PHY * @V4L2_MBUS_CSI2_CPHY: MIPI CSI-2 serial interface, with C-PHY +* @V4L2_MBUS_INVALID: invalid bus type (keep as last) */ enum v4l2_mbus_type {V4L2_MBUS_UNKNOWN ,
@@ -87,6 +88,7 @@ enum v4l2_mbus_type {V4L2_MBUS_CCP2 ,V4L2_MBUS_CSI2_DPHY ,V4L2_MBUS_CSI2_CPHY , + V4L2_MBUS_INVALID, };/**
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 106/453 libbpf: Fix BTF data layout checks and allow empty BTF
In reply to Greg Kroah-HartmanFrom: Andrii Nakryiko <[email protected]>
[ Upstream commit d8123624506cd62730c9cd9c7672c698e462703d ]
Make data section layout checks stricter, disallowing overlap of types and strings data.
Additionally, allow BTFs with no type data. There is nothing inherently wrong with having BTF with no types (put potentially with some strings). This could be a situation with kernel module BTFs, if module doesn't introduce any new type information.
Also fix invalid offset alignment check for btf->hdr->type_off.
--- tools/lib/bpf/btf.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
tools/lib/bpf/btf.c +6 -10
@@ -100,22 +100,18 @@ static int btf_parse_hdr(struct btf *btf)return -EINVAL ; } -if (meta_left < hdr->type_off) { -pr_debug ("Invalid BTF type section offset:%u\n" , hdr->type_off); +if (meta_left < hdr->str_off + hdr->str_len) { +pr_debug ("Invalid BTF total size:%u\n" , btf->raw_size);return -EINVAL ; } -if (meta_left < hdr->str_off) { -pr_debug ("Invalid BTF string section offset:%u\n" , hdr->str_off); +if (hdr->type_off + hdr->type_len > hdr->str_off) { +pr_debug ("Invalid BTF data sections layout: type data at %u + %u, strings data at %u + %u\n" , + hdr->type_off, hdr->type_len, hdr->str_off, hdr->str_len);return -EINVAL ; } -if (hdr->type_off >= hdr->str_off) { -pr_debug ("BTF type section offset >= string section offset. No type?\n" ); -return -EINVAL ; - } - -if (hdr->type_off &0x02 ) { +if (hdr->type_off %4 ) {pr_debug ("BTF type section is not aligned to 4 bytes\n" );return -EINVAL ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 111/453 arm64: dts: exynos: Correct psci compatible used on Exynos7
In reply to Greg Kroah-HartmanFrom: Paweł Chmiel <[email protected]>
[ Upstream commit e1e47fbca668507a81bb388fcae044b89d112ecc ]
It's not possible to reboot or poweroff Exynos7420 using PSCI. Instead we need to use syscon reboot/poweroff drivers, like it's done for other Exynos SoCs. This was confirmed by checking vendor source and testing it on Samsung Galaxy S6 device based on this SoC.
To be able to use custom restart/poweroff handlers instead of PSCI functions, we need to correct psci compatible. This also requires us to provide function ids for CPU_ON and CPU_OFF.
--- arch/arm64/boot/dts/exynos/exynos7.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/exynos/exynos7.dtsi +3 -1
@@ -90,8 +90,10 @@ }; psci { - compatible = "arm,psci-0.2"; + compatible = "arm,psci"; method = "smc"; + cpu_off = <0x84000002>; + cpu_on = <0xC4000003>; }; soc: soc {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 147/453 selftests/bpf: Fix broken riscv build
In reply to Greg Kroah-HartmanFrom: Björn Töpel <[email protected]>
[ Upstream commit 6016df8fe874e1cf36f6357d71438b384198ce06 ]
The selftests/bpf Makefile includes system include directories from the host, when building BPF programs. On RISC-V glibc requires that __riscv_xlen is defined. This is not the case for "clang -target bpf", which messes up __WORDSIZE (errno.h -> ... -> wordsize.h) and breaks the build.
By explicitly defining __risc_xlen correctly for riscv, we can workaround this.
--- tools/testing/selftests/bpf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/bpf/Makefile +2 -1
@@ -144,7 +144,8 @@ endif # build would have failed anyways. define get_sys_includes $(shell $(1) -v -E - </dev/null 2>&1 \ - | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }') + | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }') \ +$(shell $(1) -dM -E - </dev/null | grep '#define __riscv_xlen ' | sed 's/#define /-D/' | sed 's/ /=/') endef CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG)) BPF_CFLAGS = -I. -I./include/uapi -I../../../include/uapi \
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 153/453 spi: fix resource leak for drivers without .remove callback
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
[ Upstream commit 440408dbadfe47a615afd0a0a4a402e629be658a ]
Consider an spi driver with a .probe but without a .remove callback (e.g. rtc-ds1347). The function spi_drv_probe() is called to bind a device and so dev_pm_domain_attach() is called. As there is no remove callback spi_drv_remove() isn't called at unbind time however and so calling dev_pm_domain_detach() is missed and the pm domain keeps active.
To fix this always use both spi_drv_probe() and spi_drv_remove() and make them handle the respective callback not being set. This has the side effect that for a (hypothetical) driver that has neither .probe nor remove the clk and pm domain setup is done.
--- drivers/spi/spi.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
drivers/spi/spi.c +10 -9
@@ -405,9 +405,11 @@ static int spi_drv_probe(struct device *dev)if (ret)return ret; - ret = sdrv->probe (spi); -if (ret) -dev_pm_domain_detach (dev, true); +if (sdrv->probe) { + ret = sdrv->probe (spi); +if (ret) +dev_pm_domain_detach (dev, true); + }return ret; }
@@ -415,9 +417,10 @@ static int spi_drv_probe(struct device *dev)static int spi_drv_remove (struct device *dev) {const struct spi_driver *sdrv =to_spi_driver (dev->driver); -int ret; +int ret =0 ; - ret = sdrv->remove (to_spi_device (dev)); +if (sdrv->remove) + ret = sdrv->remove (to_spi_device (dev));dev_pm_domain_detach (dev, true);return ret;
@@ -442,10 +445,8 @@ int __spi_register_driver(struct module *owner, struct spi_driver *sdrv) { sdrv->driver.owner = owner; sdrv->driver.bus = &spi_bus_type; -if (sdrv->probe) - sdrv->driver.probe = spi_drv_probe; -if (sdrv->remove) - sdrv->driver.remove = spi_drv_remove; + sdrv->driver.probe = spi_drv_probe; + sdrv->driver.remove = spi_drv_remove;if (sdrv->shutdown) sdrv->driver.shutdown = spi_drv_shutdown;return driver_register (&sdrv->driver);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 156/453 drivers: soc: ti: knav_qmss_queue: Fix error return code in knav_queue_probe
In reply to Greg Kroah-HartmanFrom: Zhihao Cheng <[email protected]>
[ Upstream commit 4cba398f37f868f515ff12868418dc28574853a1 ]
Fix to return the error code from of_get_child_by_name() instaed of 0 in knav_queue_probe().
--- drivers/soc/ti/knav_qmss_queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/ti/knav_qmss_queue.c +2 -1
@@ -1859,9 +1859,10 @@ static int knav_queue_probe(struct platform_device *pdev)if (ret) goto err; - regions =of_get_child_by_name (node,"descriptor-regions" ); + regions =of_get_child_by_name (node,"descriptor-regions" );if (!regions) {dev_err (dev,"descriptor-regions not specified\n" ); + ret = -ENODEV ; goto err; } ret =knav_queue_setup_regions (kdev, regions);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 164/453 orinoco: Move context allocation after processing the skb
In reply to Greg Kroah-HartmanFrom: Sebastian Andrzej Siewior <[email protected]>
[ Upstream commit a31eb615646a63370aa1da1053c45439c7653d83 ]
ezusb_xmit() allocates a context which is leaked if orinoco_process_xmit_skb() returns an error.
Move ezusb_alloc_ctx() after the invocation of orinoco_process_xmit_skb() because the context is not needed so early. ezusb_access_ltv() will cleanup the context in case of an error.
--- .../net/wireless/intersil/orinoco/orinoco_usb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/net/wireless/intersil/orinoco/orinoco_usb.c +7 -7
@@ -1234,13 +1234,6 @@ static netdev_tx_t ezusb_xmit(struct sk_buff *skb, struct net_device *dev)if (skb->len <ETH_HLEN ) goto drop; - ctx =ezusb_alloc_ctx (upriv,EZUSB_RID_TX ,0 ); -if (!ctx) - goto busy; - -memset (ctx->buf,0 ,BULK_BUF_SIZE ); - buf = ctx->buf->data; - tx_control =0 ; err = orinoco_process_xmit_skb(skb, dev, priv, &tx_control,
@@ -1248,6 +1241,13 @@ static netdev_tx_t ezusb_xmit(struct sk_buff *skb, struct net_device *dev)if (err) goto drop; + ctx =ezusb_alloc_ctx (upriv,EZUSB_RID_TX ,0 ); +if (!ctx) + goto drop; + +memset (ctx->buf,0 ,BULK_BUF_SIZE ); + buf = ctx->buf->data; + {__le16 *tx_cntl = (__le16 *)buf; *tx_cntl =cpu_to_le16 (tx_control);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 140/453 video: fbdev: atmel_lcdfb: fix return error code in atmel_lcdfb_of_init()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit ba236455ee750270f33998df57f982433cea4d8e ]
If devm_kzalloc() failed after the first time, atmel_lcdfb_of_init() can't return -ENOMEM, fix this by putting the error code in loop.
--- drivers/video/fbdev/atmel_lcdfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/atmel_lcdfb.c +1 -1
@@ -987,8 +987,8 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo) }INIT_LIST_HEAD (&pdata->pwr_gpios); - ret = -ENOMEM ;for (i =0 ; i <gpiod_count (dev,"atmel,power-control" ); i++) { + ret = -ENOMEM ; gpiod =devm_gpiod_get_index (dev,"atmel,power-control" , i,GPIOD_ASIS );if (IS_ERR (gpiod))
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 157/453 Input: omap4-keypad - fix runtime PM error handling
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit 59bbf83835f591b95c3bdd09d900f3584fa227af ]
In omap4_keypad_probe, the patch fix several bugs.
1) pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to pm_runtime_put_noidle will result in reference leak.
2) In err_unmap, forget to disable runtime of device, pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced.
3) In err_pm_disable, it will call pm_runtime_put_sync twice not one time.
To fix this we factor out code reading revision and disabling touchpad, and drop PM reference once we are done talking to the device.
--- drivers/input/keyboard/omap4-keypad.c | 89 ++++++++++++++++----------- 1 file changed, 53 insertions(+), 36 deletions(-)
drivers/input/keyboard/omap4-keypad.c +53 -36
@@ -186,12 +186,8 @@ static int omap4_keypad_open(struct input_dev *input)return 0 ; } -static void omap4_keypad_close (struct input_dev *input) +static void omap4_keypad_stop (struct omap4_keypad *keypad_data) { -struct omap4_keypad *keypad_data =input_get_drvdata (input); - -disable_irq (keypad_data->irq); -/* Disable interrupts and wake-up events */ kbd_write_irqreg (keypad_data,OMAP4_KBD_IRQENABLE ,OMAP4_VAL_IRQDISABLE );
@@ -200,7 +196,15 @@ static void omap4_keypad_close(struct input_dev *input)/* clear pending interrupts */ kbd_write_irqreg (keypad_data,OMAP4_KBD_IRQSTATUS ,kbd_read_irqreg (keypad_data,OMAP4_KBD_IRQSTATUS )); +} + +static void omap4_keypad_close (struct input_dev *input) +{ +struct omap4_keypad *keypad_data; + keypad_data =input_get_drvdata (input); +disable_irq (keypad_data->irq); +omap4_keypad_stop (keypad_data);enable_irq (keypad_data->irq);pm_runtime_put_sync (input->dev.parent);
@@ -223,13 +227,37 @@ static int omap4_keypad_parse_dt(struct device *dev,return 0 ; } +static int omap4_keypad_check_revision (struct device *dev, +struct omap4_keypad *keypad_data) +{ +unsigned int rev; + + rev =__raw_readl (keypad_data->base +OMAP4_KBD_REVISION ); + rev &=0x03 <<30 ; + rev >>=30 ; +switch (rev) { +case KBD_REVISION_OMAP4 : + keypad_data->reg_offset =0x00 ; + keypad_data->irqreg_offset =0x00 ; +break ; +case KBD_REVISION_OMAP5 : + keypad_data->reg_offset =0x10 ; + keypad_data->irqreg_offset =0x0c ; +break ; +default : +dev_err (dev,"Keypad reports unsupported revision %d" , rev); +return -EINVAL ; + } + +return 0 ; +} +static int omap4_keypad_probe (struct platform_device *pdev) {struct omap4_keypad *keypad_data;struct input_dev *input_dev;struct resource *res;unsigned int max_keys; -int rev;int irq;int error;
@@ -269,41 +297,33 @@ static int omap4_keypad_probe(struct platform_device *pdev) goto err_release_mem; } +pm_runtime_enable (&pdev->dev);/* * Enable clocks for the keypad module so that we can read * revision register. */ -pm_runtime_enable (&pdev->dev); error =pm_runtime_get_sync (&pdev->dev);if (error) {dev_err (&pdev->dev,"pm_runtime_get_sync() failed\n" ); - goto err_unmap; - } - rev =__raw_readl (keypad_data->base +OMAP4_KBD_REVISION ); - rev &=0x03 <<30 ; - rev >>=30 ; -switch (rev) { -case KBD_REVISION_OMAP4 : - keypad_data->reg_offset =0x00 ; - keypad_data->irqreg_offset =0x00 ; -break ; -case KBD_REVISION_OMAP5 : - keypad_data->reg_offset =0x10 ; - keypad_data->irqreg_offset =0x0c ; -break ; -default : -dev_err (&pdev->dev, -"Keypad reports unsupported revision %d" , rev); - error = -EINVAL ; - goto err_pm_put_sync; +pm_runtime_put_noidle (&pdev->dev); + }else { + error =omap4_keypad_check_revision (&pdev->dev, + keypad_data); +if (!error) { +/* Ensure device does not raise interrupts */ +omap4_keypad_stop (keypad_data); + } +pm_runtime_put_sync (&pdev->dev); } +if (error) + goto err_pm_disable;/* input device allocation */ keypad_data->input = input_dev =input_allocate_device ();if (!input_dev) { error = -ENOMEM ; - goto err_pm_put_sync; + goto err_pm_disable; } input_dev->name = pdev->name;
@@ -349,28 +369,25 @@ static int omap4_keypad_probe(struct platform_device *pdev) goto err_free_keymap; } -device_init_wakeup (&pdev->dev, true); -pm_runtime_put_sync (&pdev->dev); - error =input_register_device (keypad_data->input);if (error <0 ) {dev_err (&pdev->dev,"failed to register input device\n" ); - goto err_pm_disable; + goto err_free_irq; } +device_init_wakeup (&pdev->dev, true);platform_set_drvdata (pdev, keypad_data); +return 0 ; -err_pm_disable: -pm_runtime_disable (&pdev->dev); +err_free_irq:free_irq (keypad_data->irq, keypad_data); err_free_keymap:kfree (keypad_data->keymap); err_free_input:input_free_device (input_dev); -err_pm_put_sync: -pm_runtime_put_sync (&pdev->dev); -err_unmap: +err_pm_disable: +pm_runtime_disable (&pdev->dev);iounmap (keypad_data->base); err_release_mem:release_mem_region (res->start,resource_size (res));
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 159/453 RDMA/cxgb4: Validate the number of CQEs
In reply to Greg Kroah-HartmanFrom: Kamal Heib <[email protected]>
[ Upstream commit 6d8285e604e0221b67bd5db736921b7ddce37d00 ]
Before create CQ, make sure that the requested number of CQEs is in the supported range.
--- drivers/infiniband/hw/cxgb4/cq.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/infiniband/hw/cxgb4/cq.c +3 -0
@@ -1007,6 +1007,9 @@ int c4iw_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,if (attr->flags)return -EINVAL ; +if (entries <1 || entries > ibdev->attrs.max_cqe) +return -EINVAL ; +if (vector >= rhp->rdev.lldi.nciq)return -EINVAL ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 160/453 memstick: fix a double-free bug in memstick_check
In reply to Greg Kroah-HartmanFrom: Qinglang Miao <[email protected]>
[ Upstream commit e3e9ced5c93803d5b2ea1942c4bf0192622531d6 ]
kfree(host->card) has been called in put_device so that another kfree would raise cause a double-free bug.
--- drivers/memstick/core/memstick.c | 1 - 1 file changed, 1 deletion(-)
drivers/memstick/core/memstick.c +0 -1
@@ -468,7 +468,6 @@ static void memstick_check(struct work_struct *work) host->card = card;if (device_register (&card->dev)) {put_device (&card->dev); -kfree (host->card); host->card =NULL ; } }else
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 142/453 Input: ads7846 - fix race that causes missing releases
In reply to Greg Kroah-HartmanFrom: David Jander <[email protected]>
[ Upstream commit e52cd628a03f72a547dbf90ccb703ee64800504a ]
If touchscreen is released while busy reading HWMON device, the release can be missed. The IRQ thread is not started because no touch is active and BTN_TOUCH release event is never sent.
--- drivers/input/touchscreen/ads7846.c | 44 +++++++++++++++++------------ 1 file changed, 26 insertions(+), 18 deletions(-)
drivers/input/touchscreen/ads7846.c +26 -18
@@ -199,6 +199,26 @@ struct ads7846 {#define REF_ON (READ_12BIT_DFR(x, 1, 1))#define REF_OFF (READ_12BIT_DFR(y, 0, 0)) +static int get_pendown_state (struct ads7846 *ts) +{ +if (ts->get_pendown_state) +return ts->get_pendown_state (); + +return !gpio_get_value (ts->gpio_pendown); +} + +static void ads7846_report_pen_up (struct ads7846 *ts) +{ +struct input_dev *input = ts->input; + +input_report_key (input,BTN_TOUCH ,0 ); +input_report_abs (input,ABS_PRESSURE ,0 ); +input_sync (input); + + ts->pendown = false; +dev_vdbg (&ts->spi->dev,"UP\n" ); +} +/* Must be called with ts->lock held */ static void ads7846_stop (struct ads7846 *ts) {
@@ -215,6 +235,10 @@ static void ads7846_stop(struct ads7846 *ts)static void ads7846_restart (struct ads7846 *ts) {if (!ts->disabled && !ts->suspended) { +/* Check if pen was released since last stop */ +if (ts->pendown && !get_pendown_state (ts)) +ads7846_report_pen_up (ts); +/* Tell IRQ thread that it may poll the device. */ ts->stopped = false;mb ();
@@ -605,14 +629,6 @@ static const struct attribute_group ads784x_attr_group = {/*--------------------------------------------------------------------------*/ -static int get_pendown_state (struct ads7846 *ts) -{ -if (ts->get_pendown_state) -return ts->get_pendown_state (); - -return !gpio_get_value (ts->gpio_pendown); -} -static void null_wait_for_sync (void ) { }
@@ -867,16 +883,8 @@ static irqreturn_t ads7846_irq(int irq, void *handle) msecs_to_jiffies(TS_POLL_PERIOD)); } -if (ts->pendown && !ts->stopped) { -struct input_dev *input = ts->input; - -input_report_key (input,BTN_TOUCH ,0 ); -input_report_abs (input,ABS_PRESSURE ,0 ); -input_sync (input); - - ts->pendown = false; -dev_vdbg (&ts->spi->dev,"UP\n" ); - } +if (ts->pendown && !ts->stopped) +ads7846_report_pen_up (ts);return IRQ_HANDLED ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 163/453 mmc: pxamci: Fix error return code in pxamci_probe
In reply to Greg Kroah-HartmanFrom: Zhihao Cheng <[email protected]>
[ Upstream commit d7b819b5d33869d41bdaa427aeb98ae24c57a38b ]
Fix to return the error code from devm_gpiod_get_optional() instaed of 0 in pxamci_probe().
--- drivers/mmc/host/pxamci.c | 1 + 1 file changed, 1 insertion(+)
drivers/mmc/host/pxamci.c +1 -0
@@ -729,6 +729,7 @@ static int pxamci_probe(struct platform_device *pdev) host->power =devm_gpiod_get_optional (dev,"power" ,GPIOD_OUT_LOW );if (IS_ERR (host->power)) { + ret =PTR_ERR (host->power);dev_err (dev,"Failed requesting gpio_power\n" ); goto out; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 165/453 qtnfmac: fix error return code in qtnf_pcie_probe()
In reply to Greg Kroah-HartmanFrom: Wang Hai <[email protected]>
[ Upstream commit 31e07aa33fa7cdc93fa91c3f78f031e8d38862c2 ]
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
--- drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c +3 -3
@@ -299,19 +299,19 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) sysctl_bar =qtnf_map_bar (pdev,QTN_SYSCTL_BAR );if (IS_ERR (sysctl_bar)) {pr_err ("failed to map BAR%u\n" ,QTN_SYSCTL_BAR ); -return ret; +return PTR_ERR (sysctl_bar); } dmareg_bar =qtnf_map_bar (pdev,QTN_DMA_BAR );if (IS_ERR (dmareg_bar)) {pr_err ("failed to map BAR%u\n" ,QTN_DMA_BAR ); -return ret; +return PTR_ERR (dmareg_bar); } epmem_bar =qtnf_map_bar (pdev,QTN_SHMEM_BAR );if (IS_ERR (epmem_bar)) {pr_err ("failed to map BAR%u\n" ,QTN_SHMEM_BAR ); -return ret; +return PTR_ERR (epmem_bar); } chipid =qtnf_chip_id_get (sysctl_bar);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 170/453 arm64: tegra: Fix DT binding for IO High Voltage entry
In reply to Greg Kroah-HartmanFrom: Vidya Sagar <[email protected]>
[ Upstream commit 6b26c1a034885923822f6c4d94f8644d32bc2481 ]
Fix the device-tree entry that represents I/O High Voltage property by replacing 'nvidia,io-high-voltage' with 'nvidia,io-hv' as the former entry is deprecated.
--- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/nvidia/tegra194.dtsi +2 -2
@@ -144,7 +144,7 @@ nvidia,schmitt = <TEGRA_PIN_DISABLE>; nvidia,lpdr = <TEGRA_PIN_ENABLE>; nvidia,enable-input = <TEGRA_PIN_DISABLE>; - nvidia,io-high-voltage = <TEGRA_PIN_ENABLE>; + nvidia,io-hv = <TEGRA_PIN_ENABLE>; nvidia,tristate = <TEGRA_PIN_DISABLE>; nvidia,pull = <TEGRA_PIN_PULL_NONE>; };
@@ -156,7 +156,7 @@ nvidia,schmitt = <TEGRA_PIN_DISABLE>; nvidia,lpdr = <TEGRA_PIN_ENABLE>; nvidia,enable-input = <TEGRA_PIN_ENABLE>; - nvidia,io-high-voltage = <TEGRA_PIN_ENABLE>; + nvidia,io-hv = <TEGRA_PIN_ENABLE>; nvidia,tristate = <TEGRA_PIN_DISABLE>; nvidia,pull = <TEGRA_PIN_PULL_NONE>; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 179/453 HSI: omap_ssi: Dont jump to free ID in ssi_add_controller()
In reply to Greg Kroah-HartmanFrom: Jing Xiangfeng <[email protected]>
[ Upstream commit 41fff6e19bc8d6d8bca79ea388427c426e72e097 ]
In current code, it jumps to ida_simple_remove() when ida_simple_get() failes to allocate an ID. Just return to fix it.
--- drivers/hsi/controllers/omap_ssi_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hsi/controllers/omap_ssi_core.c +1 -1
@@ -355,7 +355,7 @@ static int ssi_add_controller(struct hsi_controller *ssi, err =ida_simple_get (&platform_omap_ssi_ida,0 ,0 ,GFP_KERNEL );if (err <0 ) - goto out_err; +return err; ssi->id = err; ssi->owner =THIS_MODULE ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 182/453 arm64: dts: rockchip: Set dr_mode to "host" for OTG on rk3328-roc-cc
In reply to Greg Kroah-HartmanFrom: Chen-Yu Tsai <[email protected]>
[ Upstream commit 4076a007bd0f6171434bdb119a0b8797749b0502 ]
The board has a standard USB A female port connected to the USB OTG controller's data pins. Set dr_mode in the OTG controller node to indicate this usage, instead of having the implementation guess.
--- arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts +1 -0
@@ -333,6 +333,7 @@ }; &usb20_otg { + dr_mode = "host"; status = "okay"; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 139/453 media: solo6x10: fix missing snd_card_free in error handling case
In reply to Greg Kroah-HartmanFrom: Qinglang Miao <[email protected]>
[ Upstream commit dcdff74fa6bc00c32079d0bebd620764c26f2d89 ]
Fix to goto snd_error in error handling case when fails to do snd_ctl_add, as done elsewhere in this function.
--- drivers/media/pci/solo6x10/solo6x10-g723.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/solo6x10/solo6x10-g723.c +1 -1
@@ -399,7 +399,7 @@ int solo_g723_init(struct solo_dev *solo_dev) ret =snd_ctl_add (card,snd_ctl_new1 (&kctl, solo_dev));if (ret <0 ) -return ret; + goto snd_error; ret =solo_snd_pcm_init (solo_dev);if (ret <0 )
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 183/453 power: supply: axp288_charger: Fix HP Pavilion x2 10 DMI matching
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit a0f1ccd96c7049377d892a4299b6d5e47ec9179d ]
Commit 9c80662a74cd ("power: supply: axp288_charger: Add special handling for HP Pavilion x2 10") added special handling for HP Pavilion x2 10 models which use the weird combination of a Type-C connector and the non Type-C aware AXP288 PMIC.
This special handling was activated by a DMI match a the product-name of "HP Pavilion x2 Detachable". Recently I've learned that there are also older "HP Pavilion x2 Detachable" models with an AXP288 PMIC + a micro-usb connector where we should not activate the special handling for the Type-C connectors.
Extend the matching to also match on the DMI board-name and match on the 2 boards (one Bay Trail based one Cherry Trail based) of which we are certain that they use the AXP288 + Type-C connector combination.
Note the DSDT code from these older (AXP288 + micro-USB) models contains some AML code (which never runs under Linux) which reads the micro-USB connector id-pin and if it is pulled to ground, which would normally mean the port is in host mode!, then it sets the input-current-limit to 3A, it seems HP is using the micro-USB port as a charging only connector and identifies their own 3A capable charger though this hack which is a major violation of the USB specs. Note HP also hardcodes a 2A limit when the id-pin is not pulled to ground, which is also in violation of the specs.
I've no intention to add support for HP's hack to support 3A charging on these older models. By making the DMI matches for the Type-C equipped models workaround more tighter, these older models will be treated just like any other AXP288 + micro-USB equipped device and the input-current limit will follow the BC 1.2 spec (using the defacto standard values there where the BC 1.2 spec defines a range).
--- drivers/power/supply/axp288_charger.c | 28 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-)
drivers/power/supply/axp288_charger.c +17 -11
@@ -548,14 +548,15 @@ out:/* * The HP Pavilion x2 10 series comes in a number of variants: -* Bay Trail SoC + AXP288 PMIC, DMI_BOARD_NAME: "815D" -* Cherry Trail SoC + AXP288 PMIC, DMI_BOARD_NAME: "813E" -* Cherry Trail SoC + TI PMIC, DMI_BOARD_NAME: "827C" or "82F4" +* Bay Trail SoC + AXP288 PMIC, Micro-USB, DMI_BOARD_NAME: "8021" +* Bay Trail SoC + AXP288 PMIC, Type-C, DMI_BOARD_NAME: "815D" +* Cherry Trail SoC + AXP288 PMIC, Type-C, DMI_BOARD_NAME: "813E" +* Cherry Trail SoC + TI PMIC, Type-C, DMI_BOARD_NAME: "827C" or "82F4" * -* The variants with the AXP288 PMIC are all kinds of special: +* The variants with the AXP288 + Type-C connector are all kinds of special: * -* 1. All variants use a Type-C connector which the AXP288 does not support, so -* when using a Type-C charger it is not recognized. Unlike most AXP288 devices, +* 1. They use a Type-C connector which the AXP288 does not support, so when +* using a Type-C charger it is not recognized. Unlike most AXP288 devices, * this model actually has mostly working ACPI AC / Battery code, the ACPI code * "solves" this by simply setting the input_current_limit to 3A. * There are still some issues with the ACPI code, so we use this native driver,
@@ -578,12 +579,17 @@ out:*/ static const struct dmi_system_id axp288_hp_x2_dmi_ids[] = { { -/* -* Bay Trail model has "Hewlett-Packard" as sys_vendor, Cherry -* Trail model has "HP", so we only match on product_name. -*/ .matches = { -DMI_MATCH (DMI_PRODUCT_NAME ,"HP Pavilion x2 Detachable" ), +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"Hewlett-Packard" ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"HP Pavilion x2 Detachable" ), +DMI_EXACT_MATCH (DMI_BOARD_NAME ,"815D" ), + }, + }, + { + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"HP" ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"HP Pavilion x2 Detachable" ), +DMI_EXACT_MATCH (DMI_BOARD_NAME ,"813E" ), }, }, {}/* Terminating entry */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 135/453 media: mtk-vcodec: add missing put_device() call in mtk_vcodec_init_enc_pm()
In reply to Greg Kroah-HartmanFrom: Yu Kuai <[email protected]>
[ Upstream commit 4affafd7bec7c65da31777f18bd20420f1aeb5f8 ]
if of_find_device_by_node() succeed, mtk_vcodec_init_enc_pm() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation.
--- .../platform/mtk-vcodec/mtk_vcodec_enc_pm.c | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-)
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_pm.c +19 -7
@@ -49,14 +49,16 @@ int mtk_vcodec_init_enc_pm(struct mtk_vcodec_dev *mtkdev) node =of_parse_phandle (dev->of_node,"mediatek,larb" ,1 );if (!node) {mtk_v4l2_err ("no mediatek,larb found" ); -return -ENODEV ; + ret = -ENODEV ; + goto put_larbvenc; } pdev =of_find_device_by_node (node);of_node_put (node);if (!pdev) {mtk_v4l2_err ("no mediatek,larb device found" ); -return -ENODEV ; + ret = -ENODEV ; + goto put_larbvenc; } pm->larbvenclt = &pdev->dev;
@@ -69,11 +71,14 @@ int mtk_vcodec_init_enc_pm(struct mtk_vcodec_dev *mtkdev) enc_clk->clk_info =devm_kcalloc (&pdev->dev, enc_clk->clk_num,sizeof (*clk_info),GFP_KERNEL ); -if (!enc_clk->clk_info) -return -ENOMEM ; +if (!enc_clk->clk_info) { + ret = -ENOMEM ; + goto put_larbvenclt; + } }else {mtk_v4l2_err ("Failed to get venc clock count" ); -return -EINVAL ; + ret = -EINVAL ; + goto put_larbvenclt; }for (i =0 ; i < enc_clk->clk_num; i++) {
@@ -82,17 +87,24 @@ int mtk_vcodec_init_enc_pm(struct mtk_vcodec_dev *mtkdev) "clock-names", i, &clk_info->clk_name);if (ret) {mtk_v4l2_err ("venc failed to get clk name %d" , i); -return ret; + goto put_larbvenclt; } clk_info->vcodec_clk =devm_clk_get (&pdev->dev, clk_info->clk_name);if (IS_ERR (clk_info->vcodec_clk)) {mtk_v4l2_err ("venc devm_clk_get (%d)%s fail" , i, clk_info->clk_name); -return PTR_ERR (clk_info->vcodec_clk); + ret =PTR_ERR (clk_info->vcodec_clk); + goto put_larbvenclt; } } +return 0 ; + +put_larbvenclt: +put_device (pm->larbvenclt); +put_larbvenc: +put_device (pm->larbvenc);return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 144/453 Input: ads7846 - fix unaligned access on 7845
In reply to Greg Kroah-HartmanFrom: Dmitry Torokhov <[email protected]>
[ Upstream commit 03e2c9c782f721b661a0e42b1b58f394b5298544 ]
req->sample[1] is not naturally aligned at word boundary, and therefore we should use get_unaligned_be16() when accessing it.
--- drivers/input/touchscreen/ads7846.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/touchscreen/ads7846.c +2 -1
@@ -33,6 +33,7 @@#include <linux/regulator/consumer.h> #include <linux/module.h> #include <asm/irq.h> +#include <asm/unaligned.h> /* * This code has been heavily tested on a Nokia 770, and lightly
@@ -434,7 +435,7 @@ static int ads7845_read12_ser(struct device *dev, unsigned command)if (status ==0 ) {/* BE12 value, then padding */ - status =be16_to_cpu (*((u16 *)&req->sample[1 ])); + status =get_unaligned_be16 (&req->sample[1 ]); status = status >>3 ; status &=0x0fff ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 168/453 dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe()
In reply to Greg Kroah-HartmanFrom: Zhihao Cheng <[email protected]>
[ Upstream commit c95e6515a8c065862361f7e0e452978ade7f94ec ]
Return the corresponding error code when first_msi_entry() returns NULL in mv_xor_v2_probe().
--- drivers/dma/mv_xor_v2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/dma/mv_xor_v2.c +3 -1
@@ -766,8 +766,10 @@ static int mv_xor_v2_probe(struct platform_device *pdev) goto disable_clk; msi_desc =first_msi_entry (&pdev->dev); -if (!msi_desc) +if (!msi_desc) { + ret = -ENODEV ; goto free_msi_irqs; + } xor_dev->msi_desc = msi_desc; ret = devm_request_irq(&pdev->dev, msi_desc->irq,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 184/453 power: supply: bq24190_charger: fix reference leak
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit b2f6cb78eaa1cad57dd3fe11d0458cd4fae9a584 ]
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to call pm_runtime_put_noidle will result in reference leak in callers(bq24190_sysfs_show, bq24190_charger_get_property, bq24190_charger_set_property, bq24190_battery_get_property, bq24190_battery_set_property), so we should fix it.
--- drivers/power/supply/bq24190_charger.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-)
drivers/power/supply/bq24190_charger.c +15 -5
@@ -448,8 +448,10 @@ static ssize_t bq24190_sysfs_show(struct device *dev,return -EINVAL ; ret =pm_runtime_get_sync (bdi->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (bdi->dev);return ret; + } ret =bq24190_read_mask (bdi, info->reg, info->mask, info->shift, &v);if (ret)
@@ -1075,8 +1077,10 @@ static int bq24190_charger_get_property(struct power_supply *psy,dev_dbg (bdi->dev,"prop: %d\n" , psp); ret =pm_runtime_get_sync (bdi->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (bdi->dev);return ret; + }switch (psp) {case POWER_SUPPLY_PROP_CHARGE_TYPE :
@@ -1147,8 +1151,10 @@ static int bq24190_charger_set_property(struct power_supply *psy,dev_dbg (bdi->dev,"prop: %d\n" , psp); ret =pm_runtime_get_sync (bdi->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (bdi->dev);return ret; + }switch (psp) {case POWER_SUPPLY_PROP_ONLINE :
@@ -1408,8 +1414,10 @@ static int bq24190_battery_get_property(struct power_supply *psy,dev_dbg (bdi->dev,"prop: %d\n" , psp); ret =pm_runtime_get_sync (bdi->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (bdi->dev);return ret; + }switch (psp) {case POWER_SUPPLY_PROP_STATUS :
@@ -1454,8 +1462,10 @@ static int bq24190_battery_set_property(struct power_supply *psy,dev_dbg (bdi->dev,"prop: %d\n" , psp); ret =pm_runtime_get_sync (bdi->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (bdi->dev);return ret; + }switch (psp) {case POWER_SUPPLY_PROP_ONLINE :
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 187/453 arm64: dts: qcom: c630: Polish i2c-hid devices
In reply to Greg Kroah-HartmanFrom: Bjorn Andersson <[email protected]>
[ Upstream commit 11d0e4f281565ef757479764ce7fd8d35eeb01b0 ]
The numbering of the i2c busses differs from ACPI and a number of typos was made in the original patch. Further more the irq flags for the various resources was not correct and i2c3 only has one of the two client devices active in any one device.
Also label the various devices, for easier comparison with the ACPI tables.
--- .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-)
arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +18 -13
@@ -244,23 +244,28 @@ status = "okay"; clock-frequency = <400000>; - hid@15 { + tsel: hid@15 { compatible = "hid-over-i2c"; reg = <0x15>; hid-descr-addr = <0x1>; - interrupts-extended = <&tlmm 37 IRQ_TYPE_EDGE_RISING>; + interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_hid_active>; }; - hid@2c { + tsc2: hid@2c { compatible = "hid-over-i2c"; reg = <0x2c>; hid-descr-addr = <0x20>; - interrupts-extended = <&tlmm 37 IRQ_TYPE_EDGE_RISING>; + interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>; pinctrl-names = "default"; - pinctrl-0 = <&i2c2_hid_active>; + pinctrl-0 = <&i2c3_hid_active>; + + status = "disabled"; }; };
@@ -268,15 +273,15 @@ status = "okay"; clock-frequency = <400000>; - hid@10 { + tsc1: hid@10 { compatible = "hid-over-i2c"; reg = <0x10>; hid-descr-addr = <0x1>; - interrupts-extended = <&tlmm 125 IRQ_TYPE_EDGE_FALLING>; + interrupts-extended = <&tlmm 125 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; - pinctrl-0 = <&i2c6_hid_active>; + pinctrl-0 = <&i2c5_hid_active>; }; };
@@ -284,7 +289,7 @@ status = "okay"; clock-frequency = <400000>; - hid@5c { + ecsh: hid@5c { compatible = "hid-over-i2c"; reg = <0x5c>; hid-descr-addr = <0x1>;
@@ -292,7 +297,7 @@ interrupts-extended = <&tlmm 92 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; - pinctrl-0 = <&i2c12_hid_active>; + pinctrl-0 = <&i2c11_hid_active>; }; };
@@ -335,7 +340,7 @@ &tlmm { gpio-reserved-ranges = <0 4>, <81 4>; - i2c2_hid_active: i2c2-hid-active { + i2c3_hid_active: i2c2-hid-active { pins = <37>; function = "gpio";
@@ -344,7 +349,7 @@ drive-strength = <2>; }; - i2c6_hid_active: i2c6-hid-active { + i2c5_hid_active: i2c5-hid-active { pins = <125>; function = "gpio";
@@ -353,7 +358,7 @@ drive-strength = <2>; }; - i2c12_hid_active: i2c12-hid-active { + i2c11_hid_active: i2c11-hid-active { pins = <92>; function = "gpio";
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 188/453 PCI: Bounds-check command-line resource alignment requests
In reply to Greg Kroah-HartmanFrom: Bjorn Helgaas <[email protected]>
[ Upstream commit 6534aac198b58309ff2337981d3f893e0be1d19d ]
32-bit BARs are limited to 2GB size (2^31). By extension, I assume 64-bit BARs are limited to 2^63 bytes. Limit the alignment requested by the "pci=resource_alignment=" command-line parameter to 2^63.
--- drivers/pci/pci.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/pci/pci.c +8 -6
@@ -6129,19 +6129,21 @@ static resource_size_t pci_specified_resource_alignment(struct pci_dev *dev,while (*p) { count =0 ;if (sscanf (p,"%d%n" , &align_order, &count) ==1 && - p[count] =='@' ) { + p[count] =='@' ) { p += count +1 ; +if (align_order >63 ) { +pr_err ("PCI: Invalid requested alignment (order %d)\n" , + align_order); + align_order =PAGE_SHIFT ; + } }else { - align_order =-1 ; + align_order =PAGE_SHIFT ; } ret =pci_dev_str_match (dev, p, &p);if (ret ==1 ) { *resize = true; -if (align_order ==-1 ) - align =PAGE_SIZE ; -else - align =1 << align_order; + align =1 << align_order;break ; }else if (ret <0 ) { pr_err("PCI: Can't parse resource_alignment parameter: %s\n",
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 186/453 arm64: dts: ls1028a: fix ENETC PTP clock input
In reply to Greg Kroah-HartmanFrom: Michael Walle <[email protected]>
[ Upstream commit d0570a575aa83116bd0f6a99c4de548af773d950 ]
On the LS1028A the ENETC reference clock is connected to 4th HWA output, see Figure 7 "Clock subsystem block diagram".
The PHC may run with a wrong frequency. ptp_qoriq_auto_config() will read the clock speed of the clock given in the device tree. It is likely that, on the reference board this wasn't noticed because both clocks have the same frequency. But this must not be always the case. Fix it.
--- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +1 -1
@@ -673,7 +673,7 @@ ethernet@0,4 { compatible = "fsl,enetc-ptp"; reg = <0x000400 0 0 0 0>; - clocks = <&clockgen 4 0>; + clocks = <&clockgen 2 3>; little-endian; }; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 195/453 platform/x86: dell-smbios-base: Fix error return code in dell_smbios_init
In reply to Greg Kroah-HartmanFrom: Qinglang Miao <[email protected]>
[ Upstream commit 2425ccd30fd78ce35237350fe8baac31dc18bd45 ]
Fix to return the error code -ENODEV when fails to init wmi and smm.
--- drivers/platform/x86/dell-smbios-base.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/dell-smbios-base.c +1 -0
@@ -594,6 +594,7 @@ static int __init dell_smbios_init(void)if (wmi && smm) {pr_err ("No SMBIOS backends available (wmi: %d, smm: %d)\n" , wmi, smm); + ret = -ENODEV ; goto fail_create_group; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 171/453 media: siano: fix memory leak of debugfs members in smsdvb_hotplug
In reply to Greg Kroah-HartmanFrom: Keita Suzuki <[email protected]>
[ Upstream commit abf287eeff4c6da6aa804bbd429dfd9d0dfb6ea7 ]
When dvb_create_media_graph fails, the debugfs kept inside client should be released. However, the current implementation does not release them.
Fix this by adding a new goto label to call smsdvb_debugfs_release.
--- drivers/media/common/siano/smsdvb-main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/media/common/siano/smsdvb-main.c +4 -1
@@ -1169,12 +1169,15 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev, rc =dvb_create_media_graph (&client->adapter, true);if (rc <0 ) {pr_err ("dvb_create_media_graph failed %d\n" , rc); - goto client_error; + goto media_graph_error; }pr_info ("DVB interface registered.\n" );return 0 ; +media_graph_error: +smsdvb_debugfs_release (client); + client_error:dvb_unregister_frontend (&client->frontend);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 180/453 ARM: dts: Remove non-existent i2c1 from 98dx3236
In reply to Greg Kroah-HartmanFrom: Chris Packham <[email protected]>
[ Upstream commit 7f24479ead579459106bb55c2320a000135731f9 ]
The switches with integrated CPUs have only got a single i2c controller. They incorrectly gained one when they were split from the Armada-XP.
--- arch/arm/boot/dts/armada-xp-98dx3236.dtsi | 5 ----- 1 file changed, 5 deletions(-)
arch/arm/boot/dts/armada-xp-98dx3236.dtsi +0 -5
@@ -266,11 +266,6 @@ reg = <0x11000 0x100>; }; -&i2c1 { - compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c"; - reg = <0x11100 0x100>; -}; - &mpic { reg = <0x20a00 0x2d0>, <0x21070 0x58>; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 192/453 arm64: dts: meson-sm1: fix typo in opp table
In reply to Greg Kroah-HartmanFrom: Dongjin Kim <[email protected]>
[ Upstream commit b6a1c8a1eaa73b1e2ae251399308e9445d74cef7 ]
The freqency 1512000000 should be 1500000000.
--- arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi +1 -1
@@ -90,7 +90,7 @@ opp-microvolt = <790000>; }; - opp-1512000000 { + opp-1500000000 { opp-hz = /bits/ 64 <1500000000>; opp-microvolt = <800000>; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 194/453 ARM: dts: at91: at91sam9rl: fix ADC triggers
In reply to Greg Kroah-HartmanFrom: Alexandre Belloni <[email protected]>
[ Upstream commit 851a95da583c26e2ddeb7281e9b61f0d76ea5aba ]
The triggers for the ADC were taken from at91sam9260 dtsi but are not correct.
--- arch/arm/boot/dts/at91sam9rl.dtsi | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
arch/arm/boot/dts/at91sam9rl.dtsi +11 -8
@@ -278,23 +278,26 @@ atmel,adc-use-res = "highres"; trigger0 { - trigger-name = "timer-counter-0"; + trigger-name = "external-rising"; trigger-value = <0x1>; + trigger-external; }; + trigger1 { - trigger-name = "timer-counter-1"; - trigger-value = <0x3>; + trigger-name = "external-falling"; + trigger-value = <0x2>; + trigger-external; }; trigger2 { - trigger-name = "timer-counter-2"; - trigger-value = <0x5>; + trigger-name = "external-any"; + trigger-value = <0x3>; + trigger-external; }; trigger3 { - trigger-name = "external"; - trigger-value = <0x13>; - trigger-external; + trigger-name = "continuous"; + trigger-value = <0x6>; }; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 141/453 drm/omap: dmm_tiler: fix return error code in omap_dmm_probe()
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit 723ae803218da993143387bf966042eccefac077 ]
Return -ENOMEM when allocating refill memory failed.
--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +1 -0
@@ -891,6 +891,7 @@ static int omap_dmm_probe(struct platform_device *dev) &omap_dmm->refill_pa, GFP_KERNEL);if (!omap_dmm->refill_va) {dev_err (&dev->dev,"could not allocate refill memory\n" ); + ret = -ENOMEM ; goto fail; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 167/453 cw1200: fix missing destroy_workqueue() on error in cw1200_init_common
In reply to Greg Kroah-HartmanFrom: Qinglang Miao <[email protected]>
[ Upstream commit 7ec8a926188eb8e7a3cbaca43ec44f2d7146d71b ]
Add the missing destroy_workqueue() before return from cw1200_init_common in the error handling case.
--- drivers/net/wireless/st/cw1200/main.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/st/cw1200/main.c +2 -0
@@ -381,6 +381,7 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, CW1200_LINK_ID_MAX, cw1200_skb_dtor, priv)) { +destroy_workqueue (priv->workqueue);ieee80211_free_hw (hw);return NULL ; }
@@ -392,6 +393,7 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr,for (; i >0 ; i--)cw1200_queue_deinit (&priv->tx_queue[i -1 ]);cw1200_queue_stats_deinit (&priv->tx_queue_stats); +destroy_workqueue (priv->workqueue);ieee80211_free_hw (hw);return NULL ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 199/453 SUNRPC: rpc_wake_up() should wake up tasks in the correct order
In reply to Greg Kroah-HartmanFrom: Trond Myklebust <[email protected]>
[ Upstream commit e4c72201b6ec3173dfe13fa2e2335a3ad78d4921 ]
Currently, we wake up the tasks by priority queue ordering, which means that we ignore the batching that is supposed to help with QoS issues.
--- net/sunrpc/sched.c | 65 +++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 30 deletions(-)
net/sunrpc/sched.c +35 -30
@@ -699,6 +699,23 @@ struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *queue) }EXPORT_SYMBOL_GPL (rpc_wake_up_next); +/** +* rpc_wake_up_locked - wake up all rpc_tasks +* @queue: rpc_wait_queue on which the tasks are sleeping +* +*/ +static void rpc_wake_up_locked (struct rpc_wait_queue *queue) +{ +struct rpc_task *task; + +for (;;) { + task =__rpc_find_next_queued (queue); +if (task ==NULL ) +break ; +rpc_wake_up_task_queue_locked (queue, task); + } +} +/** * rpc_wake_up - wake up all rpc_tasks * @queue: rpc_wait_queue on which the tasks are sleeping
@@ -707,25 +724,28 @@ EXPORT_SYMBOL_GPL(rpc_wake_up_next);*/ void rpc_wake_up (struct rpc_wait_queue *queue) { -struct list_head *head; -spin_lock (&queue->lock); - head = &queue->tasks[queue->maxpriority]; +rpc_wake_up_locked (queue); +spin_unlock (&queue->lock); +} +EXPORT_SYMBOL_GPL (rpc_wake_up); + +/** +* rpc_wake_up_status_locked - wake up all rpc_tasks and set their status value. +* @queue: rpc_wait_queue on which the tasks are sleeping +* @status: status value to set +*/ +static void rpc_wake_up_status_locked (struct rpc_wait_queue *queue,int status) +{ +struct rpc_task *task; +for (;;) { -while (!list_empty (head)) { -struct rpc_task *task; - task =list_first_entry (head, - struct rpc_task, - u.tk_wait.list); -rpc_wake_up_task_queue_locked (queue, task); - } -if (head == &queue->tasks[0 ]) + task =__rpc_find_next_queued (queue); +if (task ==NULL )break ; - head--; +rpc_wake_up_task_queue_set_status_locked (queue, task, status); } -spin_unlock (&queue->lock); } -EXPORT_SYMBOL_GPL (rpc_wake_up);/** * rpc_wake_up_status - wake up all rpc_tasks and set their status value.
@@ -736,23 +756,8 @@ EXPORT_SYMBOL_GPL(rpc_wake_up);*/ void rpc_wake_up_status (struct rpc_wait_queue *queue,int status) { -struct list_head *head; -spin_lock (&queue->lock); - head = &queue->tasks[queue->maxpriority]; -for (;;) { -while (!list_empty (head)) { -struct rpc_task *task; - task =list_first_entry (head, - struct rpc_task, - u.tk_wait.list); - task->tk_status = status; -rpc_wake_up_task_queue_locked (queue, task); - } -if (head == &queue->tasks[0 ]) -break ; - head--; - } +rpc_wake_up_status_locked (queue, status);spin_unlock (&queue->lock); }EXPORT_SYMBOL_GPL (rpc_wake_up_status);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 201/453 SUNRPC: xprt_load_transport() needs to support the netid "rdma6"
In reply to Greg Kroah-HartmanFrom: Trond Myklebust <[email protected]>
[ Upstream commit d5aa6b22e2258f05317313ecc02efbb988ed6d38 ]
According to RFC5666, the correct netid for an IPv6 addressed RDMA transport is "rdma6", which we've supported as a mount option since Linux-4.7. The problem is when we try to load the module "xprtrdma6", that will fail, since there is no modulealias of that name.
--- include/linux/sunrpc/xprt.h | 1 + net/sunrpc/xprt.c | 65 +++++++++++++++++++++++++-------- net/sunrpc/xprtrdma/module.c | 1 + net/sunrpc/xprtrdma/transport.c | 1 + net/sunrpc/xprtsock.c | 4 ++ 5 files changed, 56 insertions(+), 16 deletions(-)
include/linux/sunrpc/xprt.h +1 -0
@@ -330,6 +330,7 @@ struct xprt_class {struct rpc_xprt * (*setup)(struct xprt_create *);struct module *owner;char name[32 ]; +const char * netid[]; };/*
net/sunrpc/xprt.c +49 -16
80 lines not on this page · raw message
net/sunrpc/xprtrdma/module.c +1 -0
@@ -24,6 +24,7 @@ MODULE_DESCRIPTION("RPC/RDMA Transport");MODULE_LICENSE ("Dual BSD/GPL" );MODULE_ALIAS ("svcrdma" );MODULE_ALIAS ("xprtrdma" ); +MODULE_ALIAS ("rpcrdma6" ); static void __exit rpc_rdma_cleanup(void) {
net/sunrpc/xprtrdma/transport.c +1 -0
@@ -827,6 +827,7 @@ static struct xprt_class xprt_rdma = { .owner = THIS_MODULE, .ident = XPRT_TRANSPORT_RDMA, .setup = xprt_setup_rdma, + .netid = { "rdma", "rdma6", "" }, }; void xprt_rdma_cleanup(void)
net/sunrpc/xprtsock.c +4 -0
@@ -3204,6 +3204,7 @@ static struct xprt_class xs_local_transport = { .owner = THIS_MODULE, .ident = XPRT_TRANSPORT_LOCAL, .setup = xs_setup_local, + .netid = { "" }, }; static struct xprt_class xs_udp_transport = {
@@ -3212,6 +3213,7 @@ static struct xprt_class xs_udp_transport = { .owner = THIS_MODULE, .ident = XPRT_TRANSPORT_UDP, .setup = xs_setup_udp, + .netid = { "udp", "udp6", "" }, }; static struct xprt_class xs_tcp_transport = {
@@ -3220,6 +3222,7 @@ static struct xprt_class xs_tcp_transport = { .owner = THIS_MODULE, .ident = XPRT_TRANSPORT_TCP, .setup = xs_setup_tcp, + .netid = { "tcp", "tcp6", "" }, }; static struct xprt_class xs_bc_tcp_transport = {
@@ -3228,6 +3231,7 @@ static struct xprt_class xs_bc_tcp_transport = { .owner = THIS_MODULE, .ident = XPRT_TRANSPORT_BC_TCP, .setup = xs_setup_bc_tcp, + .netid = { "" }, }; /**
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 212/453 clocksource/drivers/orion: Add missing clk_disable_unprepare() on error path
In reply to Greg Kroah-HartmanFrom: Yang Yingliang <[email protected]>
[ Upstream commit c1e6cad00aa2f17845e7270e38ff3cc82c7b022a ]
After calling clk_prepare_enable(), clk_disable_unprepare() need be called on error path.
--- drivers/clocksource/timer-orion.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
drivers/clocksource/timer-orion.c +8 -3
@@ -149,7 +149,8 @@ static int __init orion_timer_init(struct device_node *np) irq =irq_of_parse_and_map (np,1 );if (irq <=0 ) {pr_err ("%pOFn: unable to parse timer1 irq\n" , np); -return -EINVAL ; + ret = -EINVAL ; + goto out_unprep_clk; } rate =clk_get_rate (clk);
@@ -166,7 +167,7 @@ static int __init orion_timer_init(struct device_node *np) clocksource_mmio_readl_down);if (ret) {pr_err ("Failed to initialize mmio timer\n" ); -return ret; + goto out_unprep_clk; }sched_clock_register (orion_read_sched_clock,32 , rate);
@@ -175,7 +176,7 @@ static int __init orion_timer_init(struct device_node *np) ret =setup_irq (irq, &orion_clkevt_irq);if (ret) {pr_err ("%pOFn: unable to setup irq\n" , np); -return ret; + goto out_unprep_clk; } ticks_per_jiffy = (clk_get_rate (clk) +HZ /2 ) /HZ ;
@@ -188,5 +189,9 @@ static int __init orion_timer_init(struct device_node *np)orion_delay_timer_init (rate);return 0 ; + +out_unprep_clk: +clk_disable_unprepare (clk); +return ret; }TIMER_OF_DECLARE (orion_timer,"marvell,orion-timer" , orion_timer_init);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 200/453 NFSv4.2: condition READDIRs mask for security label based on LSM state
In reply to Greg Kroah-HartmanFrom: Olga Kornievskaia <[email protected]>
[ Upstream commit 05ad917561fca39a03338cb21fe9622f998b0f9c ]
Currently, the client will always ask for security_labels if the server returns that it supports that feature regardless of any LSM modules (such as Selinux) enforcing security policy. This adds performance penalty to the READDIR operation.
Client adjusts superblock's support of the security_label based on the server's support but also current client's configuration of the LSM modules. Thus, prior to using the default bitmask in READDIR, this patch checks the server's capabilities and then instructs READDIR to remove FATTR4_WORD2_SECURITY_LABEL from the bitmask.
v5: fixing silly mistakes of the rushed v4
v4: simplifying logic
v3: changing label's initialization per Ondrej's comment
v2: dropping selinux hook and using the sb cap.
--- fs/nfs/nfs4proc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
fs/nfs/nfs4proc.c +8 -2
@@ -4899,12 +4899,12 @@ static int _nfs4_proc_readdir(struct dentry *dentry, const struct cred *cred, u64 cookie, struct page **pages, unsigned int count, bool plus) { struct inode *dir = d_inode(dentry); +struct nfs_server *server =NFS_SERVER (dir);struct nfs4_readdir_arg args = { .fh =NFS_FH (dir), .pages = pages, .pgbase =0 , .count = count, - .bitmask =NFS_SERVER (d_inode (dentry))->attr_bitmask, .plus = plus, };struct nfs4_readdir_res res;
@@ -4919,9 +4919,15 @@ static int _nfs4_proc_readdir(struct dentry *dentry, const struct cred *cred,dprintk ("%s: dentry = %pd2, cookie = %Lu\n" , __func__, dentry, (unsigned long long )cookie); +if (!(server->caps &NFS_CAP_SECURITY_LABEL )) + args.bitmask = server->attr_bitmask_nl; +else + args.bitmask = server->attr_bitmask; +nfs4_setup_readdir (cookie,NFS_I (dir)->cookieverf, dentry, &args); res.pgbase = args.pgbase; - status =nfs4_call_sync (NFS_SERVER (dir)->client,NFS_SERVER (dir), &msg, &args.seq_args, &res.seq_res,0 ); + status =nfs4_call_sync (server->client, server, &msg, &args.seq_args, + &res.seq_res,0 );if (status >=0 ) {memcpy (NFS_I (dir)->cookieverf, res.verifier.data,NFS4_VERIFIER_SIZE ); status += args.pgbase;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 177/453 media: max2175: fix max2175_set_csm_mode() error code
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 9b1b0cb0636166187478ef68d5b95f5caea062ec ]
This is supposed to return negative error codes but the type is bool so it returns true instead.
--- drivers/media/i2c/max2175.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/max2175.c +1 -1
@@ -503,7 +503,7 @@ static void max2175_set_bbfilter(struct max2175 *ctx) } } -static bool max2175_set_csm_mode (struct max2175 *ctx, +static int max2175_set_csm_mode (struct max2175 *ctx,enum max2175_csm_mode new_mode) {int ret =max2175_poll_csm_ready (ctx);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 213/453 clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent()
In reply to Greg Kroah-HartmanFrom: Yu Kuai <[email protected]>
[ Upstream commit eee422c46e6840a81c9db18a497b74387a557b29 ]
If clk_notifier_register() failed, ttc_setup_clockevent() will return without freeing 'ttcce', which will leak memory.
--- drivers/clocksource/timer-cadence-ttc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/clocksource/timer-cadence-ttc.c +9 -9
@@ -411,10 +411,8 @@ static int __init ttc_setup_clockevent(struct clk *clk, ttcce->ttc.clk = clk; err =clk_prepare_enable (ttcce->ttc.clk); -if (err) { -kfree (ttcce); -return err; - } +if (err) + goto out_kfree; ttcce->ttc.clk_rate_change_nb.notifier_call = ttc_rate_change_clockevent_cb;
@@ -424,7 +422,7 @@ static int __init ttc_setup_clockevent(struct clk *clk, &ttcce->ttc.clk_rate_change_nb);if (err) {pr_warn ("Unable to register clock notifier.\n" ); -return err; + goto out_kfree; } ttcce->ttc.freq =clk_get_rate (ttcce->ttc.clk);
@@ -453,15 +451,17 @@ static int __init ttc_setup_clockevent(struct clk *clk, err =request_irq (irq, ttc_clock_event_interrupt,IRQF_TIMER , ttcce->ce.name, ttcce); -if (err) { -kfree (ttcce); -return err; - } +if (err) + goto out_kfree;clockevents_config_and_register (&ttcce->ce, ttcce->ttc.freq /PRESCALE ,1 ,0xfffe );return 0 ; + +out_kfree: +kfree (ttcce); +return err; }/**
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 174/453 samples: bpf: Fix lwt_len_hist reusing previous BPF map
In reply to Greg Kroah-HartmanFrom: Daniel T. Lee <[email protected]>
[ Upstream commit 0afe0a998c40085a6342e1aeb4c510cccba46caf ]
Currently, lwt_len_hist's map lwt_len_hist_map is uses pinning, and the map isn't cleared on test end. This leds to reuse of that map for each test, which prevents the results of the test from being accurate.
This commit fixes the problem by removing of pinned map from bpffs. Also, this commit add the executable permission to shell script files.
--- samples/bpf/lwt_len_hist.sh | 2 ++ samples/bpf/test_lwt_bpf.sh | 0 2 files changed, 2 insertions(+) mode change 100644 => 100755 samples/bpf/lwt_len_hist.sh mode change 100644 => 100755 samples/bpf/test_lwt_bpf.sh
samples/bpf/lwt_len_hist.sh +2 -0
@@ -8,6 +8,8 @@ VETH1=tst_lwt1b TRACE_ROOT=/sys/kernel/debug/tracing function cleanup { + # To reset saved histogram, remove pinned map + rm /sys/fs/bpf/tc/globals/lwt_len_hist_map ip route del 192.168.253.2/32 dev $VETH0 2> /dev/null ip link del $VETH0 2> /dev/null ip link del $VETH1 2> /dev/null
samples/bpf/test_lwt_bpf.sh +0 -0
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 215/453 ARM: dts: at91: sama5d2: map securam as device
In reply to Greg Kroah-HartmanFrom: Claudiu Beznea <[email protected]>
[ Upstream commit 9b5dcc8d427e2bcb84c49eb03ffefe11e7537a55 ]
Due to strobe signal not being propagated from CPU to securam the securam needs to be mapped as device or strongly ordered memory to work properly. Otherwise, updating to one offset may affect the adjacent locations in securam.
--- arch/arm/boot/dts/sama5d2.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/sama5d2.dtsi +1 -0
@@ -648,6 +648,7 @@ clocks = <&pmc PMC_TYPE_PERIPHERAL 51>; #address-cells = <1>; #size-cells = <1>; + no-memory-wc; ranges = <0 0xf8044000 0x1420>; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 218/453 arm64: dts: rockchip: Fix UART pull-ups on rk3328
In reply to Greg Kroah-HartmanFrom: Chen-Yu Tsai <[email protected]>
[ Upstream commit 94dad6bed3c86c00050bf7c2b2ad6b630facae31 ]
For UARTs, the local pull-ups should be on the RX pin, not the TX pin. UARTs transmit active-low, so a disconnected RX pin should be pulled high instead of left floating to prevent noise being interpreted as transmissions.
This gets rid of bogus sysrq events when the UART console is not connected.
--- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +8 -8
@@ -1190,8 +1190,8 @@ uart0 { uart0_xfer: uart0-xfer { - rockchip,pins = <1 RK_PB1 1 &pcfg_pull_up>, - <1 RK_PB0 1 &pcfg_pull_none>; + rockchip,pins = <1 RK_PB1 1 &pcfg_pull_none>, + <1 RK_PB0 1 &pcfg_pull_up>; }; uart0_cts: uart0-cts {
@@ -1209,8 +1209,8 @@ uart1 { uart1_xfer: uart1-xfer { - rockchip,pins = <3 RK_PA4 4 &pcfg_pull_up>, - <3 RK_PA6 4 &pcfg_pull_none>; + rockchip,pins = <3 RK_PA4 4 &pcfg_pull_none>, + <3 RK_PA6 4 &pcfg_pull_up>; }; uart1_cts: uart1-cts {
@@ -1228,15 +1228,15 @@ uart2-0 { uart2m0_xfer: uart2m0-xfer { - rockchip,pins = <1 RK_PA0 2 &pcfg_pull_up>, - <1 RK_PA1 2 &pcfg_pull_none>; + rockchip,pins = <1 RK_PA0 2 &pcfg_pull_none>, + <1 RK_PA1 2 &pcfg_pull_up>; }; }; uart2-1 { uart2m1_xfer: uart2m1-xfer { - rockchip,pins = <2 RK_PA0 1 &pcfg_pull_up>, - <2 RK_PA1 1 &pcfg_pull_none>; + rockchip,pins = <2 RK_PA0 1 &pcfg_pull_none>, + <2 RK_PA1 1 &pcfg_pull_up>; }; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 221/453 net/mlx5: Properly convey driver version to firmware
In reply to Greg Kroah-HartmanFrom: Leon Romanovsky <[email protected]>
[ Upstream commit 907af0f0cab4ee5d5604f182ecec2c5b5119d294 ]
mlx5 firmware expects driver version in specific format X.X.X, so make it always correct and based on real kernel version aligned with the driver.
--- drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/main.c +5 -1
@@ -50,6 +50,7 @@#ifdef CONFIG_RFS_ACCEL #include <linux/cpu_rmap.h> #endif +#include <linux/version.h> #include <net/devlink.h> #include "mlx5_core.h" #include "lib/eq.h"
@@ -227,7 +228,10 @@ static void mlx5_set_driver_version(struct mlx5_core_dev *dev)strncat (string,"," , remaining_size); remaining_size =max_t (int,0 , driver_ver_sz -strlen (string)); -strncat (string,DRIVER_VERSION , remaining_size); + +snprintf (string +strlen (string), remaining_size,"%u.%u.%u" , + (u8)((LINUX_VERSION_CODE >>16 ) &0xff ), (u8)((LINUX_VERSION_CODE >>8 ) &0xff ), + (u16)(LINUX_VERSION_CODE &0xffff ));/*Send the command*/ MLX5_SET(set_driver_version_in, in, opcode,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 226/453 clocksource/drivers/arm_arch_timer: Correct fault programming of CNTKCTL_EL1.EVNTI
In reply to Greg Kroah-HartmanFrom: Keqian Zhu <[email protected]>
[ Upstream commit 8b7770b877d187bfdae1eaf587bd2b792479a31c ]
ARM virtual counter supports event stream, it can only trigger an event when the trigger bit (the value of CNTKCTL_EL1.EVNTI) of CNTVCT_EL0 changes, so the actual period of event stream is 2^(cntkctl_evnti + 1). For example, when the trigger bit is 0, then virtual counter trigger an event for every two cycles.
While we're at it, rework the way we compute the trigger bit position by making it more obvious that when bits [n:n-1] are both set (with n being the most significant bit), we pick bit (n + 1).
--- drivers/clocksource/arm_arch_timer.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-)
drivers/clocksource/arm_arch_timer.c +16 -7
@@ -818,15 +818,24 @@ static void arch_timer_evtstrm_enable(int divider)static void arch_timer_configure_evtstream (void ) { -int evt_stream_div, pos; +int evt_stream_div, lsb; + +/* +* As the event stream can at most be generated at half the frequency +* of the counter, use half the frequency when computing the divider. +*/ + evt_stream_div = arch_timer_rate /ARCH_TIMER_EVT_STREAM_FREQ /2 ; + +/* +* Find the closest power of two to the divisor. If the adjacent bit +* of lsb (last set bit, starts from 0) is set, then we use (lsb + 1). +*/ + lsb =fls (evt_stream_div) -1 ; +if (lsb >0 && (evt_stream_div &BIT (lsb -1 ))) + lsb++; -/* Find the closest power of two to the divisor */ - evt_stream_div = arch_timer_rate /ARCH_TIMER_EVT_STREAM_FREQ ; - pos =fls (evt_stream_div); -if (pos >1 && !(evt_stream_div & (1 << (pos -2 )))) - pos--;/* enable event stream */ -arch_timer_evtstrm_enable (min (pos,15 )); +arch_timer_evtstrm_enable (max (0 ,min (lsb,15 ))); }static void arch_counter_set_user_access (void )
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 214/453 iio: hrtimer-trigger: Mark hrtimer to expire in hard interrupt context
In reply to Greg Kroah-HartmanFrom: Lars-Peter Clausen <[email protected]>
[ Upstream commit 0178297c1e6898e2197fe169ef3be723e019b971 ]
On PREEMPT_RT enabled kernels unmarked hrtimers are moved into soft interrupt expiry mode by default.
The IIO hrtimer-trigger needs to run in hard interrupt context since it will end up calling generic_handle_irq() which has the requirement to run in hard interrupt context.
Explicitly specify that the timer needs to run in hard interrupt context by using the HRTIMER_MODE_REL_HARD flag.
--- drivers/iio/trigger/iio-trig-hrtimer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/trigger/iio-trig-hrtimer.c +2 -2
@@ -102,7 +102,7 @@ static int iio_trig_hrtimer_set_state(struct iio_trigger *trig, bool state)if (state)hrtimer_start (&trig_info->timer, trig_info->period, -HRTIMER_MODE_REL ); +HRTIMER_MODE_REL_HARD );else hrtimer_cancel (&trig_info->timer);
@@ -132,7 +132,7 @@ static struct iio_sw_trigger *iio_trig_hrtimer_probe(const char *name) trig_info->swt.trigger->ops = &iio_hrtimer_trigger_ops; trig_info->swt.trigger->dev.groups = iio_hrtimer_attr_groups; -hrtimer_init (&trig_info->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (&trig_info->timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL_HARD ); trig_info->timer.function = iio_hrtimer_trig_handler; trig_info->sampling_frequency =HRTIMER_DEFAULT_SAMPLING_FREQUENCY ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 219/453 memstick: r592: Fix error return in r592_probe()
In reply to Greg Kroah-HartmanFrom: Jing Xiangfeng <[email protected]>
[ Upstream commit db29d3d1c2451e673e29c7257471e3ce9d50383a ]
Fix to return a error code from the error handling case instead of 0.
--- drivers/memstick/host/r592.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/memstick/host/r592.c +8 -4
@@ -759,8 +759,10 @@ static int r592_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto error3; dev->mmio =pci_ioremap_bar (pdev,0 ); -if (!dev->mmio) +if (!dev->mmio) { + error = -ENOMEM ; goto error4; + } dev->irq = pdev->irq;spin_lock_init (&dev->irq_lock);
@@ -786,12 +788,14 @@ static int r592_probe(struct pci_dev *pdev, const struct pci_device_id *id) &dev->dummy_dma_page_physical_address, GFP_KERNEL);r592_stop_dma (dev ,0 ); -if (request_irq (dev->irq, &r592_irq,IRQF_SHARED , -DRV_NAME , dev)) + error =request_irq (dev->irq, &r592_irq,IRQF_SHARED , +DRV_NAME , dev); +if (error) goto error6;r592_update_card_detect (dev); -if (memstick_add_host (host)) + error =memstick_add_host (host); +if (error) goto error7;message ("driver successfully loaded" );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 220/453 MIPS: Dont round up kernel sections size for memblock_add()
In reply to Greg Kroah-HartmanFrom: Alexander Sverdlin <[email protected]>
[ Upstream commit d121f125af22a16f0f679293756d28a9691fa46d ]
Linux doesn't own the memory immediately after the kernel image. On Octeon bootloader places a shared structure right close after the kernel _end, refer to "struct cvmx_bootinfo *octeon_bootinfo" in cavium-octeon/setup.c.
If check_kernel_sections_mem() rounds the PFNs up, first memblock_alloc() inside early_init_dt_alloc_memory_arch() <= device_tree_init() returns memory block overlapping with the above octeon_bootinfo structure, which is being overwritten afterwards.
--- arch/mips/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/kernel/setup.c +2 -2
@@ -529,8 +529,8 @@ static void __init request_crashkernel(struct resource *res)static void __init check_kernel_sections_mem (void ) { -phys_addr_t start =PFN_PHYS (PFN_DOWN (__pa_symbol (&_text))); -phys_addr_t size =PFN_PHYS (PFN_UP (__pa_symbol (&_end))) - start; +phys_addr_t start =__pa_symbol (&_text); +phys_addr_t size =__pa_symbol (&_end) - start;if (!memblock_is_region_memory (start, size)) {pr_info ("Kernel sections are not in the memory maps\n" );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 223/453 dm ioctl: fix error return code in target_message
In reply to Greg Kroah-HartmanFrom: Qinglang Miao <[email protected]>
[ Upstream commit 4d7659bfbe277a43399a4a2d90fca141e70f29e1 ]
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.
--- drivers/md/dm-ioctl.c | 1 + 1 file changed, 1 insertion(+)
drivers/md/dm-ioctl.c +1 -0
@@ -1600,6 +1600,7 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t paraif (!argc) {DMWARN ("Empty message received." ); + r = -EINVAL ; goto out_argv; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 225/453 clocksource/drivers/arm_arch_timer: Use stable count reader in erratum sne
In reply to Greg Kroah-HartmanFrom: Keqian Zhu <[email protected]>
[ Upstream commit d8cc3905b8073c7cfbff94af889fa8dc71f21dd5 ]
In commit 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters"), we separate stable and normal count reader to omit unnecessary overhead on systems that have no timer erratum.
However, in erratum_set_next_event_tval_generic(), count reader becomes normal reader. This converts it to stable reader.
--- drivers/clocksource/arm_arch_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clocksource/arm_arch_timer.c +2 -2
@@ -392,10 +392,10 @@ static void erratum_set_next_event_tval_generic(const int access, unsigned long ctrl &= ~ARCH_TIMER_CTRL_IT_MASK ;if (access ==ARCH_TIMER_PHYS_ACCESS ) { - cval = evt +arch_counter_get_cntpct (); + cval = evt +arch_counter_get_cntpct_stable ();write_sysreg (cval, cntp_cval_el0); }else { - cval = evt +arch_counter_get_cntvct (); + cval = evt +arch_counter_get_cntvct_stable ();write_sysreg (cval, cntv_cval_el0); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 228/453 cpufreq: highbank: Add missing MODULE_DEVICE_TABLE
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 9433777a6e0aae27468d3434b75cd51bb88ff711 ]
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module.
--- drivers/cpufreq/highbank-cpufreq.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/cpufreq/highbank-cpufreq.c +7 -0
@@ -101,6 +101,13 @@ out_put_node: }module_init (hb_cpufreq_driver_init); +static const struct of_device_id __maybe_unused hb_cpufreq_of_match[] = { + { .compatible ="calxeda,highbank" }, + { .compatible ="calxeda,ecx-2000" }, + { }, +}; +MODULE_DEVICE_TABLE (of, hb_cpufreq_of_match); +MODULE_AUTHOR ("Mark Langsdorf <[email protected]>" );MODULE_DESCRIPTION ("Calxeda Highbank cpufreq driver" );MODULE_LICENSE ("GPL" );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 227/453 cpufreq: ap806: Add missing MODULE_DEVICE_TABLE
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 925a5bcefe105f2790ecbdc252eb2315573f309d ]
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module.
--- drivers/cpufreq/armada-8k-cpufreq.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/cpufreq/armada-8k-cpufreq.c +6 -0
@@ -204,6 +204,12 @@ static void __exit armada_8k_cpufreq_exit(void) }module_exit (armada_8k_cpufreq_exit); +static const struct of_device_id __maybe_unused armada_8k_cpufreq_of_match[] = { + { .compatible ="marvell,ap806-cpu-clock" }, + { }, +}; +MODULE_DEVICE_TABLE (of, armada_8k_cpufreq_of_match); +MODULE_AUTHOR ("Gregory Clement <[email protected]>" );MODULE_DESCRIPTION ("Armada 8K cpufreq driver" );MODULE_LICENSE ("GPL" );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 205/453 NFS: switch nfsiod to be an UNBOUND workqueue.
In reply to Greg Kroah-HartmanFrom: NeilBrown <[email protected]>
[ Upstream commit bf701b765eaa82dd164d65edc5747ec7288bb5c3 ]
nfsiod is currently a concurrency-managed workqueue (CMWQ). This means that workitems scheduled to nfsiod on a given CPU are queued behind all other work items queued on any CMWQ on the same CPU. This can introduce unexpected latency.
Occaionally nfsiod can even cause excessive latency. If the work item to complete a CLOSE request calls the final iput() on an inode, the address_space of that inode will be dismantled. This takes time proportional to the number of in-memory pages, which on a large host working on large files (e.g.. 5TB), can be a large number of pages resulting in a noticable number of seconds.
We can avoid these latency problems by switching nfsiod to WQ_UNBOUND. This causes each concurrent work item to gets a dedicated thread which can be scheduled to an idle CPU.
There is precedent for this as several other filesystems use WQ_UNBOUND workqueue for handling various async events.
--- fs/nfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/inode.c +1 -1
@@ -2151,7 +2151,7 @@ static int nfsiod_start(void) {struct workqueue_struct *wq;dprintk ("RPC: creating workqueue nfsiod\n" ); - wq =alloc_workqueue ("nfsiod" ,WQ_MEM_RECLAIM ,0 ); + wq =alloc_workqueue ("nfsiod" ,WQ_MEM_RECLAIM |WQ_UNBOUND ,0 );if (wq ==NULL )return -ENOMEM ; nfsiod_workqueue = wq;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 209/453 media: saa7146: fix array overflow in vidioc_s_audio()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 8e4d86e241cf035d6d3467cd346e7ce490681937 ]
The "a->index" value comes from the user via the ioctl. The problem is that the shift can wrap resulting in setting "mxb->cur_audinput" to an invalid value, which later results in an array overflow.
--- drivers/media/pci/saa7146/mxb.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
drivers/media/pci/saa7146/mxb.c +10 -9
@@ -641,16 +641,17 @@ static int vidioc_s_audio(struct file *file, void *fh, const struct v4l2_audio *struct mxb *mxb = (struct mxb *)dev->ext_priv;DEB_D ("VIDIOC_S_AUDIO %d\n" , a->index); -if (mxb_inputs[mxb->cur_input].audioset & (1 << a->index)) { -if (mxb->cur_audinput != a->index) { - mxb->cur_audinput = a->index; -tea6420_route (mxb, a->index); -if (mxb->cur_audinput ==0 ) -mxb_update_audmode (mxb); - } -return 0 ; +if (a->index >=32 || + !(mxb_inputs[mxb->cur_input].audioset & (1 << a->index))) +return -EINVAL ; + +if (mxb->cur_audinput != a->index) { + mxb->cur_audinput = a->index; +tea6420_route (mxb, a->index); +if (mxb->cur_audinput ==0 ) +mxb_update_audmode (mxb); } -return -EINVAL ; +return 0 ; }#ifdef CONFIG_VIDEO_ADV_DEBUG
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 229/453 cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit af6eca06501118af3e2ad46eee8edab20624b74e ]
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module.
--- drivers/cpufreq/mediatek-cpufreq.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpufreq/mediatek-cpufreq.c +1 -0
@@ -540,6 +540,7 @@ static const struct of_device_id mtk_cpufreq_machines[] __initconst = { { } }; +MODULE_DEVICE_TABLE (of, mtk_cpufreq_machines);static int __init mtk_cpufreq_driver_init (void ) {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 231/453 cpufreq: st: Add missing MODULE_DEVICE_TABLE
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 183747ab52654eb406fc6b5bfb40806b75d31811 ]
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module.
--- drivers/cpufreq/sti-cpufreq.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/cpufreq/sti-cpufreq.c +7 -0
@@ -292,6 +292,13 @@ register_cpufreq_dt: }module_init (sti_cpufreq_init); +static const struct of_device_id __maybe_unused sti_cpufreq_of_match[] = { + { .compatible ="st,stih407" }, + { .compatible ="st,stih410" }, + { }, +}; +MODULE_DEVICE_TABLE (of, sti_cpufreq_of_match); +MODULE_DESCRIPTION ("STMicroelectronics CPUFreq/OPP driver" );MODULE_AUTHOR ("Ajitpal Singh <[email protected]>" );MODULE_AUTHOR ("Lee Jones <[email protected]>" );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 207/453 vfio-pci: Use io_remap_pfn_range() for PCI IO memory
In reply to Greg Kroah-HartmanFrom: Jason Gunthorpe <[email protected]>
[ Upstream commit 7b06a56d468b756ad6bb43ac21b11e474ebc54a0 ]
commit f8f6ae5d077a ("mm: always have io_remap_pfn_range() set pgprot_decrypted()") allows drivers using mmap to put PCI memory mapped BAR space into userspace to work correctly on AMD SME systems that default to all memory encrypted.
Since vfio_pci_mmap_fault() is working with PCI memory mapped BAR space it should be calling io_remap_pfn_range() otherwise it will not work on SME systems.
--- drivers/vfio/pci/vfio_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/vfio/pci/vfio_pci.c +2 -2
@@ -1451,8 +1451,8 @@ static vm_fault_t vfio_pci_mmap_fault(struct vm_fault *vmf)mutex_unlock (&vdev->vma_lock); -if (remap_pfn_range (vma, vma->vm_start, vma->vm_pgoff, - vma->vm_end - vma->vm_start, vma->vm_page_prot)) +if (io_remap_pfn_range (vma, vma->vm_start, vma->vm_pgoff, + vma->vm_end - vma->vm_start, vma->vm_page_prot)) ret =VM_FAULT_SIGBUS ; up_out:
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 232/453 cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit af2096f285077e3339eb835ad06c50bdd59f01b5 ]
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this cpufreq driver when it is compiled as an external module.
--- drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpufreq/sun50i-cpufreq-nvmem.c +1 -0
@@ -167,6 +167,7 @@ static const struct of_device_id sun50i_cpufreq_match_list[] = { { .compatible = "allwinner,sun50i-h6" }, {} }; +MODULE_DEVICE_TABLE (of, sun50i_cpufreq_match_list);static const struct of_device_id *sun50i_cpufreq_match_node (void ) {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 233/453 cpufreq: loongson1: Add missing MODULE_ALIAS
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit b9acab091842ca8b288882798bb809f7abf5408a ]
This patch adds missing MODULE_ALIAS for automatic loading of this cpufreq driver when it is compiled as an external module.
--- drivers/cpufreq/loongson1-cpufreq.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpufreq/loongson1-cpufreq.c +1 -0
@@ -216,6 +216,7 @@ static struct platform_driver ls1x_cpufreq_platdrv = {module_platform_driver (ls1x_cpufreq_platdrv); +MODULE_ALIAS ("platform:ls1x-cpufreq" );MODULE_AUTHOR ("Kelvin Cheung <[email protected]>" );MODULE_DESCRIPTION ("Loongson1 CPUFreq driver" );MODULE_LICENSE ("GPL" );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 236/453 Bluetooth: btmtksdio: Add the missed release_firmware() in mtk_setup_firmware()
In reply to Greg Kroah-HartmanFrom: Jing Xiangfeng <[email protected]>
[ Upstream commit b73b5781a85c03113476f62346c390f0277baa4b ]
mtk_setup_firmware() misses to call release_firmware() in an error path. Jump to free_fw to fix it.
--- drivers/bluetooth/btmtksdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bluetooth/btmtksdio.c +1 -1
@@ -703,7 +703,7 @@ static int mtk_setup_firmware(struct hci_dev *hdev, const char *fwname) err =mtk_hci_wmt_sync (hdev, &wmt_params);if (err <0 ) {bt_dev_err (hdev,"Failed to power on data RAM (%d)" , err); -return err; + goto free_fw; } fw_ptr = fw->data;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 246/453 powerpc/pseries/hibernation: remove redundant cacheinfo update
In reply to Greg Kroah-HartmanFrom: Nathan Lynch <[email protected]>
[ Upstream commit b866459489fe8ef0e92cde3cbd6bbb1af6c4e99b ]
Partitions with cache nodes in the device tree can encounter the following warning on resume:
CPU 0 already accounted in PowerPC,POWER9@0(Data)
WARNING: CPU: 0 PID: 3177 at arch/powerpc/kernel/cacheinfo.c:197 cacheinfo_cpu_online+0x640/0x820
These calls to cacheinfo_cpu_offline/online have been redundant since commit e610a466d16a ("powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration").
--- arch/powerpc/platforms/pseries/suspend.c | 3 --- 1 file changed, 3 deletions(-)
arch/powerpc/platforms/pseries/suspend.c +0 -3
@@ -13,7 +13,6 @@#include <asm/mmu.h> #include <asm/rtas.h> #include <asm/topology.h> -#include "../../kernel/cacheinfo.h" static u64 stream_id;static struct device suspend_dev;
@@ -78,9 +77,7 @@ static void pseries_suspend_enable_irqs(void)* Update configuration which can be modified based on device tree * changes during resume. */ -cacheinfo_cpu_offline (smp_processor_id ());post_mobility_fixup (); -cacheinfo_cpu_online (smp_processor_id ()); }/**
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 208/453 hwmon: (ina3221) Fix PM usage counter unbalance in ina3221_write_enable
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit bce776f10069c806290eaac712ba73432ae8ecd7 ]
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. We fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. It depends on the mainline commit[PM: runtime:
Add pm_runtime_resume_and_get to deal with usagecounter].
--- drivers/hwmon/ina3221.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/ina3221.c +1 -1
@@ -403,7 +403,7 @@ static int ina3221_write_enable(struct device *dev, int channel, bool enable)/* For enabling routine, increase refcount and resume() at first */ if (enable) { - ret =pm_runtime_get_sync (ina->pm_dev); + ret =pm_runtime_resume_and_get (ina->pm_dev);if (ret <0 ) {dev_err (dev,"Failed to get PM runtime\n" );return ret;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 210/453 powerpc/perf: Fix crash with is_sier_available when pmu is not set
In reply to Greg Kroah-HartmanFrom: Athira Rajeev <[email protected]>
[ Upstream commit f75e7d73bdf73f07b0701a6d21c111ef5d9021dd ]
On systems without any specific PMU driver support registered, running 'perf record' with —intr-regs will crash ( perf record -I <workload> ).
The relevant portion from crash logs and Call Trace:
Unable to handle kernel paging request for data at address 0x00000068 Faulting instruction address: 0xc00000000013eb18 Oops: Kernel access of bad area, sig: 11 [#1] CPU: 2 PID: 13435 Comm: kill Kdump: loaded Not tainted 4.18.0-193.el8.ppc64le #1 NIP: c00000000013eb18 LR: c000000000139f2c CTR: c000000000393d80 REGS: c0000004a07ab4f0 TRAP: 0300 Not tainted (4.18.0-193.el8.ppc64le) NIP [c00000000013eb18] is_sier_available+0x18/0x30 LR [c000000000139f2c] perf_reg_value+0x6c/0xb0 Call Trace:
[c0000004a07ab770] [c0000004a07ab7c8] 0xc0000004a07ab7c8 (unreliable) [c0000004a07ab7a0] [c0000000003aa77c] perf_output_sample+0x60c/0xac0 [c0000004a07ab840] [c0000000003ab3f0] perf_event_output_forward+0x70/0xb0 [c0000004a07ab8c0] [c00000000039e208] __perf_event_overflow+0x88/0x1a0 [c0000004a07ab910] [c00000000039e42c] perf_swevent_hrtimer+0x10c/0x1d0 [c0000004a07abc50] [c000000000228b9c] __hrtimer_run_queues+0x17c/0x480 [c0000004a07abcf0] [c00000000022aaf4] hrtimer_interrupt+0x144/0x520 [c0000004a07abdd0] [c00000000002a864] timer_interrupt+0x104/0x2f0 [c0000004a07abe30] [c0000000000091c4] decrementer_common+0x114/0x120
When perf record session is started with "-I" option, capturing registers on each sample calls is_sier_available() to check for the
SIER (Sample Instruction Event Register) availability in the platform. This function in core-book3s accesses 'ppmu->flags'. If a platform specific PMU driver is not registered, ppmu is set to NULL and accessing its members results in a crash. Fix the crash by returning false in is_sier_available() if ppmu is not set.
--- arch/powerpc/perf/core-book3s.c | 3 +++ 1 file changed, 3 insertions(+)
arch/powerpc/perf/core-book3s.c +3 -0
@@ -133,6 +133,9 @@ static void pmao_restore_workaround(bool ebb) { }bool is_sier_available (void ) { +if (!ppmu) +return false; +if (ppmu->flags &PPMU_HAS_SIER )return true;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 211/453 powerpc/64: Fix an EMIT_BUG_ENTRY in head_64.S
In reply to Greg Kroah-HartmanFrom: Jordan Niethe <[email protected]>
[ Upstream commit fe18a35e685c9bdabc8b11b3e19deb85a068b75d ]
Commit 63ce271b5e37 ("powerpc/prom: convert PROM_BUG() to standard trap") added an EMIT_BUG_ENTRY for the trap after the branch to start_kernel(). The EMIT_BUG_ENTRY was for the address "0b", however the trap was not labeled with "0". Hence the address used for bug is in relative_toc() where the previous "0" label is. Label the trap as "0" so the correct address is used.
--- arch/powerpc/kernel/head_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/head_64.S +1 -1
@@ -992,7 +992,7 @@ start_here_common: bl start_kernel /* Not reached */ - trap +0: trap EMIT_BUG_ENTRY 0b, __FILE__, __LINE__, 0 /*
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 250/453 usb: ehci-omap: Fix PM disable depth umbalance in ehci_hcd_omap_probe
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit d6ff32478d7e95d6ca199b5c852710d6964d5811 ]
The pm_runtime_enable will decrement the power disable depth. Imbalance depth will resulted in enabling runtime PM of device fails later. Thus a pairing decrement must be needed on the error handling path to keep it balanced.
--- drivers/usb/host/ehci-omap.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/host/ehci-omap.c +1 -0
@@ -220,6 +220,7 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) err_pm_runtime:pm_runtime_put_sync (dev); +pm_runtime_disable (dev); err_phy:for (i =0 ; i < omap->nports; i++) {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 251/453 usb: oxu210hp-hcd: Fix memory leak in oxu_create
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit e5548b05631ec3e6bfdaef1cad28c799545b791b ]
usb_create_hcd will alloc memory for hcd, and we should call usb_put_hcd to free it when adding fails to prevent memory leak.
--- drivers/usb/host/oxu210hp-hcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/host/oxu210hp-hcd.c +3 -1
@@ -4149,8 +4149,10 @@ static struct usb_hcd *oxu_create(struct platform_device *pdev, oxu->is_otg = otg; ret =usb_add_hcd (hcd, irq,IRQF_SHARED ); -if (ret <0 ) +if (ret <0 ) { +usb_put_hcd (hcd);return ERR_PTR (ret); + }device_wakeup_enable (hcd->self.controller);return hcd;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 237/453 arm64: dts: meson: fix PHY deassert timing requirements
In reply to Greg Kroah-HartmanFrom: Stefan Agner <[email protected]>
[ Upstream commit c183c406c4321002fe85b345b51bc1a3a04b6d33 ]
According to the datasheet (Rev. 1.9) the RTL8211F requires at least 72ms "for internal circuits settling time" before accessing the PHY registers. This fixes an issue seen on ODROID-C2 where the Ethernet link doesn't come up when using ip link set down/up:
[ 6630.714855] meson8b-dwmac c9410000.ethernet eth0: Link is Down [ 6630.785775] meson8b-dwmac c9410000.ethernet eth0: PHY [stmmac-0:00] driver [RTL8211F Gigabit Ethernet] (irq=36) [ 6630.893071] meson8b-dwmac c9410000.ethernet: Failed to reset the dma [ 6630.893800] meson8b-dwmac c9410000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed [ 6630.902835] meson8b-dwmac c9410000.ethernet eth0: stmmac_open: Hw setup failed
--- arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 2 +- arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 2 +- arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +1 -1
@@ -165,7 +165,7 @@ reg = <0>; reset-assert-us = <10000>; - reset-deassert-us = <30000>; + reset-deassert-us = <80000>; reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; interrupt-parent = <&gpio_intc>;
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +1 -1
@@ -138,7 +138,7 @@ reg = <0>; reset-assert-us = <10000>; - reset-deassert-us = <30000>; + reset-deassert-us = <80000>; reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; interrupt-parent = <&gpio_intc>;
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +1 -1
@@ -126,7 +126,7 @@ reg = <0>; reset-assert-us = <10000>; - reset-deassert-us = <30000>; + reset-deassert-us = <80000>; reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; interrupt-parent = <&gpio_intc>;
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi +1 -1
@@ -147,7 +147,7 @@ reg = <0>; reset-assert-us = <10000>; - reset-deassert-us = <30000>; + reset-deassert-us = <80000>; reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; }; };
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts +1 -1
@@ -82,7 +82,7 @@ /* External PHY reset is shared with internal PHY Led signal */ reset-assert-us = <10000>; - reset-deassert-us = <30000>; + reset-deassert-us = <80000>; reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; interrupt-parent = <&gpio_intc>;
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +1 -1
@@ -251,7 +251,7 @@ reg = <0>; reset-assert-us = <10000>; - reset-deassert-us = <30000>; + reset-deassert-us = <80000>; reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; interrupt-parent = <&gpio_intc>;
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts +1 -1
@@ -112,7 +112,7 @@ max-speed = <1000>; reset-assert-us = <10000>; - reset-deassert-us = <30000>; + reset-deassert-us = <80000>; reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; }; };
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts +1 -1
@@ -64,7 +64,7 @@ /* External PHY reset is shared with internal PHY Led signal */ reset-assert-us = <10000>; - reset-deassert-us = <30000>; + reset-deassert-us = <80000>; reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; interrupt-parent = <&gpio_intc>;
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts +1 -1
@@ -114,7 +114,7 @@ max-speed = <1000>; reset-assert-us = <10000>; - reset-deassert-us = <30000>; + reset-deassert-us = <80000>; reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; }; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 247/453 drm/mediatek: avoid dereferencing a null hdmi_phy on an error message
In reply to Greg Kroah-HartmanFrom: Colin Ian King <[email protected]>
[ Upstream commit b097efba9580d1f7cbc80cda84e768983e3de541 ]
Currently there is a null pointer check for hdmi_phy that implies it may be null, however a dev_err messages dereferences this potential null pointer. Avoid a null pointer dereference by only emitting the dev_err message if hdmi_phy is non-null. It is a moot point if the error message needs to be printed at all, but since this is a relatively new piece of code it may be useful to keep the message in for the moment in case there are unforseen errors that need to be reported.
Addresses-Coverity: ("Dereference after null check")
--- drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/mediatek/mtk_hdmi_phy.c +3 -2
@@ -84,8 +84,9 @@ mtk_hdmi_phy_dev_get_ops(const struct mtk_hdmi_phy *hdmi_phy) hdmi_phy->conf->hdmi_phy_disable_tmds)return &mtk_hdmi_phy_dev_ops; -dev_err (hdmi_phy->dev,"Failed to get dev ops of phy\n" ); -return NULL ; +if (hdmi_phy) +dev_err (hdmi_phy->dev,"Failed to get dev ops of phy\n" ); +return NULL ; } static void mtk_hdmi_phy_clk_get_data(struct mtk_hdmi_phy *hdmi_phy,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 248/453 ASoC: amd: change clk_get() to devm_clk_get() and add missed checks
In reply to Greg Kroah-HartmanFrom: Chuhong Yuan <[email protected]>
[ Upstream commit 95d3befbc5e1ee39fc8a78713924cf7ed2b3cabe ]
cz_da7219_init() does not check the return values of clk_get(), while da7219_clk_enable() calls clk_set_rate() to dereference the pointers.
Add checks to fix the problems.
Also, change clk_get() to devm_clk_get() to avoid data leak after failures.
--- sound/soc/amd/acp-da7219-max98357a.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
sound/soc/amd/acp-da7219-max98357a.c +7 -2
@@ -73,8 +73,13 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)return ret; } - da7219_dai_wclk =clk_get (component->dev,"da7219-dai-wclk" ); - da7219_dai_bclk =clk_get (component->dev,"da7219-dai-bclk" ); + da7219_dai_wclk =devm_clk_get (component->dev,"da7219-dai-wclk" ); +if (IS_ERR (da7219_dai_wclk)) +return PTR_ERR (da7219_dai_wclk); + + da7219_dai_bclk =devm_clk_get (component->dev,"da7219-dai-bclk" ); +if (IS_ERR (da7219_dai_bclk)) +return PTR_ERR (da7219_dai_bclk); ret = snd_soc_card_jack_new(card, "Headset Jack", SND_JACK_HEADSET | SND_JACK_LINEOUT |
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 249/453 powerpc/mm: sanity_check_fault() should work for all, not only BOOK3S
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
[ Upstream commit 7ceb40027e19567a0a066e3b380cc034cdd9a124 ]
The verification and message introduced by commit 374f3f5979f9 ("powerpc/mm/hash: Handle user access of kernel address gracefully") applies to all platforms, it should not be limited to BOOK3S.
Make the BOOK3S version of sanity_check_fault() the one for all, and bail out earlier if not BOOK3S.
--- arch/powerpc/mm/fault.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
arch/powerpc/mm/fault.c +3 -5
@@ -349,7 +349,6 @@ static inline void cmo_account_page_fault(void)static inline void cmo_account_page_fault (void ) { }#endif /* CONFIG_PPC_SMLPAR */ -#ifdef CONFIG_PPC_BOOK3S static void sanity_check_fault (bool is_write,bool is_user,unsigned long error_code,unsigned long address) {
@@ -366,6 +365,9 @@ static void sanity_check_fault(bool is_write, bool is_user,return ; } +if (!IS_ENABLED (CONFIG_PPC_BOOK3S )) +return ; +/* * For hash translation mode, we should never get a * PROTFAULT. Any update to pte to reduce access will result in us
@@ -400,10 +402,6 @@ static void sanity_check_fault(bool is_write, bool is_user,WARN_ON_ONCE (error_code &DSISR_PROTFAULT ); } -#else -static void sanity_check_fault (bool is_write,bool is_user, -unsigned long error_code,unsigned long address) { } -#endif /* CONFIG_PPC_BOOK3S */ /* * Define the correct "is_write" bit in error_code based
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 260/453 erofs: avoid using generic_block_bmap
In reply to Greg Kroah-HartmanFrom: Huang Jianan <[email protected]>
[ Upstream commit d8b3df8b1048405e73558b88cba2adf29490d468 ]
Surprisingly, `block' in sector_t indicates the number of i_blkbits-sized blocks rather than sectors for bmap.
In addition, considering buffer_head limits mapped size to 32-bits, should avoid using generic_block_bmap.
--- fs/erofs/data.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-)
fs/erofs/data.c +7 -19
@@ -323,27 +323,12 @@ static int erofs_raw_access_readpages(struct file *filp,return 0 ; } -static int erofs_get_block (struct inode *inode,sector_t iblock, -struct buffer_head *bh,int create) -{ -struct erofs_map_blocks map = { - .m_la = iblock <<9 , - }; -int err; - - err =erofs_map_blocks (inode, &map,EROFS_GET_BLOCKS_RAW ); -if (err) -return err; - -if (map.m_flags &EROFS_MAP_MAPPED ) - bh->b_blocknr =erofs_blknr (map.m_pa); - -return err; -} -static sector_t erofs_bmap (struct address_space *mapping,sector_t block) {struct inode *inode = mapping->host; +struct erofs_map_blocks map = { + .m_la =blknr_to_addr (block), + };if (EROFS_I (inode)->datalayout ==EROFS_INODE_FLAT_INLINE ) {erofs_blk_t blks =i_size_read (inode) >>LOG_BLOCK_SIZE ;
@@ -352,7 +337,10 @@ static sector_t erofs_bmap(struct address_space *mapping, sector_t block)return 0 ; } -return generic_block_bmap (mapping, block, erofs_get_block); +if (!erofs_map_blocks (inode, &map,EROFS_GET_BLOCKS_RAW )) +return erofs_blknr (map.m_pa); + +return 0 ; }/* for uncompressed (aligned) files and raw access for other files */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 261/453 can: m_can: m_can_config_endisable(): remove double clearing of clock stop request bit
In reply to Greg Kroah-HartmanFrom: Sean Nyekjaer <[email protected]>
[ Upstream commit c9f4cad6cdfe350ce2637e57f7f2aa7ff326bcc6 ]
The CSR bit is already cleared when arriving here so remove this section of duplicate code.
The registers set in m_can_config_endisable() is set to same exact values as before this patch.
--- drivers/net/can/m_can/m_can.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/can/m_can/m_can.c +0 -4
@@ -379,10 +379,6 @@ void m_can_config_endisable(struct m_can_classdev *cdev, bool enable) cccr &= ~CCCR_CSR ;if (enable) { -/* Clear the Clock stop request if it was set */ -if (cccr &CCCR_CSR ) - cccr &= ~CCCR_CSR ; -/* enable m_can configuration */ m_can_write (cdev,M_CAN_CCCR , cccr |CCCR_INIT );udelay (5 );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 255/453 x86/kprobes: Restore BTF if the single-stepping is cancelled
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
[ Upstream commit 78ff2733ff352175eb7f4418a34654346e1b6cd2 ]
Fix to restore BTF if single-stepping causes a page fault and it is cancelled.
Usually the BTF flag was restored when the single stepping is done (in resume_execution()). However, if a page fault happens on the single stepping instruction, the fault handler is invoked and the single stepping is cancelled. Thus, the BTF flag is not restored.
--- arch/x86/kernel/kprobes/core.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/x86/kernel/kprobes/core.c +5 -0
@@ -1019,6 +1019,11 @@ int kprobe_fault_handler(struct pt_regs *regs, int trapnr)* So clear it by resetting the current kprobe: */ regs->flags &= ~X86_EFLAGS_TF ; +/* +* Since the single step (trap) has been cancelled, +* we need to restore BTF here. +*/ +restore_btf ();/* * If the TF flag was set before the kprobe hit,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 256/453 platform/chrome: cros_ec_spi: Dont overwrite spi::mode
In reply to Greg Kroah-HartmanFrom: Stephen Boyd <[email protected]>
[ Upstream commit 74639cbf51d7c0304342544a83dfda354a6bd208 ]
There isn't any need to overwrite the mode here in the driver with what has been detected by the firmware, such as DT or ACPI. In fact, if we use the SPI CS gpio descriptor feature we will overwrite the mode with SPI_MODE_0 where it already contains SPI_MODE_0 and more importantly SPI_CS_HIGH. Clearing the SPI_CS_HIGH bit causes the CS line to toggle when the device is probed when it shouldn't change, confusing the driver and making it fail to probe. Drop the assignment and let the spi core take care of it.
--- drivers/platform/chrome/cros_ec_spi.c | 1 - 1 file changed, 1 deletion(-)
drivers/platform/chrome/cros_ec_spi.c +0 -1
@@ -739,7 +739,6 @@ static int cros_ec_spi_probe(struct spi_device *spi)int err; spi->bits_per_word =8 ; - spi->mode =SPI_MODE_0 ; spi->rt = true; err =spi_setup (spi);if (err <0 )
Signature · 1 line
2.27.0