2020-11-23 23:33:48

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.14 00/60] 4.14.209-rc1 review

This is the start of the stable review cycle for the 4.14.209 release.
There are 60 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, 25 Nov 2020 12:17:50 +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.14.209-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.14.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>
Linux 4.14.209-rc1

Chen Yu <[email protected]>
x86/microcode/intel: Check patch signature before saving microcode for early loading

Stefan Haberland <[email protected]>
s390/dasd: fix null pointer dereference for ERP requests

Thomas Richter <[email protected]>
s390/cpum_sf.c: fix file permission for cpum_sfb_size

Johannes Berg <[email protected]>
mac80211: free sta in sta_info_insert_finish() on errors

Felix Fietkau <[email protected]>
mac80211: minstrel: fix tx status processing corner case

Felix Fietkau <[email protected]>
mac80211: minstrel: remove deferred sampling code

Max Filippov <[email protected]>
xtensa: disable preemption around cache alias management calls

Michał Mirosław <[email protected]>
regulator: workaround self-referent regulators

Michał Mirosław <[email protected]>
regulator: avoid resolve_supply() infinite recursion

Michał Mirosław <[email protected]>
regulator: fix memory leak with repeated set_machine_constraints()

Hans de Goede <[email protected]>
iio: accel: kxcjk1013: Add support for KIOX010A ACPI DSM for setting tablet-mode

Hans de Goede <[email protected]>
iio: accel: kxcjk1013: Replace is_smo8500_device with an acpi_type enum

Jan Kara <[email protected]>
ext4: fix bogus warning in ext4_update_dx_flag()

Brian O'Keefe <[email protected]>
staging: rtl8723bs: Add 024c:0627 to the list of SDIO device-ids

Vamshi K Sthambamkadi <[email protected]>
efivarfs: fix memory leak in efivarfs_create()

Fugang Duan <[email protected]>
tty: serial: imx: keep console clocks always on

Takashi Iwai <[email protected]>
ALSA: mixart: Fix mutex deadlock

Takashi Sakamoto <[email protected]>
ALSA: ctl: fix error path at adding user-defined element set

Samuel Thibault <[email protected]>
speakup: Do not let the line discipline be used several times

Daniel Axtens <[email protected]>
powerpc/uaccess-flush: fix missing includes in kup-radix.h

Yicong Yang <[email protected]>
libfs: fix error cast of negative value in simple_attr_write()

Darrick J. Wong <[email protected]>
xfs: revert "xfs: fix rmap key and record comparison functions"

Nishanth Menon <[email protected]>
regulator: ti-abb: Fix array out of bound read access on the first transition

Zhang Qilong <[email protected]>
MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu

Srinivasa Rao Mandadapu <[email protected]>
ASoC: qcom: lpass-platform: Fix memory leak

Wu Bo <[email protected]>
can: m_can: m_can_handle_state_change(): fix state change

Colin Ian King <[email protected]>
can: peak_usb: fix potential integer overflow on shift of a int

Marc Kleine-Budde <[email protected]>
can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb()

Zhang Qilong <[email protected]>
can: ti_hecc: Fix memleak in ti_hecc_probe

Alejandro Concepcion Rodriguez <[email protected]>
can: dev: can_restart(): post buffer from the right context

Anant Thazhemadam <[email protected]>
can: af_can: prevent potential access of uninitialized member in canfd_rcv()

Anant Thazhemadam <[email protected]>
can: af_can: prevent potential access of uninitialized member in can_rcv()

Leo Yan <[email protected]>
perf lock: Don't free "lock_seq_stat" if read_count isn't zero

Fabio Estevam <[email protected]>
ARM: dts: imx50-evk: Fix the chip select 1 IOMUX

Sergey Matyukevich <[email protected]>
arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy

Randy Dunlap <[email protected]>
MIPS: export has_transparent_hugepage() for modules

Dan Carpenter <[email protected]>
Input: adxl34x - clean up a data type in adxl34x_probe()

Darrick J. Wong <[email protected]>
vfs: remove lockdep bogosity in __sb_start_write

