4.9.267-rc1 review
Subsystems (2)
Greg Kroah-Hartman
maintainercover 4.9.267-rc1 review
This is the start of the stable review cycle for the 4.9.267 release. There are 47 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 Sat, 17 Apr 2021 14:44:01 +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/v4.x/stable-review/patch-4.9.267-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-4.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.9.267-rc1
Juergen Gross <[email protected]>
xen/events: fix setting irq affinity
Arnaldo Carvalho de Melo <[email protected]>
perf map: Tighten snprintf() string precision to pass gcc check on some 32-bit arches
Florian Westphal <[email protected]>
netfilter: x_tables: fix compat match/target pad out-of-bound write
Bob Peterson <[email protected]>
gfs2: report "already frozen/thawed" errors
Arnd Bergmann <[email protected]>
drm/imx: imx-ldb: fix out of bounds array access warning
Greg Kroah-Hartman <[email protected]>
Revert "cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath."
Alexander Aring <[email protected]>
net: ieee802154: stop dump llsec params for monitors
Alexander Aring <[email protected]>
net: ieee802154: forbid monitor for del llsec seclevel
Alexander Aring <[email protected]>
net: ieee802154: forbid monitor for set llsec params
Alexander Aring <[email protected]>
net: ieee802154: fix nl802154 del llsec devkey
Alexander Aring <[email protected]>
net: ieee802154: fix nl802154 add llsec key
Alexander Aring <[email protected]>
net: ieee802154: fix nl802154 del llsec dev
Alexander Aring <[email protected]>
net: ieee802154: fix nl802154 del llsec key
Alexander Aring <[email protected]>
net: ieee802154: nl-mac: fix check on panid
Pavel Skripkin <[email protected]>
net: mac802154: Fix general protection fault
Pavel Skripkin <[email protected]>
drivers: net: fix memory leak in peak_usb_create_dev
Pavel Skripkin <[email protected]>
drivers: net: fix memory leak in atusb_probe
Phillip Potter <[email protected]>
net: tun: set tun->dev->addr_len during TUNSETLINK processing
Du Cheng <[email protected]>
cfg80211: remove WARN_ON() in cfg80211_sme_connect
Shuah Khan <[email protected]>
usbip: fix vudc usbip_sockfd_store races leading to gpf
Hugh Dickins <[email protected]>
mm: add cond_resched() in gather_pte_stats()
Krzysztof Kozlowski <[email protected]>
clk: socfpga: fix iomem pointer cast on 64-bit
Potnuri Bharat Teja <[email protected]>
RDMA/cxgb4: check for ipv6 address properly while destroying listener
Alexander Gordeev <[email protected]>
s390/cpcmd: fix inline assembly register clobbering
Zqiang <[email protected]>
workqueue: Move the position of debug_work_activate() in __queue_work()
Lukasz Bartosik <[email protected]>
clk: fix invalid usage of list cursor in unregister
Arnd Bergmann <[email protected]>
soc/fsl: qbman: fix conflicting alignment attributes
Lv Yunlong <[email protected]>
net:tipc: Fix a double free in tipc_sk_mcast_rcv
Claudiu Manoil <[email protected]>
gianfar: Handle error code at MAC address change
Eric Dumazet <[email protected]>
sch_red: fix off-by-one checks in red_check_params()
Pavel Tikhomirov <[email protected]>
net: sched: sch_teql: fix null-pointer dereference
Tetsuo Handa <[email protected]>
batman-adv: initialize "struct batadv_tvlv_tt_vlan_data"->reserved field
Gao Xiang <[email protected]>
parisc: avoid a warning on u8 cast for cmpxchg on u8 pointers
Helge Deller <[email protected]>
parisc: parisc-agp requires SBA IOMMU driver
Jack Qiu <[email protected]>
fs: direct-io: fix missing sdio->boundary
Wengang Wang <[email protected]>
ocfs2: fix deadlock between setattr and dio_end_io_write
Sergei Trofimovich <[email protected]>
ia64: fix user_stack_pointer() for ptrace()
Muhammad Usama Anjum <[email protected]>
net: ipv6: check for validity before dereferencing cfg->fc_nlinfo.nlh
Luca Fancellu <[email protected]>
xen/evtchn: Change irq_info lock to raw_spinlock_t
Xiaoming Ni <[email protected]>
nfc: Avoid endless loops caused by repeated llcp_sock_connect()
Xiaoming Ni <[email protected]>
nfc: fix memory leak in llcp_sock_connect()
Xiaoming Ni <[email protected]>
nfc: fix refcount leak in llcp_sock_connect()
Xiaoming Ni <[email protected]>
nfc: fix refcount leak in llcp_sock_bind()
Hans de Goede <[email protected]>
ASoC: intel: atom: Stop advertising non working S24LE support
Jonas Holmberg <[email protected]>
ALSA: aloop: Fix initialization of controls
Ye Xiang <[email protected]>
iio: hid-sensor-prox: Fix scale not correct issue
Nicolas Pitre <[email protected]>
ARM: 8723/2: always assume the "unified" syntax for assembly code
-------------
Diffstat:
Makefile | 4 +- arch/arm/Kconfig | 7 +-- arch/arm/Makefile | 6 ++- arch/arm/include/asm/unified.h | 77 ++-------------------------- arch/ia64/include/asm/ptrace.h | 8 +-- arch/parisc/include/asm/cmpxchg.h | 2 +- arch/s390/kernel/cpcmd.c | 6 ++- drivers/char/agp/Kconfig | 2 +- drivers/clk/clk.c | 30 +++++------ drivers/clk/socfpga/clk-gate.c | 2 +- drivers/gpu/drm/imx/imx-ldb.c | 10 ++++ drivers/iio/light/hid-sensor-prox.c | 14 ++++- drivers/infiniband/hw/cxgb4/cm.c | 3 +- drivers/net/can/usb/peak_usb/pcan_usb_core.c | 6 ++- drivers/net/ethernet/freescale/gianfar.c | 6 ++- drivers/net/ieee802154/atusb.c | 1 + drivers/net/tun.c | 48 +++++++++++++++++ drivers/soc/fsl/qbman/qman.c | 2 +- drivers/usb/usbip/vudc_sysfs.c | 42 ++++++++++++--- drivers/xen/events/events_base.c | 14 ++--- drivers/xen/events/events_internal.h | 2 +- fs/cifs/connect.c | 1 - fs/direct-io.c | 5 +- fs/gfs2/super.c | 10 ++-- fs/ocfs2/aops.c | 11 +--- fs/ocfs2/file.c | 8 ++- fs/proc/task_mmu.c | 1 + include/net/red.h | 4 +- kernel/workqueue.c | 2 +- net/batman-adv/translation-table.c | 2 + net/ieee802154/nl-mac.c | 7 +-- net/ieee802154/nl802154.c | 23 +++++++-- net/ipv4/netfilter/arp_tables.c | 2 + net/ipv4/netfilter/ip_tables.c | 2 + net/ipv6/netfilter/ip6_tables.c | 2 + net/ipv6/route.c | 8 +-- net/mac802154/llsec.c | 2 +- net/netfilter/x_tables.c | 10 +--- net/nfc/llcp_sock.c | 10 ++++ net/sched/sch_teql.c | 3 ++ net/tipc/socket.c | 2 +- net/wireless/sme.c | 2 +- sound/drivers/aloop.c | 11 ++-- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +-- tools/perf/util/map.c | 7 ++- 45 files changed, 245 insertions(+), 188 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/47 ARM: 8723/2: always assume the "unified" syntax for assembly code
From: Nicolas Pitre <[email protected]>
commit 75fea300d73ae5b18957949a53ec770daaeb6fc2 upstream.
The GNU assembler has implemented the "unified syntax" parsing since 2005. This "unified" syntax is required when the kernel is built in Thumb2 mode. However the "unified" syntax is a mixed bag of features, including not requiring a `#' prefix with immediate operands. This leads to situations where some code builds just fine in Thumb2 mode and fails to build in ARM mode if that prefix is missing. This behavior discrepancy makes build tests less valuable, forcing both ARM and Thumb2 builds for proper coverage.
Let's "fix" this issue by always using the "unified" syntax for both ARM and Thumb2 mode. Given that the documented minimum binutils version that properly builds the kernel is version 2.20 released in 2010, we can assume that any toolchain capable of building the latest kernel is also "unified syntax" capable.
Whith this, a bunch of macros used to mask some differences between both syntaxes can be removed, with the side effect of making LTO easier.
--- arch/arm/Kconfig | 7 --- arch/arm/Makefile | 6 ++- arch/arm/include/asm/unified.h | 77 +---------------------------------------- 3 files changed, 8 insertions(+), 82 deletions(-)
arch/arm/Kconfig +1 -6
@@ -1546,12 +1546,10 @@ config THUMB2_KERNEL depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K default y if CPU_THUMBONLY select AEABI - select ARM_ASM_UNIFIED select ARM_UNWIND help By enabling this option, the kernel will be compiled in - Thumb-2 mode. A compiler/assembler that understand the unified - ARM-Thumb syntax is needed. + Thumb-2 mode. If unsure, say N.
@@ -1586,9 +1584,6 @@ config THUMB2_AVOID_R_ARM_THM_JUMP11 Unless you are sure your tools don't have this problem, say Y. -config ARM_ASM_UNIFIED - bool - config ARM_PATCH_IDIV bool "Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()" depends on CPU_32v7 && !XIP_KERNEL
arch/arm/Makefile +4 -2
@@ -113,9 +113,11 @@ ifeq ($(CONFIG_ARM_UNWIND),y) CFLAGS_ABI +=-funwind-tables endif +# Accept old syntax despite ".syntax unified" +AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) + ifeq ($(CONFIG_THUMB2_KERNEL),y) AFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) -AFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) CFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) AFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb # Work around buggy relocation from gas if requested:
@@ -123,7 +125,7 @@ ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JU CFLAGS_MODULE +=-fno-optimize-sibling-calls endif else -CFLAGS_ISA :=$(call cc-option,-marm,) +CFLAGS_ISA :=$(call cc-option,-marm,) $(AFLAGS_NOWARN) AFLAGS_ISA :=$(CFLAGS_ISA) endif
arch/arm/include/asm/unified.h +3 -74
88 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 2/47 iio: hid-sensor-prox: Fix scale not correct issue
In reply to Greg Kroah-HartmanFrom: Ye Xiang <[email protected]>
commit d68c592e02f6f49a88e705f13dfc1883432cf300 upstream
Currently, the proxy sensor scale is zero because it just return the exponent directly. To fix this issue, this patch use hid_sensor_format_scale to process the scale first then return the output.
--- drivers/iio/light/hid-sensor-prox.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/iio/light/hid-sensor-prox.c +12 -2
@@ -37,6 +37,9 @@ struct prox_state {struct hid_sensor_common common_attributes;struct hid_sensor_hub_attribute_info prox_attr;u32 human_presence; +int scale_pre_decml; +int scale_post_decml; +int scale_precision; };/* Channel definitions */
@@ -105,8 +108,9 @@ static int prox_read_raw(struct iio_dev ret_type =IIO_VAL_INT ;break ;case IIO_CHAN_INFO_SCALE : - *val = prox_state->prox_attr.units; - ret_type =IIO_VAL_INT ; + *val = prox_state->scale_pre_decml; + *val2 = prox_state->scale_post_decml; + ret_type = prox_state->scale_precision;break ;case IIO_CHAN_INFO_OFFSET : *val = hid_sensor_convert_exponent(
@@ -240,6 +244,12 @@ static int prox_parse_report(struct plat st->common_attributes.sensitivity.index, st->common_attributes.sensitivity.report_id); } + + st->scale_precision =hid_sensor_format_scale ( + hsdev->usage, + &st->prox_attr, + &st->scale_pre_decml, &st->scale_post_decml); +return ret; }
Greg Kroah-Hartman
maintainerPATCH 3/47 ALSA: aloop: Fix initialization of controls
In reply to Greg Kroah-HartmanFrom: Jonas Holmberg <[email protected]>
commit 168632a495f49f33a18c2d502fc249d7610375e9 upstream.
Add a control to the card before copying the id so that the numid field is initialized in the copy. Otherwise the numid field of active_id, format_id, rate_id and channels_id will be the same (0) and snd_ctl_notify() will not queue the events properly.
--- sound/drivers/aloop.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
sound/drivers/aloop.c +8 -3
@@ -1062,6 +1062,14 @@ static int loopback_mixer_new(struct looreturn -ENOMEM ; kctl->id.device = dev; kctl->id.subdevice = substr; + +/* Add the control before copying the id so that +* the numid field of the id is set in the copy. +*/ + err =snd_ctl_add (card, kctl); +if (err <0 ) +return err; +switch (idx) {case ACTIVE_IDX : setup->active_id = kctl->id;
@@ -1078,9 +1086,6 @@ static int loopback_mixer_new(struct loodefault :break ; } - err =snd_ctl_add (card, kctl); -if (err <0 ) -return err; } } }
Greg Kroah-Hartman
maintainerPATCH 4/47 ASoC: intel: atom: Stop advertising non working S24LE support
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
commit aa65bacdb70e549a81de03ec72338e1047842883 upstream.
The SST firmware's media and deep-buffer inputs are hardcoded to S16LE, the corresponding DAIs don't have a hw_params callback and their prepare callback also does not take the format into account.
So far the advertising of non working S24LE support has not caused issues because pulseaudio defaults to S16LE, but changing pulse-audio's config to use S24LE will result in broken sound.
Pipewire is replacing pulse now and pipewire prefers S24LE over S16LE when available, causing the problem of the broken S24LE support to come to the surface now.
--- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/intel/atom/sst-mfld-platform-pcm.c +3 -3
@@ -508,14 +508,14 @@ static struct snd_soc_dai_driver sst_pla .channels_min = SST_STEREO, .channels_max = SST_STEREO, .rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .capture = { .stream_name = "Headset Capture", .channels_min = 1, .channels_max = 2, .rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, }, {
@@ -526,7 +526,7 @@ static struct snd_soc_dai_driver sst_pla .channels_min = SST_STEREO, .channels_max = SST_STEREO, .rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, }, }, {
Greg Kroah-Hartman
maintainerPATCH 5/47 nfc: fix refcount leak in llcp_sock_bind()
In reply to Greg Kroah-HartmanFrom: Xiaoming Ni <[email protected]>
commit c33b1cc62ac05c1dbb1cdafe2eb66da01c76ca8d upstream.
nfc_llcp_local_get() is invoked in llcp_sock_bind(),
but nfc_llcp_local_put() is not invoked in subsequent failure branches. As a result, refcount leakage occurs.
To fix it, add calling nfc_llcp_local_put().
fix CVE-2020-25670
--- net/nfc/llcp_sock.c | 2 ++ 1 file changed, 2 insertions(+)
net/nfc/llcp_sock.c +2 -0
@@ -119,11 +119,13 @@ static int llcp_sock_bind(struct socket llcp_sock->service_name_len, GFP_KERNEL);if (!llcp_sock->service_name) { +nfc_llcp_local_put (llcp_sock->local); ret = -ENOMEM ; goto put_dev; } llcp_sock->ssap =nfc_llcp_get_sdp_ssap (local, llcp_sock);if (llcp_sock->ssap ==LLCP_SAP_MAX ) { +nfc_llcp_local_put (llcp_sock->local);kfree (llcp_sock->service_name); llcp_sock->service_name =NULL ; ret = -EADDRINUSE ;
Greg Kroah-Hartman
maintainerPATCH 6/47 nfc: fix refcount leak in llcp_sock_connect()
In reply to Greg Kroah-HartmanFrom: Xiaoming Ni <[email protected]>
commit 8a4cd82d62b5ec7e5482333a72b58a4eea4979f0 upstream.
nfc_llcp_local_get() is invoked in llcp_sock_connect(),
but nfc_llcp_local_put() is not invoked in subsequent failure branches. As a result, refcount leakage occurs.
To fix it, add calling nfc_llcp_local_put().
fix CVE-2020-25671
--- net/nfc/llcp_sock.c | 2 ++ 1 file changed, 2 insertions(+)
net/nfc/llcp_sock.c +2 -0
@@ -716,6 +716,7 @@ static int llcp_sock_connect(struct sock llcp_sock->local =nfc_llcp_local_get (local); llcp_sock->ssap =nfc_llcp_get_local_ssap (local);if (llcp_sock->ssap ==LLCP_SAP_MAX ) { +nfc_llcp_local_put (llcp_sock->local); ret = -ENOMEM ; goto put_dev; }
@@ -753,6 +754,7 @@ static int llcp_sock_connect(struct sock sock_unlink:nfc_llcp_put_ssap (local, llcp_sock->ssap); +nfc_llcp_local_put (llcp_sock->local);nfc_llcp_sock_unlink (&local->connecting_sockets, sk);
Greg Kroah-Hartman
maintainerPATCH 7/47 nfc: fix memory leak in llcp_sock_connect()
In reply to Greg Kroah-HartmanFrom: Xiaoming Ni <[email protected]>
commit 7574fcdbdcb335763b6b322f6928dc0fd5730451 upstream.
In llcp_sock_connect(), use kmemdup to allocate memory for
"llcp_sock->service_name". The memory is not released in the sock_unlink
label of the subsequent failure branch.
As a result, memory leakage occurs.
fix CVE-2020-25672
--- net/nfc/llcp_sock.c | 2 ++ 1 file changed, 2 insertions(+)
net/nfc/llcp_sock.c +2 -0
@@ -757,6 +757,8 @@ sock_unlink:nfc_llcp_local_put (llcp_sock->local);nfc_llcp_sock_unlink (&local->connecting_sockets, sk); +kfree (llcp_sock->service_name); + llcp_sock->service_name =NULL ; put_dev:nfc_put_device (dev);
Greg Kroah-Hartman
maintainerPATCH 8/47 nfc: Avoid endless loops caused by repeated llcp_sock_connect()
In reply to Greg Kroah-HartmanFrom: Xiaoming Ni <[email protected]>
commit 4b5db93e7f2afbdfe3b78e37879a85290187e6f1 upstream.
When sock_wait_state() returns -EINPROGRESS, "sk->sk_state" is
LLCP_CONNECTING. In this case, llcp_sock_connect() is repeatedly invoked, nfc_llcp_sock_link() will add sk to local->connecting_sockets twice. sk->sk_node->next will point to itself, that will make an endless loop and hang-up the system.
To fix it, check whether sk->sk_state is LLCP_CONNECTING in
llcp_sock_connect() to avoid repeated invoking.
--- net/nfc/llcp_sock.c | 4 ++++ 1 file changed, 4 insertions(+)
net/nfc/llcp_sock.c +4 -0
@@ -685,6 +685,10 @@ static int llcp_sock_connect(struct sock ret = -EISCONN ; goto error; } +if (sk->sk_state ==LLCP_CONNECTING ) { + ret = -EINPROGRESS ; + goto error; + } dev =nfc_get_device (addr->dev_idx);if (dev ==NULL ) {
Greg Kroah-Hartman
maintainerPATCH 9/47 xen/evtchn: Change irq_info lock to raw_spinlock_t
In reply to Greg Kroah-HartmanFrom: Luca Fancellu <[email protected]>
commit d120198bd5ff1d41808b6914e1eb89aff937415c upstream.
Unmask operation must be called with interrupt disabled, on preempt_rt spin_lock_irqsave/spin_unlock_irqrestore don't disable/enable interrupts, so use raw_* implementation and change lock variable in struct irq_info from spinlock_t to raw_spinlock_t
--- drivers/xen/events/events_base.c | 10 +++++----- drivers/xen/events/events_internal.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/xen/events/events_base.c +5 -5
@@ -222,7 +222,7 @@ static int xen_irq_info_common_setup(str info->evtchn = evtchn; info->cpu = cpu; info->mask_reason =EVT_MASK_REASON_EXPLICIT ; -spin_lock_init (&info->lock); +raw_spin_lock_init (&info->lock); ret =set_evtchn_to_irq (evtchn, irq);if (ret <0 )
@@ -374,28 +374,28 @@ static void do_mask(struct irq_info *inf {unsigned long flags; -spin_lock_irqsave (&info->lock, flags); +raw_spin_lock_irqsave (&info->lock, flags);if (!info->mask_reason)mask_evtchn (info->evtchn); info->mask_reason |= reason; -spin_unlock_irqrestore (&info->lock, flags); +raw_spin_unlock_irqrestore (&info->lock, flags); }static void do_unmask (struct irq_info *info,u8 reason) {unsigned long flags; -spin_lock_irqsave (&info->lock, flags); +raw_spin_lock_irqsave (&info->lock, flags); info->mask_reason &= ~reason;if (!info->mask_reason)unmask_evtchn (info->evtchn); -spin_unlock_irqrestore (&info->lock, flags); +raw_spin_unlock_irqrestore (&info->lock, flags); }#ifdef CONFIG_X86
drivers/xen/events/events_internal.h +1 -1
@@ -47,7 +47,7 @@ struct irq_info {unsigned short eoi_cpu;/* EOI must happen on this cpu */ unsigned int irq_epoch;/* If eoi_cpu valid: irq_epoch of event */ u64 eoi_time;/* Time in jiffies when to EOI. */ -spinlock_t lock; +raw_spinlock_t lock;union {unsigned short virq;
Greg Kroah-Hartman
maintainerPATCH 10/47 net: ipv6: check for validity before dereferencing cfg->fc_nlinfo.nlh
In reply to Greg Kroah-HartmanFrom: Muhammad Usama Anjum <[email protected]>
commit 864db232dc7036aa2de19749c3d5be0143b24f8f upstream.
nlh is being checked for validtity two times when it is dereferenced in this function. Check for validity again when updating the flags through nlh pointer to make the dereferencing safe.
CC: <[email protected]>
Addresses-Coverity: ("NULL pointer dereference")
--- net/ipv6/route.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
net/ipv6/route.c +5 -3
@@ -3069,9 +3069,11 @@ static int ip6_route_multipath_add(struc* nexthops have been replaced by first new, the rest should * be added to it. */ - cfg->fc_nlinfo.nlh->nlmsg_flags &= ~(NLM_F_EXCL | -NLM_F_REPLACE ); - cfg->fc_nlinfo.nlh->nlmsg_flags |=NLM_F_CREATE ; +if (cfg->fc_nlinfo.nlh) { + cfg->fc_nlinfo.nlh->nlmsg_flags &= ~(NLM_F_EXCL | +NLM_F_REPLACE ); + cfg->fc_nlinfo.nlh->nlmsg_flags |=NLM_F_CREATE ; + } nhn++; }
Greg Kroah-Hartman
maintainerPATCH 11/47 ia64: fix user_stack_pointer() for ptrace()
In reply to Greg Kroah-HartmanFrom: Sergei Trofimovich <[email protected]>
commit 7ad1e366167837daeb93d0bacb57dee820b0b898 upstream.
ia64 has two stacks:
- memory stack (or stack), pointed at by by r12
- register backing store (register stack), pointed at by ar.bsp/ar.bspstore with complications around dirty register frame on CPU.
In [1] Dmitry noticed that PTRACE_GET_SYSCALL_INFO returns the register stack instead memory stack.
The bug comes from the fact that user_stack_pointer() and current_user_stack_pointer() don't return the same register:
ulong user_stack_pointer(struct pt_regs *regs) { return regs->ar_bspstore; }
#define current_user_stack_pointer() (current_pt_regs()->r12)The change gets both back in sync.
I think ptrace(PTRACE_GET_SYSCALL_INFO) is the only affected user by this bug on ia64.
The change fixes 'rt_sigreturn.gen.test' strace test where it was observed initially.
--- arch/ia64/include/asm/ptrace.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
arch/ia64/include/asm/ptrace.h +1 -7
@@ -53,8 +53,7 @@static inline unsigned long user_stack_pointer (struct pt_regs *regs) { -/* FIXME: should this be bspstore + nr_dirty regs? */ -return regs->ar_bspstore; +return regs->r12; }static inline int is_syscall_success (struct pt_regs *regs)
@@ -78,11 +77,6 @@ static inline long regs_return_value(strunsigned long __ip =instruction_pointer (regs); \ (__ip & ~3UL ) + ((__ip &3UL ) <<2 ); \ }) -/* -* Why not default? Because user_stack_pointer() on ia64 gives register -* stack backing store instead... -*/ -#define current_user_stack_pointer () (current_pt_regs()->r12)/* given a pointer to a task_struct, return the user's pt_regs */ # define task_pt_regs (t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1)
Greg Kroah-Hartman
maintainerPATCH 12/47 ocfs2: fix deadlock between setattr and dio_end_io_write
In reply to Greg Kroah-HartmanFrom: Wengang Wang <[email protected]>
commit 90bd070aae6c4fb5d302f9c4b9c88be60c8197ec upstream.
The following deadlock is detected:
truncate -> setattr path is waiting for pending direct IO to be done (inode->i_dio_count become zero) with inode->i_rwsem held (down_write).
PID: 14827 TASK: ffff881686a9af80 CPU: 20 COMMAND: "ora_p005_hrltd9"
#0 __schedule at ffffffff818667cc #1 schedule at ffffffff81866de6 #2 inode_dio_wait at ffffffff812a2d04 #3 ocfs2_setattr at ffffffffc05f322e [ocfs2] #4 notify_change at ffffffff812a5a09 #5 do_truncate at ffffffff812808f5 #6 do_sys_ftruncate.constprop.18 at ffffffff81280cf2 #7 sys_ftruncate at ffffffff81280d8e #8 do_syscall_64 at ffffffff81003949 #9 entry_SYSCALL_64_after_hwframe at ffffffff81a001ad
dio completion path is going to complete one direct IO (decrement inode->i_dio_count), but before that it hung at locking inode->i_rwsem:
#0 __schedule+700 at ffffffff818667cc #1 schedule+54 at ffffffff81866de6 #2 rwsem_down_write_failed+536 at ffffffff8186aa28 #3 call_rwsem_down_write_failed+23 at ffffffff8185a1b7 #4 down_write+45 at ffffffff81869c9d #5 ocfs2_dio_end_io_write+180 at ffffffffc05d5444 [ocfs2] #6 ocfs2_dio_end_io+85 at ffffffffc05d5a85 [ocfs2] #7 dio_complete+140 at ffffffff812c873c #8 dio_aio_complete_work+25 at ffffffff812c89f9 #9 process_one_work+361 at ffffffff810b1889 #10 worker_thread+77 at ffffffff810b233d #11 kthread+261 at ffffffff810b7fd5 #12 ret_from_fork+62 at ffffffff81a0035e
Thus above forms ABBA deadlock. The same deadlock was mentioned in upstream commit 28f5a8a7c033 ("ocfs2: should wait dio before inode lock in ocfs2_setattr()"). It seems that that commit only removed the cluster lock (the victim of above dead lock) from the ABBA deadlock party.
End-user visible effects: Process hang in truncate -> ocfs2_setattr path and other processes hang at ocfs2_dio_end_io_write path.
This is to fix the deadlock itself. It removes inode_lock() call from dio completion path to remove the deadlock and add ip_alloc_sem lock in setattr path to synchronize the inode modifications.
--- fs/ocfs2/aops.c | 11 +---------- fs/ocfs2/file.c | 8 ++++++-- 2 files changed, 7 insertions(+), 12 deletions(-)
fs/ocfs2/aops.c +1 -10
@@ -2301,7 +2301,7 @@ static void ocfs2_dio_end_io_write(strucstruct ocfs2_alloc_context *meta_ac =NULL ;handle_t *handle =NULL ;loff_t end = offset + bytes; -int ret =0 , credits =0 , locked =0 ; +int ret =0 , credits =0 ;ocfs2_init_dealloc_ctxt (&dealloc);
@@ -2312,13 +2312,6 @@ static void ocfs2_dio_end_io_write(struc !dwc->dw_orphaned) goto out; -/* ocfs2_file_write_iter will get i_mutex, so we need not lock if we -* are in that context. */ -if (dwc->dw_writer_pid !=task_pid_nr (current)) { -inode_lock (inode); - locked =1 ; - } - ret =ocfs2_inode_lock (inode, &di_bh,1 );if (ret <0 ) {mlog_errno (ret);
@@ -2393,8 +2386,6 @@ out:if (meta_ac)ocfs2_free_alloc_context (meta_ac);ocfs2_run_deallocs (osb, &dealloc); -if (locked) -inode_unlock (inode);ocfs2_dio_free_write_ctx (inode, dwc); }
fs/ocfs2/file.c +6 -2
@@ -1236,22 +1236,24 @@ int ocfs2_setattr(struct dentry *dentry, goto bail_unlock; } } +down_write (&OCFS2_I (inode)->ip_alloc_sem); handle =ocfs2_start_trans (osb,OCFS2_INODE_UPDATE_CREDITS +2 *ocfs2_quota_trans_credits (sb));if (IS_ERR (handle)) { status =PTR_ERR (handle);mlog_errno (status); - goto bail_unlock; + goto bail_unlock_alloc; } status =__dquot_transfer (inode, transfer_to);if (status <0 ) goto bail_commit; }else { +down_write (&OCFS2_I (inode)->ip_alloc_sem); handle =ocfs2_start_trans (osb,OCFS2_INODE_UPDATE_CREDITS );if (IS_ERR (handle)) { status =PTR_ERR (handle);mlog_errno (status); - goto bail_unlock; + goto bail_unlock_alloc; } }
@@ -1264,6 +1266,8 @@ int ocfs2_setattr(struct dentry *dentry, bail_commit:ocfs2_commit_trans (osb, handle); +bail_unlock_alloc: +up_write (&OCFS2_I (inode)->ip_alloc_sem); bail_unlock:if (status) {ocfs2_inode_unlock (inode,1 );
Greg Kroah-Hartman
maintainerPATCH 13/47 fs: direct-io: fix missing sdio->boundary
In reply to Greg Kroah-HartmanFrom: Jack Qiu <[email protected]>
commit df41872b68601059dd4a84858952dcae58acd331 upstream.
I encountered a hung task issue, but not a performance one. I run DIO on a device (need lba continuous, for example open channel ssd), maybe hungtask in below case:
DIO: Checkpoint:
get addr A(at boundary), merge into BIO,
no submit because boundary missing
flush dirty data(get addr A+1), wait IO(A+1) writeback timeout, because DIO(A) didn't submit
get addr A+2 fail, because checkpoint is doing
dio_send_cur_page() may clear sdio->boundary, so prevent it from missing a boundary.
--- fs/direct-io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/direct-io.c +3 -2
@@ -793,6 +793,7 @@ submit_page_section(struct dio *dio, str struct buffer_head *map_bh) {int ret =0 ; +int boundary = sdio->boundary;/* dio_send_cur_page may clear it */ if (dio->op ==REQ_OP_WRITE ) {/*
@@ -831,10 +832,10 @@ submit_page_section(struct dio *dio, str sdio->cur_page_fs_offset = sdio->block_in_file << sdio->blkbits; out:/* -* If sdio->boundary then we want to schedule the IO now to +* If boundary then we want to schedule the IO now to * avoid metadata seeks. */ -if (sdio->boundary) { +if (boundary) { ret =dio_send_cur_page (dio, sdio, map_bh);if (sdio->bio)dio_bio_submit (dio, sdio);
Greg Kroah-Hartman
maintainerPATCH 14/47 parisc: parisc-agp requires SBA IOMMU driver
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
commit 9054284e8846b0105aad43a4e7174ca29fffbc44 upstream.
Add a dependency to the SBA IOMMU driver to avoid:
ERROR: modpost: "sba_list" [drivers/char/agp/parisc-agp.ko] undefined!
--- drivers/char/agp/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/agp/Kconfig +1 -1
@@ -124,7 +124,7 @@ config AGP_HP_ZX1 config AGP_PARISC tristate "HP Quicksilver AGP support" - depends on AGP && PARISC && 64BIT + depends on AGP && PARISC && 64BIT && IOMMU_SBA help This option gives you AGP GART support for the HP Quicksilver AGP bus adapter on HP PA-RISC machines (Ok, just on the C8000
Greg Kroah-Hartman
maintainerPATCH 15/47 parisc: avoid a warning on u8 cast for cmpxchg on u8 pointers
In reply to Greg Kroah-HartmanFrom: Gao Xiang <[email protected]>
commit 4d752e5af63753ab5140fc282929b98eaa4bd12e upstream.
commit b344d6a83d01 ("parisc: add support for cmpxchg on u8 pointers") can generate a sparse warning ("cast truncates bits from constant value"), which has been reported several times [1] [2] [3].
The original code worked as expected, but anyway, let silence such sparse warning as what others did [4].
[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
[3] https://lore.kernel.org/r/202008210829.KVwn7Xeh%[email protected]
[4] https://lore.kernel.org/r/[email protected]
--- arch/parisc/include/asm/cmpxchg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/parisc/include/asm/cmpxchg.h +1 -1
@@ -71,7 +71,7 @@ __cmpxchg(volatile void *ptr, unsigned l#endif case 4 :return __cmpxchg_u32 ((unsigned int *)ptr, (unsigned int )old, (unsigned int )new_); -case 1 :return __cmpxchg_u8 ((u8 *)ptr, (u8 )old, (u8 )new_); +case 1 :return __cmpxchg_u8 ((u8 *)ptr, old &0xff , new_ &0xff ); }__cmpxchg_called_with_bad_pointer ();return old;
Greg Kroah-Hartman
maintainerPATCH 16/47 batman-adv: initialize "struct batadv_tvlv_tt_vlan_data"->reserved field
In reply to Greg Kroah-HartmanFrom: Tetsuo Handa <[email protected]>
commit 08c27f3322fec11950b8f1384aa0f3b11d028528 upstream.
KMSAN found uninitialized value at batadv_tt_prepare_tvlv_local_data() [1], for commit ced72933a5e8ab52 ("batman-adv: use CRC32C instead of CRC16 in TT code") inserted 'reserved' field into "struct batadv_tvlv_tt_data" and commit 7ea7b4a142758dea ("batman-adv: make the TT CRC logic VLAN specific") moved that field to "struct batadv_tvlv_tt_vlan_data" but left that field uninitialized.
[1] https://syzkaller.appspot.com/bug?id=07f3e6dba96f0eb3cabab986adcd8a58b9bdbe9d
--- net/batman-adv/translation-table.c | 2 ++ 1 file changed, 2 insertions(+)
net/batman-adv/translation-table.c +2 -0
@@ -897,6 +897,7 @@ batadv_tt_prepare_tvlv_global_data(struchlist_for_each_entry_rcu (vlan, &orig_node->vlan_list, list) { tt_vlan->vid =htons (vlan->vid); tt_vlan->crc =htonl (vlan->tt.crc); + tt_vlan->reserved =0 ; tt_vlan++; }
@@ -980,6 +981,7 @@ batadv_tt_prepare_tvlv_local_data(struct tt_vlan->vid =htons (vlan->vid); tt_vlan->crc =htonl (vlan->tt.crc); + tt_vlan->reserved =0 ; tt_vlan++; }
Greg Kroah-Hartman
maintainerPATCH 17/47 net: sched: sch_teql: fix null-pointer dereference
In reply to Greg Kroah-HartmanFrom: Pavel Tikhomirov <[email protected]>
commit 1ffbc7ea91606e4abd10eb60de5367f1c86daf5e upstream.
Reproduce:
modprobe sch_teql
tc qdisc add dev teql0 root teql0
This leads to (for instance in Centos 7 VM) OOPS:
[ 532.366633] BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8 [ 532.366733] IP: [<ffffffffc06124a8>] teql_destroy+0x18/0x100 [sch_teql] [ 532.366825] PGD 80000001376d5067 PUD 137e37067 PMD 0 [ 532.366906] Oops: 0000 [#1] SMP [ 532.366987] Modules linked in: sch_teql ... [ 532.367945] CPU: 1 PID: 3026 Comm: tc Kdump: loaded Tainted: G ------------ T 3.10.0-1062.7.1.el7.x86_64 #1 [ 532.368041] Hardware name: Virtuozzo KVM, BIOS 1.11.0-2.vz7.2 04/01/2014 [ 532.368125] task: ffff8b7d37d31070 ti: ffff8b7c9fdbc000 task.ti: ffff8b7c9fdbc000 [ 532.368224] RIP: 0010:[<ffffffffc06124a8>] [<ffffffffc06124a8>] teql_destroy+0x18/0x100 [sch_teql] [ 532.368320] RSP: 0018:ffff8b7c9fdbf8e0 EFLAGS: 00010286 [ 532.368394] RAX: ffffffffc0612490 RBX: ffff8b7cb1565e00 RCX: ffff8b7d35ba2000 [ 532.368476] RDX: ffff8b7d35ba2000 RSI: 0000000000000000 RDI: ffff8b7cb1565e00 [ 532.368557] RBP: ffff8b7c9fdbf8f8 R08: ffff8b7d3fd1f140 R09: ffff8b7d3b001600 [ 532.368638] R10: ffff8b7d3b001600 R11: ffffffff84c7d65b R12: 00000000ffffffd8 [ 532.368719] R13: 0000000000008000 R14: ffff8b7d35ba2000 R15: ffff8b7c9fdbf9a8 [ 532.368800] FS: 00007f6a4e872740(0000) GS:ffff8b7d3fd00000(0000) knlGS:0000000000000000 [ 532.368885] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 532.368961] CR2: 00000000000000a8 CR3: 00000001396ee000 CR4: 00000000000206e0 [ 532.369046] Call Trace: [ 532.369159] [<ffffffff84c8192e>] qdisc_create+0x36e/0x450 [ 532.369268] [<ffffffff846a9b49>] ? ns_capable+0x29/0x50 [ 532.369366] [<ffffffff849afde2>] ? nla_parse+0x32/0x120 [ 532.369442] [<ffffffff84c81b4c>] tc_modify_qdisc+0x13c/0x610 [ 532.371508] [<ffffffff84c693e7>] rtnetlink_rcv_msg+0xa7/0x260 [ 532.372668] [<ffffffff84907b65>] ? sock_has_perm+0x75/0x90 [ 532.373790] [<ffffffff84c69340>] ? rtnl_newlink+0x890/0x890 [ 532.374914] [<ffffffff84c8da7b>] netlink_rcv_skb+0xab/0xc0 [ 532.376055] [<ffffffff84c63708>] rtnetlink_rcv+0x28/0x30 [ 532.377204] [<ffffffff84c8d400>] netlink_unicast+0x170/0x210 [ 532.378333] [<ffffffff84c8d7a8>] netlink_sendmsg+0x308/0x420 [ 532.379465] [<ffffffff84c2f3a6>] sock_sendmsg+0xb6/0xf0 [ 532.380710] [<ffffffffc034a56e>] ? __xfs_filemap_fault+0x8e/0x1d0 [xfs] [ 532.381868] [<ffffffffc034a75c>] ? xfs_filemap_fault+0x2c/0x30 [xfs] [ 532.383037] [<ffffffff847ec23a>] ? __do_fault.isra.61+0x8a/0x100 [ 532.384144] [<ffffffff84c30269>] ___sys_sendmsg+0x3e9/0x400 [ 532.385268] [<ffffffff847f3fad>] ? handle_mm_fault+0x39d/0x9b0 [ 532.386387] [<ffffffff84d88678>] ? __do_page_fault+0x238/0x500 [ 532.387472] [<ffffffff84c31921>] __sys_sendmsg+0x51/0x90 [ 532.388560] [<ffffffff84c31972>] SyS_sendmsg+0x12/0x20 [ 532.389636] [<ffffffff84d8dede>] system_call_fastpath+0x25/0x2a [ 532.390704] [<ffffffff84d8de21>] ? system_call_after_swapgs+0xae/0x146 [ 532.391753] Code: 00 00 00 00 00 00 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 89 e5 41 55 41 54 53 48 8b b7 48 01 00 00 48 89 fb <48> 8b 8e a8 00 00 00 48 85 c9 74 43 48 89 ca eb 0f 0f 1f 80 00 [ 532.394036] RIP [<ffffffffc06124a8>] teql_destroy+0x18/0x100 [sch_teql] [ 532.395127] RSP <ffff8b7c9fdbf8e0> [ 532.396179] CR2: 00000000000000a8
Null pointer dereference happens on master->slaves dereference in teql_destroy() as master is null-pointer.
When qdisc_create() calls teql_qdisc_init() it imediately fails after check "if (m->dev == dev)" because both devices are teql0, and it does not set qdisc_priv(sch)->m leaving it zero on error path, then qdisc_create() imediately calls teql_destroy() which does not expect zero master pointer and we get OOPS.
--- net/sched/sch_teql.c | 3 +++ 1 file changed, 3 insertions(+)
net/sched/sch_teql.c +3 -0
@@ -138,6 +138,9 @@ teql_destroy(struct Qdisc *sch)struct teql_sched_data *dat =qdisc_priv (sch);struct teql_master *master = dat->m; +if (!master) +return ; + prev = master->slaves;if (prev) { do {
Greg Kroah-Hartman
maintainerPATCH 18/47 sch_red: fix off-by-one checks in red_check_params()
In reply to Greg Kroah-HartmanFrom: Eric Dumazet <[email protected]>
[ Upstream commit 3a87571f0ffc51ba3bf3ecdb6032861d0154b164 ]
This fixes following syzbot report:
UBSAN: shift-out-of-bounds in ./include/net/red.h:237:23 shift exponent 32 is too large for 32-bit type 'unsigned int' CPU: 1 PID: 8418 Comm: syz-executor170 Not tainted 5.12.0-rc4-next-20210324-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:327 red_set_parms include/net/red.h:237 [inline] choke_change.cold+0x3c/0xc8 net/sched/sch_choke.c:414 qdisc_create+0x475/0x12f0 net/sched/sch_api.c:1247 tc_modify_qdisc+0x4c8/0x1a50 net/sched/sch_api.c:1663 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x43f039 Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffdfa725168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043f039 RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000004 RBP: 0000000000403020 R08: 0000000000400488 R09: 0000000000400488 R10: 0000000000400488 R11: 0000000000000246 R12: 00000000004030b0 R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488
--- include/net/red.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/net/red.h +2 -2
@@ -170,9 +170,9 @@ static inline void red_set_vars(struct red_vars *v)static inline bool red_check_params (u32 qth_min,u32 qth_max,u8 Wlog,u8 Scell_log,u8 *stab) { -if (fls (qth_min) + Wlog >32 ) +if (fls (qth_min) + Wlog >=32 )return false; -if (fls (qth_max) + Wlog >32 ) +if (fls (qth_max) + Wlog >=32 )return false;if (Scell_log >=32 )return false;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 19/47 gianfar: Handle error code at MAC address change
In reply to Greg Kroah-HartmanFrom: Claudiu Manoil <[email protected]>
[ Upstream commit bff5b62585123823842833ab20b1c0a7fa437f8c ]
Handle return error code of eth_mac_addr();
--- drivers/net/ethernet/freescale/gianfar.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/ethernet/freescale/gianfar.c +5 -1
@@ -485,7 +485,11 @@ static struct net_device_stats *gfar_get_stats(struct net_device *dev)static int gfar_set_mac_addr (struct net_device *dev,void *p) { -eth_mac_addr (dev, p); +int ret; + + ret =eth_mac_addr (dev, p); +if (ret) +return ret;gfar_set_mac_for_addr (dev,0 , dev->dev_addr);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 20/47 net:tipc: Fix a double free in tipc_sk_mcast_rcv
In reply to Greg Kroah-HartmanFrom: Lv Yunlong <[email protected]>
[ Upstream commit 6bf24dc0cc0cc43b29ba344b66d78590e687e046 ]
In the if(skb_peek(arrvq) == skb) branch, it calls __skb_dequeue(arrvq) to get the skb by skb = skb_peek(arrvq). Then __skb_dequeue() unlinks the skb from arrvq and returns the skb which equals to skb_peek(arrvq). After __skb_dequeue(arrvq) finished, the skb is freed by kfree_skb(__skb_dequeue(arrvq)) in the first time.
Unfortunately, the same skb is freed in the second time by kfree_skb(skb) after the branch completed.
My patch removes kfree_skb() in the if(skb_peek(arrvq) == skb) branch, because this skb will be freed by kfree_skb(skb) finally.
--- net/tipc/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/socket.c +1 -1
@@ -741,7 +741,7 @@ void tipc_sk_mcast_rcv(struct net *net, struct sk_buff_head *arrvq,spin_lock_bh (&inputq->lock);if (skb_peek (arrvq) == skb) {skb_queue_splice_tail_init (&tmpq, inputq); -kfree_skb (__skb_dequeue (arrvq)); +__skb_dequeue (arrvq); }spin_unlock_bh (&inputq->lock);__skb_queue_purge (&tmpq);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 21/47 soc/fsl: qbman: fix conflicting alignment attributes
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit 040f31196e8b2609613f399793b9225271b79471 ]
When building with W=1, gcc points out that the __packed attribute on struct qm_eqcr_entry conflicts with the 8-byte alignment attribute on struct qm_fd inside it:
drivers/soc/fsl/qbman/qman.c:189:1: error: alignment 1 of 'struct qm_eqcr_entry' is less than 8 [-Werror=packed-not-aligned]
I assume that the alignment attribute is the correct one, and that qm_eqcr_entry cannot actually be unaligned in memory, so add the same alignment on the outer struct.
--- drivers/soc/fsl/qbman/qman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/fsl/qbman/qman.c +1 -1
@@ -146,7 +146,7 @@ struct qm_eqcr_entry {u32 tag;struct qm_fd fd;u8 __reserved3[32 ]; -} __packed; +} __packed__aligned(8) ;#define QM_EQCR_VERB_VBIT 0x80#define QM_EQCR_VERB_CMD_MASK 0x61/* but only one value; */ #define QM_EQCR_VERB_CMD_ENQUEUE 0x01
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 22/47 clk: fix invalid usage of list cursor in unregister
In reply to Greg Kroah-HartmanFrom: Lukasz Bartosik <[email protected]>
[ Upstream commit 7045465500e465b09f09d6e5bdc260a9f1aab97b ]
Fix invalid usage of a list_for_each_entry cursor in clk_notifier_unregister(). When list is empty or if the list is completely traversed (without breaking from the loop on one of the entries) then the list cursor does not point to a valid entry and therefore should not be used. The patch fixes a logical bug that hasn't been seen in pratice however it is analogus to the bug fixed in clk_notifier_register().
The issue was dicovered when running 5.12-rc1 kernel on x86_64 with KASAN enabled:
BUG: KASAN: global-out-of-bounds in clk_notifier_register+0xab/0x230
Read of size 8 at addr ffffffffa0d10588 by task swapper/0/1
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.12.0-rc1 #1
Hardware name: Google Caroline/Caroline,
BIOS Google_Caroline.7820.430.0 07/20/2018
Call Trace:
dump_stack+0xee/0x15c
print_address_description+0x1e/0x2dc
kasan_report+0x188/0x1ce
? clk_notifier_register+0xab/0x230
? clk_prepare_lock+0x15/0x7b
? clk_notifier_register+0xab/0x230
clk_notifier_register+0xab/0x230
dw8250_probe+0xc01/0x10d4
...
Memory state around the buggy address:
ffffffffa0d10480: 00 00 00 00 00 03 f9 f9 f9 f9 f9 f9 00 00 00 00
ffffffffa0d10500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9
>ffffffffa0d10580: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
^
ffffffffa0d10600: 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00
ffffffffa0d10680: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 00 00 00 00
==================================================================--- drivers/clk/clk.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-)
drivers/clk/clk.c +13 -17
@@ -2990,32 +2990,28 @@ EXPORT_SYMBOL_GPL(clk_notifier_register);*/ int clk_notifier_unregister (struct clk *clk,struct notifier_block *nb) { -struct clk_notifier *cn =NULL ; -int ret = -EINVAL ; +struct clk_notifier *cn; +int ret = -ENOENT ;if (!clk || !nb)return -EINVAL ;clk_prepare_lock (); -list_for_each_entry (cn, &clk_notifier_list, node) -if (cn->clk == clk) -break ; - -if (cn->clk == clk) { - ret =srcu_notifier_chain_unregister (&cn->notifier_head, nb); +list_for_each_entry (cn, &clk_notifier_list, node) { +if (cn->clk == clk) { + ret =srcu_notifier_chain_unregister (&cn->notifier_head, nb); - clk->core->notifier_count--; + clk->core->notifier_count--; -/* XXX the notifier code should handle this better */ -if (!cn->notifier_head.head) { -srcu_cleanup_notifier_head (&cn->notifier_head); -list_del (&cn->node); -kfree (cn); +/* XXX the notifier code should handle this better */ +if (!cn->notifier_head.head) { +srcu_cleanup_notifier_head (&cn->notifier_head); +list_del (&cn->node); +kfree (cn); + } +break ; } - - }else { - ret = -ENOENT ; }clk_prepare_unlock ();
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 23/47 workqueue: Move the position of debug_work_activate() in __queue_work()
In reply to Greg Kroah-HartmanFrom: Zqiang <[email protected]>
[ Upstream commit 0687c66b5f666b5ad433f4e94251590d9bc9d10e ]
The debug_work_activate() is called on the premise that the work can be inserted, because if wq be in WQ_DRAINING status, insert work may be failed.
--- kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/workqueue.c +1 -1
@@ -1377,7 +1377,6 @@ static void __queue_work(int cpu, struct workqueue_struct *wq,*/ WARN_ON_ONCE (!irqs_disabled ()); -debug_work_activate (work);/* if draining, only works from the same workqueue are allowed */ if (unlikely(wq->flags & __WQ_DRAINING) &&
@@ -1460,6 +1459,7 @@ retry: worklist = &pwq->delayed_works; } +debug_work_activate (work);insert_work (pwq, work, worklist, work_flags);spin_unlock (&pwq->pool->lock);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 24/47 s390/cpcmd: fix inline assembly register clobbering
In reply to Greg Kroah-HartmanFrom: Alexander Gordeev <[email protected]>
[ Upstream commit 7a2f91441b2c1d81b77c1cd816a4659f4abc9cbe ]
Register variables initialized using arithmetic. That leads to kasan instrumentaton code corrupting the registers contents. Follow GCC guidlines and use temporary variables for assigning init values to register variables.
--- arch/s390/kernel/cpcmd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
arch/s390/kernel/cpcmd.c +4 -2
@@ -37,10 +37,12 @@ static int diag8_noresponse(int cmdlen)static int diag8_response (int cmdlen,char *response,int *rlen) { +unsigned long _cmdlen = cmdlen |0x40000000L ; +unsigned long _rlen = *rlen; register unsigned long reg2 asm ("2") = (addr_t) cpcmd_buf; register unsigned long reg3 asm ("3") = (addr_t) response; - register unsigned long reg4 asm ("4") = cmdlen | 0x40000000L; - register unsigned long reg5 asm ("5") = *rlen; + register unsigned long reg4 asm ("4") = _cmdlen; + register unsigned long reg5 asm ("5") = _rlen; asmvolatile ( " sam31\n"
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 25/47 RDMA/cxgb4: check for ipv6 address properly while destroying listener
In reply to Greg Kroah-HartmanFrom: Potnuri Bharat Teja <[email protected]>
[ Upstream commit 603c4690b01aaffe3a6c3605a429f6dac39852ae ]
ipv6 bit is wrongly set by the below which causes fatal adapter lookup engine errors for ipv4 connections while destroying a listener. Fix it to properly check the local address for ipv6.
--- drivers/infiniband/hw/cxgb4/cm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/hw/cxgb4/cm.c +2 -1
@@ -3478,7 +3478,8 @@ int c4iw_destroy_listen(struct iw_cm_id *cm_id)c4iw_init_wr_wait (&ep->com.wr_wait); err =cxgb4_remove_server ( ep->com.dev->rdev.lldi.ports[0 ], ep->stid, - ep->com.dev->rdev.lldi.rxq_ids[0 ], true); + ep->com.dev->rdev.lldi.rxq_ids[0 ], + ep->com.local_addr.ss_family ==AF_INET6 );if (err) goto done; err = c4iw_wait_for_reply(&ep->com.dev->rdev, &ep->com.wr_wait,
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 26/47 clk: socfpga: fix iomem pointer cast on 64-bit
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
commit 2867b9746cef78745c594894aece6f8ef826e0b4 upstream.
Pointers should be cast with uintptr_t instead of integer. This fixes warning when compile testing on ARM64:
drivers/clk/socfpga/clk-gate.c: In function ‘socfpga_clk_recalc_rate’:
drivers/clk/socfpga/clk-gate.c:102:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
--- drivers/clk/socfpga/clk-gate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/socfpga/clk-gate.c +1 -1
@@ -107,7 +107,7 @@ static unsigned long socfpga_clk_recalc_ val =readl (socfpgaclk->div_reg) >> socfpgaclk->shift; val &=GENMASK (socfpgaclk->width -1 ,0 );/* Check for GPIO_DB_CLK by its offset */ -if ((int ) socfpgaclk->div_reg &SOCFPGA_GPIO_DB_CLK_OFFSET ) +if ((uintptr_t ) socfpgaclk->div_reg &SOCFPGA_GPIO_DB_CLK_OFFSET ) div = val +1 ;else div = (1 << val);
Greg Kroah-Hartman
maintainerPATCH 27/47 mm: add cond_resched() in gather_pte_stats()
In reply to Greg Kroah-HartmanFrom: Hugh Dickins <[email protected]>
commit a66c0410b97c07a5708881198528ce724f7a3226 upstream.
The other pagetable walks in task_mmu.c have a cond_resched() after walking their ptes: add a cond_resched() in gather_pte_stats() too, for reading /proc/<id>/numa_maps. Only pagemap_pmd_range() has a cond_resched() in its (unusually expensive) pmd_trans_huge case: more should probably be added, but leave them unchanged for now.
--- fs/proc/task_mmu.c | 1 + 1 file changed, 1 insertion(+)
fs/proc/task_mmu.c +1 -0
@@ -1609,6 +1609,7 @@ static int gather_pte_stats(pmd_t *pmd, }while (pte++, addr +=PAGE_SIZE , addr != end);pte_unmap_unlock (orig_pte, ptl); +cond_resched ();return 0 ; }#ifdef CONFIG_HUGETLB_PAGE
Greg Kroah-Hartman
maintainerPATCH 28/47 usbip: fix vudc usbip_sockfd_store races leading to gpf
In reply to Greg Kroah-HartmanFrom: Shuah Khan <[email protected]>
commit 46613c9dfa964c0c60b5385dbdf5aaa18be52a9c upstream.
usbip_sockfd_store() is invoked when user requests attach (import) detach (unimport) usb gadget device from usbip host. vhci_hcd sends import request and usbip_sockfd_store() exports the device if it is free for export.
Export and unexport are governed by local state and shared state
- Shared state (usbip device status, sockfd) - sockfd and Device status are used to determine if stub should be brought up or shut down. Device status is shared between host and client.
- Local state (tcp_socket, rx and tx thread task_struct ptrs) A valid tcp_socket controls rx and tx thread operations while the device is in exported state.
- While the device is exported, device status is marked used and socket, sockfd, and thread pointers are valid.
Export sequence (stub-up) includes validating the socket and creating receive (rx) and transmit (tx) threads to talk to the client to provide access to the exported device. rx and tx threads depends on local and shared state to be correct and in sync.
Unexport (stub-down) sequence shuts the socket down and stops the rx and tx threads. Stub-down sequence relies on local and shared states to be in sync.
There are races in updating the local and shared status in the current stub-up sequence resulting in crashes. These stem from starting rx and tx threads before local and global state is updated correctly to be in sync.
1. Doesn't handle kthread_create() error and saves invalid ptr in local state that drives rx and tx threads.
2. Updates tcp_socket and sockfd, starts stub_rx and stub_tx threads before updating usbip_device status to SDEV_ST_USED. This opens up a race condition between the threads and usbip_sockfd_store() stub up and down handling.
Fix the above problems:
- Stop using kthread_get_run() macro to create/start threads.
- Create threads and get task struct reference.
- Add kthread_create() failure handling and bail out.
- Hold usbip_device lock to update local and shared states after creating rx and tx threads.
- Update usbip_device status to SDEV_ST_USED.
- Update usbip_device tcp_socket, sockfd, tcp_rx, and tcp_tx
- Start threads after usbip_device (tcp_socket, sockfd, tcp_rx, tcp_tx, and status) is complete.
Credit goes to syzbot and Tetsuo Handa for finding and root-causing the kthread_get_run() improper error handling problem and others. This is a hard problem to find and debug since the races aren't seen in a normal case. Fuzzing forces the race window to be small enough for the kthread_get_run() error path bug and starting threads before updating the local and shared state bug in the stub-up sequence.
--- drivers/usb/usbip/vudc_sysfs.c | 42 +++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-)
drivers/usb/usbip/vudc_sysfs.c +34 -8
@@ -103,8 +103,9 @@ unlock: } static BIN_ATTR_RO(dev_desc, sizeof(struct usb_device_descriptor)); -static ssize_t store_sockfd (struct device *dev,struct device_attribute *attr, -const char *in,size_t count) +static ssize_t store_sockfd (struct device *dev, +struct device_attribute *attr, +const char *in,size_t count) {struct vudc *udc = (struct vudc *)dev_get_drvdata (dev);int rv;
@@ -113,6 +114,8 @@ static ssize_t store_sockfd(struct devicstruct socket *socket;unsigned long flags;int ret; +struct task_struct *tcp_rx =NULL ; +struct task_struct *tcp_tx =NULL ; rv =kstrtoint (in,0 , &sockfd);if (rv !=0 )
@@ -158,24 +161,47 @@ static ssize_t store_sockfd(struct devic goto sock_err; } - udc->ud.tcp_socket = socket; - +/* unlock and create threads and get tasks */ spin_unlock_irq (&udc->ud.lock);spin_unlock_irqrestore (&udc->lock, flags); - udc->ud.tcp_rx =kthread_get_run (&v_rx_loop, - &udc->ud,"vudc_rx" ); - udc->ud.tcp_tx =kthread_get_run (&v_tx_loop, - &udc->ud,"vudc_tx" ); + tcp_rx =kthread_create (&v_rx_loop, &udc->ud,"vudc_rx" ); +if (IS_ERR (tcp_rx)) { +sockfd_put (socket); +return -EINVAL ; + } + tcp_tx =kthread_create (&v_tx_loop, &udc->ud,"vudc_tx" ); +if (IS_ERR (tcp_tx)) { +kthread_stop (tcp_rx); +sockfd_put (socket); +return -EINVAL ; + } + +/* get task structs now */ +get_task_struct (tcp_rx); +get_task_struct (tcp_tx); +/* lock and update udc->ud state */ spin_lock_irqsave (&udc->lock, flags);spin_lock_irq (&udc->ud.lock); + + udc->ud.tcp_socket = socket; + udc->ud.tcp_rx = tcp_rx; + udc->ud.tcp_rx = tcp_tx; udc->ud.status =SDEV_ST_USED ; +spin_unlock_irq (&udc->ud.lock);do_gettimeofday (&udc->start_time);v_start_timer (udc); udc->connected =1 ; + +spin_unlock_irqrestore (&udc->lock, flags); + +wake_up_process (udc->ud.tcp_rx); +wake_up_process (udc->ud.tcp_tx); +return count; + }else {if (!udc->connected) {dev_err (dev,"Device not connected" );
Greg Kroah-Hartman
maintainerPATCH 29/47 cfg80211: remove WARN_ON() in cfg80211_sme_connect
In reply to Greg Kroah-HartmanFrom: Du Cheng <[email protected]>
commit 1b5ab825d9acc0f27d2f25c6252f3526832a9626 upstream.
A WARN_ON(wdev->conn) would trigger in cfg80211_sme_connect(), if multiple send_msg(NL80211_CMD_CONNECT) system calls are made from the userland, which should be anticipated and handled by the wireless driver. Remove this WARN_ON() to prevent kernel panic if kernel is configured to "panic_on_warn".
Bug reported by syzbot.
--- net/wireless/sme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/sme.c +1 -1
@@ -512,7 +512,7 @@ static int cfg80211_sme_connect(struct wcfg80211_sme_free (wdev); } -if (WARN_ON (wdev->conn)) +if (wdev->conn)return -EINPROGRESS ; wdev->conn =kzalloc (sizeof (*wdev->conn),GFP_KERNEL );
Greg Kroah-Hartman
maintainerPATCH 30/47 net: tun: set tun->dev->addr_len during TUNSETLINK processing
In reply to Greg Kroah-HartmanFrom: Phillip Potter <[email protected]>
commit cca8ea3b05c972ffb5295367e6c544369b45fbdd upstream.
When changing type with TUNSETLINK ioctl command, set tun->dev->addr_len to match the appropriate type, using new tun_get_addr_len utility function which returns appropriate address length for given type. Fixes a KMSAN-found uninit-value bug reported by syzbot at:
https://syzkaller.appspot.com/bug?id=0766d38c656abeace60621896d705743aeefed51
--- drivers/net/tun.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+)
drivers/net/tun.c +48 -0
@@ -72,6 +72,14 @@#include <linux/seq_file.h> #include <linux/uio.h> #include <linux/skb_array.h> +#include <linux/ieee802154.h> +#include <linux/if_ltalk.h> +#include <uapi/linux/if_fddi.h> +#include <uapi/linux/if_hippi.h> +#include <uapi/linux/if_fc.h> +#include <net/ax25.h> +#include <net/rose.h> +#include <net/6lowpan.h> #include <asm/uaccess.h>
@@ -2021,6 +2029,45 @@ unlock:return ret; } +/* Return correct value for tun->dev->addr_len based on tun->dev->type. */ +static unsigned char tun_get_addr_len (unsigned short type) +{ +switch (type) { +case ARPHRD_IP6GRE : +case ARPHRD_TUNNEL6 : +return sizeof (struct in6_addr ); +case ARPHRD_IPGRE : +case ARPHRD_TUNNEL : +case ARPHRD_SIT : +return 4 ; +case ARPHRD_ETHER : +return ETH_ALEN ; +case ARPHRD_IEEE802154 : +case ARPHRD_IEEE802154_MONITOR : +return IEEE802154_EXTENDED_ADDR_LEN ; +case ARPHRD_PHONET_PIPE : +case ARPHRD_PPP : +case ARPHRD_NONE : +return 0 ; +case ARPHRD_6LOWPAN : +return EUI64_ADDR_LEN ; +case ARPHRD_FDDI : +return FDDI_K_ALEN ; +case ARPHRD_HIPPI : +return HIPPI_ALEN ; +case ARPHRD_IEEE802 : +return FC_ALEN ; +case ARPHRD_ROSE : +return ROSE_ADDR_LEN ; +case ARPHRD_NETROM : +return AX25_ADDR_LEN ; +case ARPHRD_LOCALTLK : +return LTALK_ALEN ; +default : +return 0 ; + } +} +static long __tun_chr_ioctl (struct file *file,unsigned int cmd,unsigned long arg,int ifreq_len) {
@@ -2159,6 +2206,7 @@ static long __tun_chr_ioctl(struct file ret = -EBUSY ; }else { tun->dev->type = (int ) arg; + tun->dev->addr_len =tun_get_addr_len (tun->dev->type);tun_debug (KERN_INFO , tun,"linktype set to %d\n" , tun->dev->type); ret =0 ;
Greg Kroah-Hartman
maintainerPATCH 31/47 drivers: net: fix memory leak in atusb_probe
In reply to Greg Kroah-HartmanFrom: Pavel Skripkin <[email protected]>
commit 6b9fbe16955152626557ec6f439f3407b7769941 upstream.
syzbot reported memory leak in atusb_probe()[1]. The problem was in atusb_alloc_urbs().
Since urb is anchored, we need to release the reference to correctly free the urb
backtrace:
[<ffffffff82ba0466>] kmalloc include/linux/slab.h:559 [inline]
[<ffffffff82ba0466>] usb_alloc_urb+0x66/0xe0 drivers/usb/core/urb.c:74
[<ffffffff82ad3888>] atusb_alloc_urbs drivers/net/ieee802154/atusb.c:362 [inline][2]
[<ffffffff82ad3888>] atusb_probe+0x158/0x820 drivers/net/ieee802154/atusb.c:1038 [1]--- drivers/net/ieee802154/atusb.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ieee802154/atusb.c +1 -0
@@ -341,6 +341,7 @@ static int atusb_alloc_urbs(struct atusbreturn -ENOMEM ; }usb_anchor_urb (urb, &atusb->idle_urbs); +usb_free_urb (urb); n--; }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 32/47 drivers: net: fix memory leak in peak_usb_create_dev
In reply to Greg Kroah-HartmanFrom: Pavel Skripkin <[email protected]>
commit a0b96b4a62745397aee662670cfc2157bac03f55 upstream.
syzbot reported memory leak in peak_usb.
The problem was in case of failure after calling ->dev_init()[2] in peak_usb_create_dev()[1]. The data allocated int dev_init() wasn't freed, so simple ->dev_free() call fix this problem.
backtrace:
[<0000000079d6542a>] kmalloc include/linux/slab.h:552 [inline]
[<0000000079d6542a>] kzalloc include/linux/slab.h:682 [inline]
[<0000000079d6542a>] pcan_usb_fd_init+0x156/0x210 drivers/net/can/usb/peak_usb/pcan_usb_fd.c:868 [2]
[<00000000c09f9057>] peak_usb_create_dev drivers/net/can/usb/peak_usb/pcan_usb_core.c:851 [inline] [1]
[<00000000c09f9057>] peak_usb_probe+0x389/0x490 drivers/net/can/usb/peak_usb/pcan_usb_core.c:949--- drivers/net/can/usb/peak_usb/pcan_usb_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/can/usb/peak_usb/pcan_usb_core.c +5 -1
@@ -880,7 +880,7 @@ static int peak_usb_create_dev(const strif (dev->adapter->dev_set_bus) { err = dev->adapter->dev_set_bus (dev,0 );if (err) - goto lbl_unregister_candev; + goto adap_dev_free; }/* get device number early */
@@ -892,6 +892,10 @@ static int peak_usb_create_dev(const strreturn 0 ; +adap_dev_free: +if (dev->adapter->dev_free) + dev->adapter->dev_free (dev); + lbl_unregister_candev:unregister_candev (netdev);
Greg Kroah-Hartman
maintainerPATCH 33/47 net: mac802154: Fix general protection fault
In reply to Greg Kroah-HartmanFrom: Pavel Skripkin <[email protected]>
commit 1165affd484889d4986cf3b724318935a0b120d8 upstream.
syzbot found general protection fault in crypto_destroy_tfm()[1]. It was caused by wrong clean up loop in llsec_key_alloc(). If one of the tfm array members is in IS_ERR() range it will cause general protection fault in clean up function [1].
Call Trace: crypto_free_aead include/crypto/aead.h:191 [inline] [1] llsec_key_alloc net/mac802154/llsec.c:156 [inline] mac802154_llsec_key_add+0x9e0/0xcc0 net/mac802154/llsec.c:249 ieee802154_add_llsec_key+0x56/0x80 net/mac802154/cfg.c:338 rdev_add_llsec_key net/ieee802154/rdev-ops.h:260 [inline] nl802154_add_llsec_key+0x3d3/0x560 net/ieee802154/nl802154.c:1584 genl_family_rcv_msg_doit+0x228/0x320 net/netlink/genetlink.c:739 genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] genl_rcv_msg+0x328/0x580 net/netlink/genetlink.c:800 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 genl_rcv+0x24/0x40 net/netlink/genetlink.c:811 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae
--- net/mac802154/llsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac802154/llsec.c +1 -1
@@ -158,7 +158,7 @@ err_tfm0:crypto_free_skcipher (key->tfm0); err_tfm:for (i =0 ; i <ARRAY_SIZE (key->tfm); i++) -if (key->tfm[i]) +if (!IS_ERR_OR_NULL (key->tfm[i]))crypto_free_aead (key->tfm[i]);kzfree (key);
Greg Kroah-Hartman
maintainerPATCH 34/47 net: ieee802154: nl-mac: fix check on panid
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit 6f7f657f24405f426212c09260bf7fe8a52cef33 upstream.
This patch fixes a null pointer derefence for panid handle by move the check for the netlink variable directly before accessing them.
--- net/ieee802154/nl-mac.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
net/ieee802154/nl-mac.c +4 -3
@@ -559,9 +559,7 @@ ieee802154_llsec_parse_key_id(struct gen desc->mode =nla_get_u8 (info->attrs[IEEE802154_ATTR_LLSEC_KEY_MODE ]);if (desc->mode ==IEEE802154_SCF_KEY_IMPLICIT ) { -if (!info->attrs[IEEE802154_ATTR_PAN_ID ] && - !(info->attrs[IEEE802154_ATTR_SHORT_ADDR ] || - info->attrs[IEEE802154_ATTR_HW_ADDR ])) +if (!info->attrs[IEEE802154_ATTR_PAN_ID ])return -EINVAL ; desc->device_addr.pan_id =nla_get_shortaddr (info->attrs[IEEE802154_ATTR_PAN_ID ]);
@@ -570,6 +568,9 @@ ieee802154_llsec_parse_key_id(struct gen desc->device_addr.mode =IEEE802154_ADDR_SHORT ; desc->device_addr.short_addr =nla_get_shortaddr (info->attrs[IEEE802154_ATTR_SHORT_ADDR ]); }else { +if (!info->attrs[IEEE802154_ATTR_HW_ADDR ]) +return -EINVAL ; + desc->device_addr.mode =IEEE802154_ADDR_LONG ; desc->device_addr.extended_addr =nla_get_hwaddr (info->attrs[IEEE802154_ATTR_HW_ADDR ]); }
Greg Kroah-Hartman
maintainerPATCH 35/47 net: ieee802154: fix nl802154 del llsec key
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit 37feaaf5ceb2245e474369312bb7b922ce7bce69 upstream.
This patch fixes a nullpointer dereference if NL802154_ATTR_SEC_KEY is not set by the user. If this is the case nl802154 will return -EINVAL.
--- net/ieee802154/nl802154.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ieee802154/nl802154.c +2 -1
@@ -1627,7 +1627,8 @@ static int nl802154_del_llsec_key(structstruct nlattr *attrs[NL802154_KEY_ATTR_MAX +1 ];struct ieee802154_llsec_key_id id; -if (nla_parse_nested (attrs,NL802154_KEY_ATTR_MAX , +if (!info->attrs[NL802154_ATTR_SEC_KEY ] || +nla_parse_nested (attrs,NL802154_KEY_ATTR_MAX , info->attrs[NL802154_ATTR_SEC_KEY ], nl802154_key_policy))return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 36/47 net: ieee802154: fix nl802154 del llsec dev
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit 3d1eac2f45585690d942cf47fd7fbd04093ebd1b upstream.
This patch fixes a nullpointer dereference if NL802154_ATTR_SEC_DEVICE is not set by the user. If this is the case nl802154 will return -EINVAL.
--- net/ieee802154/nl802154.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ieee802154/nl802154.c +2 -1
@@ -1796,7 +1796,8 @@ static int nl802154_del_llsec_dev(structstruct nlattr *attrs[NL802154_DEV_ATTR_MAX +1 ];__le64 extended_addr; -if (nla_parse_nested (attrs,NL802154_DEV_ATTR_MAX , +if (!info->attrs[NL802154_ATTR_SEC_DEVICE ] || +nla_parse_nested (attrs,NL802154_DEV_ATTR_MAX , info->attrs[NL802154_ATTR_SEC_DEVICE ], nl802154_dev_policy))return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 37/47 net: ieee802154: fix nl802154 add llsec key
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit 20d5fe2d7103f5c43ad11a3d6d259e9d61165c35 upstream.
This patch fixes a nullpointer dereference if NL802154_ATTR_SEC_KEY is not set by the user. If this is the case nl802154 will return -EINVAL.
--- net/ieee802154/nl802154.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ieee802154/nl802154.c +2 -1
@@ -1577,7 +1577,8 @@ static int nl802154_add_llsec_key(structstruct ieee802154_llsec_key_id id = { };u32 commands[NL802154_CMD_FRAME_NR_IDS /32 ] = { }; -if (nla_parse_nested (attrs,NL802154_KEY_ATTR_MAX , +if (!info->attrs[NL802154_ATTR_SEC_KEY ] || +nla_parse_nested (attrs,NL802154_KEY_ATTR_MAX , info->attrs[NL802154_ATTR_SEC_KEY ], nl802154_key_policy))return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 38/47 net: ieee802154: fix nl802154 del llsec devkey
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit 27c746869e1a135dffc2f2a80715bb7aa00445b4 upstream.
This patch fixes a nullpointer dereference if NL802154_ATTR_SEC_DEVKEY is not set by the user. If this is the case nl802154 will return -EINVAL.
--- net/ieee802154/nl802154.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ieee802154/nl802154.c +2 -1
@@ -1958,7 +1958,8 @@ static int nl802154_del_llsec_devkey(strstruct ieee802154_llsec_device_key key;__le64 extended_addr; -if (nla_parse_nested (attrs,NL802154_DEVKEY_ATTR_MAX , +if (!info->attrs[NL802154_ATTR_SEC_DEVKEY ] || +nla_parse_nested (attrs,NL802154_DEVKEY_ATTR_MAX , info->attrs[NL802154_ATTR_SEC_DEVKEY ], nl802154_devkey_policy))return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 39/47 net: ieee802154: forbid monitor for set llsec params
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit 88c17855ac4291fb462e13a86b7516773b6c932e upstream.
This patch forbids to set llsec params for monitor interfaces which we don't support yet.
--- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+)
net/ieee802154/nl802154.c +3 -0
@@ -1417,6 +1417,9 @@ static int nl802154_set_llsec_params(stru32 changed =0 ;int ret; +if (wpan_dev->iftype ==NL802154_IFTYPE_MONITOR ) +return -EOPNOTSUPP ; +if (info->attrs[NL802154_ATTR_SEC_ENABLED ]) {u8 enabled;
Greg Kroah-Hartman
maintainerPATCH 40/47 net: ieee802154: forbid monitor for del llsec seclevel
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit 9dde130937e95b72adfae64ab21d6e7e707e2dac upstream.
This patch forbids to del llsec seclevel for monitor interfaces which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors.
--- net/ieee802154/nl802154.c | 3 +++ 1 file changed, 3 insertions(+)
net/ieee802154/nl802154.c +3 -0
@@ -2137,6 +2137,9 @@ static int nl802154_del_llsec_seclevel(sstruct wpan_dev *wpan_dev = dev->ieee802154_ptr;struct ieee802154_llsec_seclevel sl; +if (wpan_dev->iftype ==NL802154_IFTYPE_MONITOR ) +return -EOPNOTSUPP ; +if (!info->attrs[NL802154_ATTR_SEC_LEVEL ] ||llsec_parse_seclevel (info->attrs[NL802154_ATTR_SEC_LEVEL ], &sl) <0 )
Greg Kroah-Hartman
maintainerPATCH 41/47 net: ieee802154: stop dump llsec params for monitors
In reply to Greg Kroah-HartmanFrom: Alexander Aring <[email protected]>
commit 1534efc7bbc1121e92c86c2dabebaf2c9dcece19 upstream.
This patch stops dumping llsec params for monitors which we don't support yet. Otherwise we will access llsec mib which isn't initialized for monitors.
--- net/ieee802154/nl802154.c | 5 +++++ 1 file changed, 5 insertions(+)
net/ieee802154/nl802154.c +5 -0
@@ -851,8 +851,13 @@ nl802154_send_iface(struct sk_buff *msg, goto nla_put_failure;#ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL +if (wpan_dev->iftype ==NL802154_IFTYPE_MONITOR ) + goto out; +if (nl802154_get_llsec_params (msg, rdev, wpan_dev) <0 ) goto nla_put_failure; + +out:#endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */ genlmsg_end (msg, hdr);
Greg Kroah-Hartman
maintainerPATCH 42/47 Revert "cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath."
In reply to Greg Kroah-HartmanFrom: Greg Kroah-Hartman <[email protected]>
This reverts commit 742300e32db00f008e944acafaeba9a12730eff0 which is commit a738c93fb1c17e386a09304b517b1c6b2a6a5a8b upstream.
It is reported to cause problems in older kernels, so revert it for now until we can figure it out...
--- fs/cifs/connect.c | 1 - 1 file changed, 1 deletion(-)
fs/cifs/connect.c +0 -1
@@ -3488,7 +3488,6 @@ int cifs_setup_cifs_sb(struct smb_vol *p cifs_sb->prepath =kstrdup (pvolume_info->prepath,GFP_KERNEL );if (cifs_sb->prepath ==NULL )return -ENOMEM ; - cifs_sb->mnt_cifs_flags |=CIFS_MOUNT_USE_PREFIX_PATH ; }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 43/47 drm/imx: imx-ldb: fix out of bounds array access warning
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit 33ce7f2f95cabb5834cf0906308a5cb6103976da ]
When CONFIG_OF is disabled, building with 'make W=1' produces warnings about out of bounds array access:
drivers/gpu/drm/imx/imx-ldb.c: In function 'imx_ldb_set_clock.constprop':drivers/gpu/drm/imx/imx-ldb.c:186:8: error: array subscript -22 is below array bounds of 'struct clk *[4]' [-Werror=array-bounds]
Add an error check before the index is used, which helps with the warning, as well as any possible other error condition that may be triggered at runtime.
The warning could be fixed by adding a Kconfig depedency on CONFIG_OF, but Liu Ying points out that the driver may hit the out-of-bounds problem at runtime anyway.
--- drivers/gpu/drm/imx/imx-ldb.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/imx/imx-ldb.c +10 -0
@@ -212,6 +212,11 @@ static void imx_ldb_encoder_enable(struct drm_encoder *encoder)int dual = ldb->ldb_ctrl &LDB_SPLIT_MODE_EN ;int mux =drm_of_encoder_active_port_id (imx_ldb_ch->child, encoder); +if (mux <0 || mux >=ARRAY_SIZE (ldb->clk_sel)) { +dev_warn (ldb->dev,"%s: invalid mux %d\n" , __func__, mux); +return ; + } +drm_panel_prepare (imx_ldb_ch->panel);if (dual) {
@@ -270,6 +275,11 @@ imx_ldb_encoder_atomic_mode_set(struct drm_encoder *encoder,int mux =drm_of_encoder_active_port_id (imx_ldb_ch->child, encoder);u32 bus_format = imx_ldb_ch->bus_format; +if (mux <0 || mux >=ARRAY_SIZE (ldb->clk_sel)) { +dev_warn (ldb->dev,"%s: invalid mux %d\n" , __func__, mux); +return ; + } +if (mode->clock >170000 ) {dev_warn (ldb->dev,"%s: mode exceeds 170 MHz pixel clock\n" , __func__);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 44/47 gfs2: report "already frozen/thawed" errors
In reply to Greg Kroah-HartmanFrom: Bob Peterson <[email protected]>
[ Upstream commit ff132c5f93c06bd4432bbab5c369e468653bdec4 ]
Before this patch, gfs2's freeze function failed to report an error when the target file system was already frozen as it should (and as generic vfs function freeze_super does. Similarly, gfs2's thaw function failed to report an error when trying to thaw a file system that is not frozen, as vfs function thaw_super does. The errors were checked, but it always returned a 0 return code.
This patch adds the missing error return codes to gfs2 freeze and thaw.
--- fs/gfs2/super.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
fs/gfs2/super.c +6 -4
@@ -986,11 +986,13 @@ void gfs2_freeze_func(struct work_struct *work)static int gfs2_freeze (struct super_block *sb) {struct gfs2_sbd *sdp = sb->s_fs_info; -int error =0 ; +int error;mutex_lock (&sdp->sd_freeze_mutex); -if (atomic_read (&sdp->sd_freeze_state) !=SFS_UNFROZEN ) +if (atomic_read (&sdp->sd_freeze_state) !=SFS_UNFROZEN ) { + error = -EBUSY ; goto out; + }if (test_bit (SDF_SHUTDOWN , &sdp->sd_flags)) { error = -EINVAL ;
@@ -1032,10 +1034,10 @@ static int gfs2_unfreeze(struct super_block *sb)struct gfs2_sbd *sdp = sb->s_fs_info;mutex_lock (&sdp->sd_freeze_mutex); -if (atomic_read (&sdp->sd_freeze_state) !=SFS_FROZEN || +if (atomic_read (&sdp->sd_freeze_state) !=SFS_FROZEN || !gfs2_holder_initialized (&sdp->sd_freeze_gh)) {mutex_unlock (&sdp->sd_freeze_mutex); -return 0 ; +return -EINVAL ; }gfs2_glock_dq_uninit (&sdp->sd_freeze_gh);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 45/47 netfilter: x_tables: fix compat match/target pad out-of-bound write
In reply to Greg Kroah-HartmanFrom: Florian Westphal <[email protected]>
commit b29c457a6511435960115c0f548c4360d5f4801d upstream.
xt_compat_match/target_from_user doesn't check that zeroing the area to start of next rule won't write past end of allocated ruleset blob.
Remove this code and zero the entire blob beforehand.
--- net/ipv4/netfilter/arp_tables.c | 2 ++ net/ipv4/netfilter/ip_tables.c | 2 ++ net/ipv6/netfilter/ip6_tables.c | 2 ++ net/netfilter/x_tables.c | 10 ++-------- 4 files changed, 8 insertions(+), 8 deletions(-)
net/ipv4/netfilter/arp_tables.c +2 -0
@@ -1209,6 +1209,8 @@ static int translate_compat_table(structif (!newinfo) goto out_unlock; +memset (newinfo->entries,0 , size); + newinfo->number = compatr->num_entries;for (i =0 ; i <NF_ARP_NUMHOOKS ; i++) { newinfo->hook_entry[i] = compatr->hook_entry[i];
net/ipv4/netfilter/ip_tables.c +2 -0
@@ -1451,6 +1451,8 @@ translate_compat_table(struct net *net,if (!newinfo) goto out_unlock; +memset (newinfo->entries,0 , size); + newinfo->number = compatr->num_entries;for (i =0 ; i <NF_INET_NUMHOOKS ; i++) { newinfo->hook_entry[i] = compatr->hook_entry[i];
net/ipv6/netfilter/ip6_tables.c +2 -0
@@ -1476,6 +1476,8 @@ translate_compat_table(struct net *net,if (!newinfo) goto out_unlock; +memset (newinfo->entries,0 , size); + newinfo->number = compatr->num_entries;for (i =0 ; i <NF_INET_NUMHOOKS ; i++) { newinfo->hook_entry[i] = compatr->hook_entry[i];
net/netfilter/x_tables.c +2 -8
@@ -569,7 +569,7 @@ void xt_compat_match_from_user(struct xt {const struct xt_match *match = m->u.kernel.match;struct compat_xt_entry_match *cm = (struct compat_xt_entry_match *)m; -int pad, off =xt_compat_match_offset (match); +int off =xt_compat_match_offset (match);u_int16_t msize = cm->u.user.match_size;char name[sizeof (m->u.user.name)];
@@ -579,9 +579,6 @@ void xt_compat_match_from_user(struct xt match->compat_from_user (m->data, cm->data); else memcpy(m->data, cm->data, msize - sizeof(*cm)); - pad =XT_ALIGN (match->matchsize) - match->matchsize; -if (pad >0 ) -memset (m->data + match->matchsize,0 , pad); msize += off; m->u.user.match_size = msize;
@@ -927,7 +924,7 @@ void xt_compat_target_from_user(struct x {const struct xt_target *target = t->u.kernel.target;struct compat_xt_entry_target *ct = (struct compat_xt_entry_target *)t; -int pad, off =xt_compat_target_offset (target); +int off =xt_compat_target_offset (target);u_int16_t tsize = ct->u.user.target_size;char name[sizeof (t->u.user.name)];
@@ -937,9 +934,6 @@ void xt_compat_target_from_user(struct x target->compat_from_user (t->data, ct->data); else memcpy(t->data, ct->data, tsize - sizeof(*ct)); - pad =XT_ALIGN (target->targetsize) - target->targetsize; -if (pad >0 ) -memset (t->data + target->targetsize,0 , pad); tsize += off; t->u.user.target_size = tsize;
Greg Kroah-Hartman
maintainerPATCH 46/47 perf map: Tighten snprintf() string precision to pass gcc check on some 32-bit arches
In reply to Greg Kroah-HartmanFrom: Arnaldo Carvalho de Melo <[email protected]>
commit 77d02bd00cea9f1a87afe58113fa75b983d6c23a upstream.
Noticed on a debian:experimental mips and mipsel cross build build environment:
perfbuilder@ec265a086e9b:~$ mips-linux-gnu-gcc --version | head -1 mips-linux-gnu-gcc (Debian 10.2.1-3) 10.2.1 20201224 perfbuilder@ec265a086e9b:~$
CC /tmp/build/perf/util/map.o
util/map.c: In function 'map__new':
util/map.c:109:5: error: '%s' directive output may be truncated writing between 1 and 2147483645 bytes into a region of size 4096 [-Werror=format-truncation=]
109 | "%s/platforms/%s/arch-%s/usr/lib/%s",
| ^~
In file included from /usr/mips-linux-gnu/include/stdio.h:867,
from util/symbol.h:11,
from util/map.c:2:
/usr/mips-linux-gnu/include/bits/stdio2.h:67:10: note: '__builtin___snprintf_chk' output 32 or more bytes (assuming 4294967321) into a destination of size 4096
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Since we have the lenghts for what lands in that place, use it to give the compiler more info and make it happy.
--- tools/perf/util/map.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
tools/perf/util/map.c +3 -4
@@ -91,8 +91,7 @@ static inline bool replace_android_lib(cif (!strncmp (filename,"/system/lib/" ,12 )) {char *ndk, *app;const char *arch; -size_t ndk_length; -size_t app_length; +int ndk_length, app_length; ndk =getenv ("NDK_ROOT" ); app =getenv ("APP_PLATFORM" );
@@ -120,8 +119,8 @@ static inline bool replace_android_lib(cif (new_length >PATH_MAX )return false;snprintf (newfilename, new_length, -"%s/platforms/%s/arch-%s/usr/lib/%s" , - ndk, app, arch, libname); +"%.*s/platforms/%.*s/arch-%s/usr/lib/%s" , + ndk_length, ndk, app_length, app, arch, libname);return true; }
Greg Kroah-Hartman
maintainerPATCH 47/47 xen/events: fix setting irq affinity
In reply to Greg Kroah-HartmanFrom: Juergen Gross <[email protected]>
The backport of upstream patch 25da4618af240fbec61 ("xen/events: don't unmask an event channel when an eoi is pending") introduced a regression for stable kernels 5.10 and older: setting IRQ affinity for IRQs related to interdomain events would no longer work, as moving the IRQ to its new cpu was not included in the irq_ack callback for those events.
Fix that by adding the needed call.
Note that kernels 5.11 and later don't need the explicit moving of the IRQ to the target cpu in the irq_ack callback, due to a rework of the affinity setting in kernel 5.11.
--- drivers/xen/events/events_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/xen/events/events_base.c +2 -2
@@ -1780,7 +1780,7 @@ static void lateeoi_ack_dynirq(struct irif (VALID_EVTCHN (evtchn)) {do_mask (info,EVT_MASK_REASON_EOI_PENDING ); -event_handler_exit (info); +ack_dynirq (data); } }
@@ -1791,7 +1791,7 @@ static void lateeoi_mask_ack_dynirq(struif (VALID_EVTCHN (evtchn)) {do_mask (info,EVT_MASK_REASON_EXPLICIT ); -event_handler_exit (info); +ack_dynirq (data); } }
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.267 release. There are 47 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 Sat, 17 Apr 2021 14:44:01 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.267-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.9.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.267 release. There are 47 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 Sat, 17 Apr 2021 14:44:01 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.267-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.9.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.267 release. There are 47 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 Sat, 17 Apr 2021 14:44:01 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.267-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.9.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v4.9:
8 builds: 8 pass, 0 fail
16 boots: 16 pass, 0 fail
32 tests: 32 pass, 0 failLinux version: 4.9.267-rc1-g5183cf83a541
Boards tested: tegra124-jetson-tk1, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04
Jon
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.267 release. There are 47 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 Sat, 17 Apr 2021 14:44:01 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.267-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.9.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 4.9.267-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git branch: linux-4.9.y
* git commit: 5183cf83a541a4684e52ca704658b93e63fdf243
* git describe: v4.9.266-48-g5183cf83a541
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.9.y/build/v4.9.266-48-g5183cf83a541
## No regressions (compared to v4.9.266-43-ga0c17d36dea3)
## No fixes (compared to v4.9.266-43-ga0c17d36dea3)
## Test result summary
total: 54076, pass: 44392, fail: 544, skip: 8849, xfail: 291,
## Build Summary
* arm: 96 total, 96 passed, 0 failed
* arm64: 23 total, 23 passed, 0 failed
* dragonboard-410c: 1 total, 1 passed, 0 failed
* hi6220-hikey: 1 total, 1 passed, 0 failed
* i386: 13 total, 13 passed, 0 failed
* juno-r2: 1 total, 1 passed, 0 failed
* mips: 36 total, 36 passed, 0 failed
* sparc: 9 total, 9 passed, 0 failed
* x15: 1 total, 1 passed, 0 failed
* x86: 1 total, 1 passed, 0 failed
* x86_64: 13 total, 13 passed, 0 failed
## Test suites summary
* fwts
* igt-gpu-tools
* install-android-platform-tools-r2600
* kselftest-android
* kselftest-bpf
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-lkdtm
* kselftest-membarrier
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-x86
* kselftest-zram
* kvm-unit-tests
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-controllers-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-tracing-tests
* network-basic-tests
* perf
* ssuite
* v4l2-compliance
--
Linaro LKFT
https://lkft.linaro.org