Will Deacon <[email protected]>
arm64: psci: Avoid printing in cpu_psci_cpu_die()

Jianqun Xu <[email protected]>
pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq

Joel Stanley <[email protected]>
net: ftgmac100: Fix crash when removing driver

Ryan Sharpelletti <[email protected]>
tcp: only postpone PROBE_RTT if RTT is < current min_rtt estimate

Filip Moc <[email protected]>
net: usb: qmi_wwan: Set DTR quirk for MR400

Vladyslav Tarasiuk <[email protected]>
net/mlx5: Disable QoS when min_rates on all VFs are zero

Xin Long <[email protected]>
sctp: change to hold/put transport for proto_unreach_timer

Zhang Changzhong <[email protected]>
qlcnic: fix error return code in qlcnic_83xx_restart_hw()

Xie He <[email protected]>
net: x25: Increase refcnt of "struct x25_neigh" in x25_rx_call_request

Aya Levin <[email protected]>
net/mlx4_core: Fix init_hca fields offset

Paul Moore <[email protected]>
netlabel: fix an uninitialized warning in netlbl_unlabel_staticlist()

Paul Moore <[email protected]>
netlabel: fix our progress tracking in netlbl_unlabel_staticlist()

Florian Fainelli <[email protected]>
net: Have netpoll bring-up DSA management interface

Tobias Waldekranz <[email protected]>
net: dsa: mv88e6xxx: Avoid VTU corruption on 6097

Heiner Kallweit <[email protected]>
net: bridge: add missing counters to ndo_get_stats64 callback

Zhang Changzhong <[email protected]>
net: b44: fix error return code in b44_init_one()

Ido Schimmel <[email protected]>
mlxsw: core: Use variable timeout for EMAD retries

Wang Hai <[email protected]>
inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill()

Wang Hai <[email protected]>
devlink: Add missing genlmsg_cancel() in devlink_nl_sb_port_pool_fill()

Edwin Peer <[email protected]>
bnxt_en: read EEPROM A2h address using page 0

Sebastian Andrzej Siewior <[email protected]>
atm: nicstar: Unmap DMA on send error

Zhang Changzhong <[email protected]>
ah6: fix error return code in ah6_input()


-------------

Diffstat:

Makefile | 4 +-
arch/arm/boot/dts/imx50-evk.dts | 2 +-
arch/arm/boot/dts/imx6qdl-udoo.dtsi | 2 +-
arch/arm64/kernel/psci.c | 5 +-
arch/mips/alchemy/common/clock.c | 9 +++-
arch/mips/mm/tlb-r4k.c | 1 +
arch/powerpc/include/asm/book3s/64/kup-radix.h | 1 +
arch/s390/kernel/perf_cpum_sf.c | 2 +-
arch/x86/kernel/cpu/microcode/intel.c | 63 ++++------------------
arch/xtensa/mm/cache.c | 14 +++++
drivers/atm/nicstar.c | 2 +
drivers/iio/accel/kxcjk-1013.c | 51 ++++++++++++++++--
drivers/input/misc/adxl34x.c | 2 +-
drivers/net/can/dev.c | 2 +-
drivers/net/can/m_can/m_can.c | 4 +-
drivers/net/can/ti_hecc.c | 13 +++--
drivers/net/can/usb/mcba_usb.c | 4 +-
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 4 +-
drivers/net/dsa/mv88e6xxx/global1_vtu.c | 59 ++++++++++++++++----
drivers/net/ethernet/broadcom/b44.c | 3 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +-
drivers/net/ethernet/faraday/ftgmac100.c | 4 ++
drivers/net/ethernet/mellanox/mlx4/fw.c | 6 +--
drivers/net/ethernet/mellanox/mlx4/fw.h | 4 +-
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 15 +++---
drivers/net/ethernet/mellanox/mlxsw/core.c | 3 +-
.../net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 3 +-
drivers/net/usb/qmi_wwan.c | 2 +-
drivers/pinctrl/pinctrl-rockchip.c | 2 +
drivers/regulator/core.c | 38 +++++++------
drivers/regulator/ti-abb-regulator.c | 12 ++++-
drivers/s390/block/dasd.c | 6 +++
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 1 +
drivers/staging/speakup/spk_ttyio.c | 9 ++++
drivers/tty/serial/imx.c | 20 ++-----
fs/efivarfs/super.c | 1 +
fs/ext4/ext4.h | 3 +-
fs/libfs.c | 6 ++-
fs/super.c | 33 ++----------
fs/xfs/libxfs/xfs_rmap_btree.c | 16 +++---
net/bridge/br_device.c | 1 +
net/can/af_can.c | 38 +++++++++----
net/core/devlink.c | 6 ++-
net/core/netpoll.c | 22 ++++++--
net/ipv4/inet_diag.c | 4 +-
net/ipv4/tcp_bbr.c | 2 +-
net/ipv6/ah6.c | 3 +-
net/mac80211/rc80211_minstrel.c | 27 ++--------
net/mac80211/rc80211_minstrel.h | 1 -
net/mac80211/sta_info.c | 14 ++---
net/netlabel/netlabel_unlabeled.c | 17 ++++--
net/sctp/input.c | 4 +-
net/sctp/sm_sideeffect.c | 4 +-
net/sctp/transport.c | 2 +-
net/x25/af_x25.c | 1 +
sound/core/control.c | 2 +-
sound/pci/mixart/mixart_core.c | 5 +-
sound/soc/qcom/lpass-platform.c | 5 +-
tools/perf/builtin-lock.c | 2 +-
59 files changed, 343 insertions(+), 250 deletions(-)



2020-11-23 23:33:57

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.14 01/60] ah6: fix error return code in ah6_input()

From: Zhang Changzhong <[email protected]>

[ Upstream commit a5ebcbdf34b65fcc07f38eaf2d60563b42619a59 ]

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zhang Changzhong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/ipv6/ah6.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -599,7 +599,8 @@ static int ah6_input(struct xfrm_state *
memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len);
memset(ah->auth_data, 0, ahp->icv_trunc_len);

- if (ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN))
+ err = ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN);
+ if (err)
goto out_free;

ip6h->priority = 0;


2020-11-23 23:34:15

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.14 55/60] mac80211: minstrel: remove deferred sampling code

From: Felix Fietkau <[email protected]>

commit 4fe40b8e1566dad04c87fbf299049a1d0d4bd58d upstream.

Deferring sampling attempts to the second stage has some bad interactions
with drivers that process the rate table in hardware and use the probe flag
to indicate probing packets (e.g. most mt76 drivers). On affected drivers
it can lead to probing not working at all.

If the link conditions turn worse, it might not be such a good idea to
do a lot of sampling for lower rates in this case.

Fix this by simply skipping the sample attempt instead of deferring it,
but keep the checks that would allow it to be sampled if it was skipped
too often, but only if it has less than 95% success probability.

Also ensure that IEEE80211_TX_CTL_RATE_CTRL_PROBE is set for all probing
packets.

Cc: [email protected]
Fixes: cccf129f820e ("mac80211: add the 'minstrel' rate control algorithm")
Signed-off-by: Felix Fietkau <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
net/mac80211/rc80211_minstrel.c | 25 ++++---------------------
net/mac80211/rc80211_minstrel.h | 1 -
2 files changed, 4 insertions(+), 22 deletions(-)

--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -289,12 +289,6 @@ minstrel_tx_status(void *priv, struct ie
mi->r[ndx].stats.success += success;
}

- if ((info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) && (i >= 0))
- mi->sample_packets++;
-
- if (mi->sample_deferred > 0)
- mi->sample_deferred--;
-
if (time_after(jiffies, mi->last_stats_update +
(mp->update_interval * HZ) / 1000))
minstrel_update_stats(mp, mi);
@@ -373,7 +367,7 @@ minstrel_get_rate(void *priv, struct iee
return;

delta = (mi->total_packets * sampling_ratio / 100) -
- (mi->sample_packets + mi->sample_deferred / 2);
+ mi->sample_packets;

/* delta < 0: no sampling required */
prev_sample = mi->prev_sample;
@@ -382,7 +376,6 @@ minstrel_get_rate(void *priv, struct iee
return;

if (mi->total_packets >= 10000) {
- mi->sample_deferred = 0;
mi->sample_packets = 0;
mi->total_packets = 0;
} else if (delta > mi->n_rates * 2) {
@@ -407,19 +400,8 @@ minstrel_get_rate(void *priv, struct iee
* rate sampling method should be used.
* Respect such rates that are not sampled for 20 interations.
*/
- if (mrr_capable &&
- msr->perfect_tx_time > mr->perfect_tx_time &&
- msr->stats.sample_skipped < 20) {
- /* Only use IEEE80211_TX_CTL_RATE_CTRL_PROBE to mark
- * packets that have the sampling rate deferred to the
- * second MRR stage. Increase the sample counter only
- * if the deferred sample rate was actually used.
- * Use the sample_deferred counter to make sure that
- * the sampling is not done in large bursts */
- info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
- rate++;
- mi->sample_deferred++;
- } else {
+ if (msr->perfect_tx_time < mr->perfect_tx_time ||
+ msr->stats.sample_skipped >= 20) {
if (!msr->sample_limit)
return;

@@ -439,6 +421,7 @@ minstrel_get_rate(void *priv, struct iee

rate->idx = mi->r[ndx].rix;
rate->count = minstrel_get_retry_count(&mi->r[ndx], info);
+ info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
}


--- a/net/mac80211/rc80211_minstrel.h
+++ b/net/mac80211/rc80211_minstrel.h
@@ -98,7 +98,6 @@ struct minstrel_sta_info {
u8 max_prob_rate;
unsigned int total_packets;
unsigned int sample_packets;
- int sample_deferred;

unsigned int sample_row;
unsigned int sample_column;


2020-11-24 02:45:21

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.14 10/60] net: Have netpoll bring-up DSA management interface

From: Florian Fainelli <[email protected]>

[ Upstream commit 1532b9778478577152201adbafa7738b1e844868 ]

DSA network devices rely on having their DSA management interface up and
running otherwise their ndo_open() will return -ENETDOWN. Without doing
this it would not be possible to use DSA devices as netconsole when
configured on the command line. These devices also do not utilize the
upper/lower linking so the check about the netpoll device having upper
is not going to be a problem.

The solution adopted here is identical to the one done for
net/ipv4/ipconfig.c with 728c02089a0e ("net: ipv4: handle DSA enabled
master network devices"), with the network namespace scope being
restricted to that of the process configuring netpoll.

Fixes: 04ff53f96a93 ("net: dsa: Add netconsole support")
Tested-by: Vladimir Oltean <[email protected]>
Signed-off-by: Florian Fainelli <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/core/netpoll.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)

--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/if_vlan.h>
+#include <net/dsa.h>
#include <net/tcp.h>
#include <net/udp.h>
#include <net/addrconf.h>
@@ -661,15 +662,15 @@ EXPORT_SYMBOL_GPL(__netpoll_setup);

int netpoll_setup(struct netpoll *np)
{
- struct net_device *ndev = NULL;
+ struct net_device *ndev = NULL, *dev = NULL;
+ struct net *net = current->nsproxy->net_ns;
struct in_device *in_dev;
int err;

rtnl_lock();
- if (np->dev_name[0]) {
- struct net *net = current->nsproxy->net_ns;
+ if (np->dev_name[0])
ndev = __dev_get_by_name(net, np->dev_name);
- }
+
if (!ndev) {
np_err(np, "%s doesn't exist, aborting\n", np->dev_name);
err = -ENODEV;
@@ -677,6 +678,19 @@ int netpoll_setup(struct netpoll *np)
}
dev_hold(ndev);

+ /* bring up DSA management network devices up first */
+ for_each_netdev(net, dev) {
+ if (!netdev_uses_dsa(dev))
+ continue;
+
+ err = dev_change_flags(dev, dev->flags | IFF_UP);
+ if (err < 0) {
+ np_err(np, "%s failed to open %s\n",
+ np->dev_name, dev->name);
+ goto put;
+ }
+ }
+
if (netdev_master_upper_dev_get(ndev)) {
np_err(np, "%s is a slave device, aborting\n", np->dev_name);
err = -EBUSY;


2020-11-24 02:45:24

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.14 23/60] vfs: remove lockdep bogosity in __sb_start_write

From: Darrick J. Wong <[email protected]>

[ Upstream commit 22843291efc986ce7722610073fcf85a39b4cb13 ]

__sb_start_write has some weird looking lockdep code that claims to
exist to handle nested freeze locking requests from xfs. The code as
written seems broken -- if we think we hold a read lock on any of the
higher freeze levels (e.g. we hold SB_FREEZE_WRITE and are trying to
lock SB_FREEZE_PAGEFAULT), it converts a blocking lock attempt into a
trylock.

However, it's not correct to downgrade a blocking lock attempt to a
trylock unless the downgrading code or the callers are prepared to deal
with that situation. Neither __sb_start_write nor its callers handle
this at all. For example:

sb_start_pagefault ignores the return value completely, with the result
that if xfs_filemap_fault loses a race with a different thread trying to
fsfreeze, it will proceed without pagefault freeze protection (thereby
breaking locking rules) and then unlocks the pagefault freeze lock that
it doesn't own on its way out (thereby corrupting the lock state), which
leads to a system hang shortly afterwards.

Normally, this won't happen because our ownership of a read lock on a
higher freeze protection level blocks fsfreeze from grabbing a write
lock on that higher level. *However*, if lockdep is offline,
lock_is_held_type unconditionally returns 1, which means that
percpu_rwsem_is_held returns 1, which means that __sb_start_write
unconditionally converts blocking freeze lock attempts into trylocks,
even when we *don't* hold anything that would block a fsfreeze.

Apparently this all held together until 5.10-rc1, when bugs in lockdep
caused lockdep to shut itself off early in an fstests run, and once
fstests gets to the "race writes with freezer" tests, kaboom. This
might explain the long trail of vanishingly infrequent livelocks in
fstests after lockdep goes offline that I've never been able to
diagnose.

We could fix it by spinning on the trylock if wait==true, but AFAICT the
locking works fine if lockdep is not built at all (and I didn't see any
complaints running fstests overnight), so remove this snippet entirely.

NOTE: Commit f4b554af9931 in 2015 created the current weird logic (which
used to exist in a different form in commit 5accdf82ba25c from 2012) in
__sb_start_write. XFS solved this whole problem in the late 2.6 era by
creating a variant of transactions (XFS_TRANS_NO_WRITECOUNT) that don't
grab intwrite freeze protection, thus making lockdep's solution
unnecessary. The commit claims that Dave Chinner explained that the
trylock hack + comment could be removed, but nobody ever did.

Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
fs/super.c | 33 ++++-----------------------------
1 file changed, 4 insertions(+), 29 deletions(-)

diff --git a/fs/super.c b/fs/super.c
index 219f7ca7c5d29..1d7461bca1600 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1336,36 +1336,11 @@ EXPORT_SYMBOL(__sb_end_write);
*/
int __sb_start_write(struct super_block *sb, int level, bool wait)
{
- bool force_trylock = false;
- int ret = 1;
+ if (!wait)
+ return percpu_down_read_trylock(sb->s_writers.rw_sem + level-1);

-#ifdef CONFIG_LOCKDEP
- /*
- * We want lockdep to tell us about possible deadlocks with freezing
- * but it's it bit tricky to properly instrument it. Getting a freeze
- * protection works as getting a read lock but there are subtle
- * problems. XFS for example gets freeze protection on internal level
- * twice in some cases, which is OK only because we already hold a
- * freeze protection also on higher level. Due to these cases we have
- * to use wait == F (trylock mode) which must not fail.
- */
- if (wait) {
- int i;
-
- for (i = 0; i < level - 1; i++)
- if (percpu_rwsem_is_held(sb->s_writers.rw_sem + i)) {
- force_trylock = true;
- break;
- }
- }
-#endif
- if (wait && !force_trylock)
- percpu_down_read(sb->s_writers.rw_sem + level-1);
- else
- ret = percpu_down_read_trylock(sb->s_writers.rw_sem + level-1);
-
- WARN_ON(force_trylock && !ret);
- return ret;
+ percpu_down_read(sb->s_writers.rw_sem + level-1);
+ return 1;
}
EXPORT_SYMBOL(__sb_start_write);

--
2.27.0



2020-11-24 02:45:25

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.14 43/60] ALSA: ctl: fix error path at adding user-defined element set

From: Takashi Sakamoto <[email protected]>

commit 95a793c3bc75cf888e0e641d656e7d080f487d8b upstream.

When processing request to add/replace user-defined element set, check
of given element identifier and decision of numeric identifier is done
in "__snd_ctl_add_replace()" helper function. When the result of check
is wrong, the helper function returns error code. The error code shall
be returned to userspace application.

Current implementation includes bug to return zero to userspace application
regardless of the result. This commit fixes the bug.

Cc: <[email protected]>
Fixes: e1a7bfe38079 ("ALSA: control: Fix race between adding and removing a user element")
Signed-off-by: Takashi Sakamoto <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
sound/core/control.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1387,7 +1387,7 @@ static int snd_ctl_elem_add(struct snd_c

unlock:
up_write(&card->controls_rwsem);
- return 0;
+ return err;
}

static int snd_ctl_elem_add_user(struct snd_ctl_file *file,


2020-11-24 02:45:26

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.14 31/60] can: dev: can_restart(): post buffer from the right context

From: Alejandro Concepcion Rodriguez <[email protected]>

[ Upstream commit a1e654070a60d5d4f7cce59c38f4ca790bb79121 ]

netif_rx() is meant to be called from interrupt contexts. can_restart() may be
called by can_restart_work(), which is called from a worqueue, so it may run in
process context. Use netif_rx_ni() instead.

Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface")
Co-developed-by: Loris Fauster <[email protected]>
Signed-off-by: Loris Fauster <[email protected]>
Signed-off-by: Alejandro Concepcion Rodriguez <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[mkl: use netif_rx_ni() instead of netif_rx_any_context()]
Signed-off-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/net/can/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index e79965a390aab..c483c4b787fee 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -578,7 +578,7 @@ static void can_restart(struct net_device *dev)
}
cf->can_id |= CAN_ERR_RESTARTED;

- netif_rx(skb);
+ netif_rx_ni(skb);

stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;
--
2.27.0



2020-11-24 04:33:08

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 4.14 11/60] netlabel: fix our progress tracking in netlbl_unlabel_staticlist()

From: Paul Moore <[email protected]>

[ Upstream commit 866358ec331f8faa394995fb4b511af1db0247c8 ]

The current NetLabel code doesn't correctly keep track of the netlink
dump state in some cases, in particular when multiple interfaces with
large configurations are loaded. The problem manifests itself by not
reporting the full configuration to userspace, even though it is
loaded and active in the kernel. This patch fixes this by ensuring
that the dump state is properly reset when necessary inside the
netlbl_unlabel_staticlist() function.

Fixes: 8cc44579d1bd ("NetLabel: Introduce static network labels for unlabeled connections")
Signed-off-by: Paul Moore <[email protected]>
Link: https://lore.kernel.org/r/160484450633.3752.16512718263560813473.stgit@sifl
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/netlabel/netlabel_unlabeled.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)

--- a/net/netlabel/netlabel_unlabeled.c
+++ b/net/netlabel/netlabel_unlabeled.c
@@ -1179,12 +1179,13 @@ static int netlbl_unlabel_staticlist(str
struct netlbl_unlhsh_walk_arg cb_arg;
u32 skip_bkt = cb->args[0];
u32 skip_chain = cb->args[1];
- u32 iter_bkt;
- u32 iter_chain = 0, iter_addr4 = 0, iter_addr6 = 0;
+ u32 skip_addr4 = cb->args[2];
+ u32 iter_bkt, iter_chain, iter_addr4 = 0, iter_addr6 = 0;
struct netlbl_unlhsh_iface *iface;
struct list_head *iter_list;
struct netlbl_af4list *addr4;
#if IS_ENABLED(CONFIG_IPV6)
+ u32 skip_addr6 = cb->args[3];
struct netlbl_af6list *addr6;
#endif

@@ -1195,7 +1196,7 @@ static int netlbl_unlabel_staticlist(str
rcu_read_lock();
for (iter_bkt = skip_bkt;
iter_bkt < rcu_dereference(netlbl_unlhsh)->size;
- iter_bkt++, iter_chain = 0, iter_addr4 = 0, iter_addr6 = 0) {
+ iter_bkt++) {
iter_list = &rcu_dereference(netlbl_unlhsh)->tbl[iter_bkt];
list_for_each_entry_rcu(iface, iter_list, list) {
if (!iface->valid ||
@@ -1203,7 +1204,7 @@ static int netlbl_unlabel_staticlist(str
continue;
netlbl_af4list_foreach_rcu(addr4,
&iface->addr4_list) {
- if (iter_addr4++ < cb->args[2])
+ if (iter_addr4++ < skip_addr4)
continue;
if (netlbl_unlabel_staticlist_gen(
NLBL_UNLABEL_C_STATICLIST,
@@ -1216,10 +1217,12 @@ static int netlbl_unlabel_staticlist(str
goto unlabel_staticlist_return;
}
}
+ iter_addr4 = 0;
+ skip_addr4 = 0;
#if IS_ENABLED(CONFIG_IPV6)
netlbl_af6list_foreach_rcu(addr6,
&iface->addr6_list) {
- if (iter_addr6++ < cb->args[3])
+ if (iter_addr6++ < skip_addr6)
continue;
if (netlbl_unlabel_staticlist_gen(
NLBL_UNLABEL_C_STATICLIST,
@@ -1232,8 +1235,12 @@ static int netlbl_unlabel_staticlist(str
goto unlabel_staticlist_return;
}
}
+ iter_addr6 = 0;
+ skip_addr6 = 0;
#endif /* IPv6 */
}
+ iter_chain = 0;
+ skip_chain = 0;
}

unlabel_staticlist_return:


2020-11-24 07:27:52

by Naresh Kamboju

[permalink] [raw]
Subject: Re: [PATCH 4.14 00/60] 4.14.209-rc1 review

On Mon, 23 Nov 2020 at 17:59, Greg Kroah-Hartman
<[email protected]> wrote:
>
> This is the start of the stable review cycle for the 4.14.209 release.
> There are 60 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, 25 Nov 2020 12:17:50 +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.14.209-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.14.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.

Tested-by: Linux Kernel Functional Testing <[email protected]>

Summary
------------------------------------------------------------------------

kernel: 4.14.209-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.14.y
git commit: c3391de31d51a6a479f081994040a5fb99b29c9b
git describe: v4.14.208-61-gc3391de31d51
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.14.y/build/v4.14.208-61-gc3391de31d51

No regressions (compared to build v4.14.208)

No fixes (compared to build v4.14.208)

Ran 41581 total tests in the following environments and test suites.

Environments
--------------
- arm
- arm64
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- juno-r2-kasan
- mips
- qemu-arm64-clang
- qemu-arm64-kasan
- qemu-x86_64-clang
- qemu-x86_64-kasan
- qemu_arm
- qemu_arm64
- qemu_arm64-compat
- qemu_i386
- qemu_x86_64
- qemu_x86_64-compat
- sparc
- x15 - arm
- x86_64
- x86-kasan

Test Suites
-----------
* build
* igt-gpu-tools
* install-android-platform-tools-r2600
* linux-log-parser
* ltp-commands-tests
* ltp-containers-tests
* ltp-controllers-tests
* ltp-dio-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-tracing-tests
* perf
* v4l2-compliance
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-mm-tests
* network-basic-tests
* ltp-open-posix-tests
* kvm-unit-tests

--
Linaro LKFT
https://lkft.linaro.org