The poll condition should only check response_length,
because reads should only be issued if there is data to read.
The response_read flag only prevents double writes.
The problem was that the write set the response_read to false,
enqued a tpm job, and returned. Then application called poll
which checked the response_read flag and returned EPOLLIN.
Then the application called read, but got nothing.
After all that the async_work kicked in.
Added also mutex_lock around the poll check to prevent
other possible race conditions.
Cc: stable(a)vger.kernel.org
Fixes: 9488585b21bef0df12 ("tpm: add support for partial reads")
Reported-by: Mantas Mikulėnas <grawity(a)gmail.com>
Tested-by: Mantas Mikulėnas <grawity(a)gmail.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk(a)intel.com>
---
drivers/char/tpm/tpm-dev-common.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm-dev-common.c b/drivers/char/tpm/tpm-dev-common.c
index 5eecad233ea1..744b0237300a 100644
--- a/drivers/char/tpm/tpm-dev-common.c
+++ b/drivers/char/tpm/tpm-dev-common.c
@@ -203,12 +203,19 @@ __poll_t tpm_common_poll(struct file *file, poll_table *wait)
__poll_t mask = 0;
poll_wait(file, &priv->async_wait, wait);
+ mutex_lock(&priv->buffer_mutex);
- if (!priv->response_read || priv->response_length)
+ /*
+ * The response_length indicates if there is still response
+ * (or part of it) to be consumed. Partial reads decrease it
+ * by the number of bytes read, and write resets it the zero.
+ */
+ if (priv->response_length)
mask = EPOLLIN | EPOLLRDNORM;
else
mask = EPOLLOUT | EPOLLWRNORM;
+ mutex_unlock(&priv->buffer_mutex);
return mask;
}
This is the start of the stable review cycle for the 4.19.38 release.
There are 100 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 Thu 02 May 2019 11:34:55 AM UTC.
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.19.38-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.38-rc1
Jakub Kicinski <jakub.kicinski(a)netronome.com>
net/tls: don't leak IV and record seq when offload fails
Jakub Kicinski <jakub.kicinski(a)netronome.com>
net/tls: avoid potential deadlock in tls_set_device_offload_rx()
Maxim Mikityanskiy <maximmi(a)mellanox.com>
net/mlx5e: Fix use-after-free after xdp_return_frame
Maxim Mikityanskiy <maximmi(a)mellanox.com>
net/mlx5e: Fix the max MTU check in case of XDP
Petr Machata <petrm(a)mellanox.com>
mlxsw: spectrum: Put MC TCs into DWRR mode
Ido Schimmel <idosch(a)mellanox.com>
mlxsw: pci: Reincrease PCI reset timeout
Jun Xiao <xiaojun2(a)hisilicon.com>
net: hns: Fix WARNING when hns modules installed
Hangbin Liu <liuhangbin(a)gmail.com>
team: fix possible recursive locking when add slaves
Su Bao Cheng <baocheng.su(a)siemens.com>
stmmac: pci: Adjust IOT2000 matching
Jakub Kicinski <jakub.kicinski(a)netronome.com>
net/tls: fix refcount adjustment in fallback
Vinod Koul <vkoul(a)kernel.org>
net: stmmac: move stmmac_check_ether_addr() to driver probe
Eric Dumazet <edumazet(a)google.com>
net/rose: fix unbound loop in rose_loopback_timer()
Zhu Yanjun <yanjun.zhu(a)oracle.com>
net: rds: exchange of 8K and 1M pool
Erez Alfasi <ereza(a)mellanox.com>
net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query
Amit Cohen <amitc(a)mellanox.com>
mlxsw: spectrum: Fix autoneg status in ethtool
ZhangXiaoxu <zhangxiaoxu5(a)huawei.com>
ipv4: set the tcp_min_rtt_wlen range from 0 to one day
Eric Dumazet <edumazet(a)google.com>
ipv4: add sanity checks in ipv4_link_failure()
Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
x86/fpu: Don't export __kernel_fpu_{begin,end}()
Jan Kara <jack(a)suse.cz>
mm: Fix warning in insert_pfn()
Daniel Borkmann <daniel(a)iogearbox.net>
x86/retpolines: Disable switch jump tables when retpolines are enabled
Daniel Borkmann <daniel(a)iogearbox.net>
x86, retpolines: Raise limit for generating indirect calls from switch-case
Al Viro <viro(a)zeniv.linux.org.uk>
Fix aio_poll() races
Al Viro <viro(a)zeniv.linux.org.uk>
aio: store event at final iocb_put()
Al Viro <viro(a)zeniv.linux.org.uk>
aio: keep io_event in aio_kiocb
Al Viro <viro(a)zeniv.linux.org.uk>
aio: fold lookup_kiocb() into its sole caller
Linus Torvalds <torvalds(a)linux-foundation.org>
pin iocb through aio.
Linus Torvalds <torvalds(a)linux-foundation.org>
aio: simplify - and fix - fget/fput for io_submit()
Mike Marshall <hubcap(a)omnibond.com>
aio: initialize kiocb private in case any filesystems expect it.
Jens Axboe <axboe(a)kernel.dk>
aio: abstract out io_event filler helper
Jens Axboe <axboe(a)kernel.dk>
aio: split out iocb copy from io_submit_one()
Jens Axboe <axboe(a)kernel.dk>
aio: use iocb_put() instead of open coding it
Jens Axboe <axboe(a)kernel.dk>
aio: don't zero entire aio_kiocb aio_get_req()
Christoph Hellwig <hch(a)lst.de>
aio: separate out ring reservation from req allocation
Jens Axboe <axboe(a)kernel.dk>
aio: use assigned completion handler
Christoph Hellwig <hch(a)lst.de>
aio: clear IOCB_HIPRI
Eric Dumazet <edumazet(a)google.com>
rxrpc: fix race condition in rxrpc_input_packet()
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
net/rds: Check address length before reading address family
YueHaibing <yuehaibing(a)huawei.com>
net: netrom: Fix error cleanup path of nr_proto_init
Xin Long <lucien.xin(a)gmail.com>
tipc: check link name with right length in tipc_nl_compat_link_set
Xin Long <lucien.xin(a)gmail.com>
tipc: check bearer name with right length in tipc_nl_compat_bearer_enable
Yue Haibing <yuehaibing(a)huawei.com>
fm10k: Fix a potential NULL pointer dereference
Florian Westphal <fw(a)strlen.de>
netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.
luca abeni <luca.abeni(a)santannapisa.it>
sched/deadline: Correctly handle active 0-lag timers
Todd Kjos <tkjos(a)android.com>
binder: fix handling of misaligned binder object
Tetsuo Handa <penguin-kernel(a)i-love.sakura.ne.jp>
workqueue: Try to catch flush_work() without INIT_WORK().
YueHaibing <yuehaibing(a)huawei.com>
fs/proc/proc_sysctl.c: Fix a NULL pointer dereference
Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
intel_th: gth: Fix an off-by-one in output unassigning
Linus Torvalds <torvalds(a)linux-foundation.org>
slip: make slhc_free() silently accept an error pointer
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
USB: Consolidate LPM checks to avoid enabling LPM twice
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
USB: Add new USB LPM helpers
Maarten Lankhorst <maarten.lankhorst(a)linux.intel.com>
drm/vc4: Fix compilation error reported by kbuild test bot
Dave Airlie <airlied(a)redhat.com>
Revert "drm/i915/fbdev: Actually configure untiled displays"
Maarten Lankhorst <maarten.lankhorst(a)linux.intel.com>
drm/vc4: Fix memory leak during gpu reset.
Michael Ellerman <mpe(a)ellerman.id.au>
powerpc/mm/radix: Make Radix require HUGETLB_PAGE
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning the cache
Achim Dahlhoff <Achim.Dahlhoff(a)de.bosch.com>
dmaengine: sh: rcar-dmac: Fix glitch in dmaengine_tx_status
Dirk Behme <dirk.behme(a)de.bosch.com>
dmaengine: sh: rcar-dmac: With cyclic DMA residue 0 is valid
Alex Williamson <alex.williamson(a)redhat.com>
vfio/type1: Limit DMA mappings per container
Lucas Stach <l.stach(a)pengutronix.de>
Input: synaptics-rmi4 - write config register values to the right offset
Harry Pan <harry.pan(a)intel.com>
perf/x86/intel: Update KBL Package C-state events to also include PC8/PC9/PC10 counters
NeilBrown <neilb(a)suse.com>
sunrpc: don't mark uninitialised items as VALID.
Trond Myklebust <trondmy(a)gmail.com>
nfsd: Don't release the callback slot unless it was actually held
Yan, Zheng <zyan(a)redhat.com>
ceph: fix ci->i_head_snapc leak
Jeff Layton <jlayton(a)kernel.org>
ceph: ensure d_name stability in ceph_dentry_hash()
Jeff Layton <jlayton(a)kernel.org>
ceph: only use d_name directly when parent is locked
Xie XiuQi <xiexiuqi(a)huawei.com>
sched/numa: Fix a possible divide-by-zero
Jason Gunthorpe <jgg(a)ziepe.ca>
RDMA/mlx5: Do not allow the user to write to the clock page
Josh Collier <josh.d.collier(a)intel.com>
IB/rdmavt: Fix frwr memory registration
Peter Zijlstra <peterz(a)infradead.org>
trace: Fix preempt_enable_no_resched() abuse
Aurelien Jarno <aurelien(a)aurel32.net>
MIPS: scall64-o32: Fix indirect syscall number load
YueHaibing <yuehaibing(a)huawei.com>
lib/Kconfig.debug: fix build error without CONFIG_BLOCK
Jérôme Glisse <jglisse(a)redhat.com>
zram: pass down the bvec we need to read into in the work struct
Baolin Wang <baolin.wang(a)linaro.org>
gpio: eic: sprd: Fix incorrect irq type setting for the sync EIC
Jann Horn <jannh(a)google.com>
tracing: Fix buffer_ref pipe ops
Wenwen Wang <wang6495(a)umn.edu>
tracing: Fix a memory leak by early error exit in trace_pid_write()
Frank Sorenson <sorenson(a)redhat.com>
cifs: do not attempt cifs operation on smb2+ rename error
Ronnie Sahlberg <lsahlber(a)redhat.com>
cifs: fix memory leak in SMB2_read
Heiner Kallweit <hkallweit1(a)gmail.com>
net: dsa: mv88e6xxx: add call to mv88e6xxx_ports_cmode_init to probe for new DSA framework
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda/ca0132 - Fix build error without CONFIG_PCI
Christophe Leroy <christophe.leroy(a)c-s.fr>
powerpc/vdso32: fix CLOCK_MONOTONIC on PPC64
Andrea Claudi <aclaudi(a)redhat.com>
ipvs: fix warning on unused variable
Adalbert Lazăr <alazar(a)bitdefender.com>
vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
Damian Kos <dkos(a)cadence.com>
drm/rockchip: fix for mailbox read validation.
Dongli Zhang <dongli.zhang(a)oracle.com>
loop: do not print warn message if partition scan is successful
Xin Long <lucien.xin(a)gmail.com>
tipc: handle the err returned from cmd header function
Dan Carpenter <dan.carpenter(a)oracle.com>
ext4: fix some error pointer dereferences
Antoine Tenart <antoine.tenart(a)bootlin.com>
net: mvpp2: fix validate for PPv2.1
Thomas Falcon <tlfalcon(a)linux.ibm.com>
net/ibmvnic: Fix RTNL deadlock during device reset
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: bogus EBUSY in helper removal from transaction
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: bogus EBUSY when deleting set after flush
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: fix set double-free in abort path
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_compat: use .release_ops and remove list of extension
Florian Westphal <fw(a)strlen.de>
netfilter: nft_compat: don't use refcount_inc on newly allocated entry
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: unbind set in rule from commit path
Florian Westphal <fw(a)strlen.de>
netfilter: nf_tables: warn when expr implements only one of activate/deactivate
Florian Westphal <fw(a)strlen.de>
netfilter: nft_compat: destroy function must not have side effects
Florian Westphal <fw(a)strlen.de>
netfilter: nf_tables: split set destruction in deactivate and destroy phase
Florian Westphal <fw(a)strlen.de>
netfilter: nft_compat: make lists per netns
Florian Westphal <fw(a)strlen.de>
netfilter: nft_compat: use refcnt_t type for nft_xt reference count
-------------
Diffstat:
Documentation/networking/ip-sysctl.txt | 1 +
Makefile | 4 +-
arch/arm/boot/compressed/head.S | 16 +-
arch/mips/kernel/scall64-o32.S | 2 +-
arch/powerpc/configs/skiroot_defconfig | 1 +
arch/powerpc/kernel/vdso32/gettimeofday.S | 2 +-
arch/powerpc/platforms/Kconfig.cputype | 2 +-
arch/x86/Makefile | 9 +
arch/x86/events/intel/cstate.c | 10 +-
arch/x86/include/asm/efi.h | 6 +-
arch/x86/include/asm/fpu/api.h | 15 +-
arch/x86/kernel/fpu/core.c | 6 +-
drivers/android/binder_alloc.c | 18 +-
drivers/block/loop.c | 5 +-
drivers/block/zram/zram_drv.c | 5 +-
drivers/dma/sh/rcar-dmac.c | 30 +-
drivers/gpio/gpio-eic-sprd.c | 1 +
drivers/gpu/drm/i915/intel_fbdev.c | 12 +-
drivers/gpu/drm/rockchip/cdn-dp-reg.c | 2 +-
drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
drivers/hwtracing/intel_th/gth.c | 2 +-
drivers/infiniband/hw/mlx5/main.c | 2 +
drivers/infiniband/sw/rdmavt/mr.c | 17 +-
drivers/input/rmi4/rmi_f11.c | 2 +-
drivers/net/dsa/mv88e6xxx/chip.c | 1 +
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 15 +-
drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 24 +-
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h | 3 +-
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +-
drivers/net/ethernet/mellanox/mlx5/core/port.c | 4 -
drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 2 +-
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 8 +-
drivers/net/slip/slhc.c | 2 +-
drivers/net/team/team.c | 7 +
drivers/usb/core/driver.c | 23 +-
drivers/usb/core/hub.c | 16 +-
drivers/usb/core/message.c | 3 +-
drivers/usb/core/sysfs.c | 5 +-
drivers/usb/core/usb.h | 10 +-
drivers/vfio/vfio_iommu_type1.c | 14 +
fs/aio.c | 366 ++++++++++-----------
fs/ceph/dir.c | 6 +-
fs/ceph/mds_client.c | 70 +++-
fs/ceph/snap.c | 7 +-
fs/cifs/inode.c | 4 +
fs/cifs/smb2pdu.c | 1 +
fs/ext4/xattr.c | 3 +
fs/nfs/super.c | 3 +-
fs/nfsd/nfs4callback.c | 8 +-
fs/nfsd/state.h | 1 +
fs/proc/proc_sysctl.c | 6 +-
fs/splice.c | 4 +-
include/linux/fs.h | 8 +-
include/linux/pipe_fs_i.h | 1 +
include/net/netfilter/nf_tables.h | 29 +-
include/net/netrom.h | 2 +-
kernel/sched/deadline.c | 3 +-
kernel/sched/fair.c | 4 +
kernel/trace/ring_buffer.c | 2 +-
kernel/trace/trace.c | 33 +-
kernel/workqueue.c | 3 +
lib/Kconfig.debug | 1 +
mm/memory.c | 9 +-
net/bridge/netfilter/ebtables.c | 3 +-
net/ipv4/route.c | 32 +-
net/ipv4/sysctl_net_ipv4.c | 5 +-
net/netfilter/ipvs/ip_vs_ctl.c | 3 +-
net/netfilter/nf_tables_api.c | 108 ++++--
net/netfilter/nft_compat.c | 192 +++--------
net/netfilter/nft_dynset.c | 22 +-
net/netfilter/nft_immediate.c | 6 +-
net/netfilter/nft_lookup.c | 21 +-
net/netfilter/nft_objref.c | 40 ++-
net/netrom/af_netrom.c | 76 +++--
net/netrom/nr_loopback.c | 2 +-
net/netrom/nr_route.c | 2 +-
net/netrom/sysctl_net_netrom.c | 5 +-
net/rds/af_rds.c | 3 +
net/rds/bind.c | 2 +
net/rds/ib_fmr.c | 11 +
net/rds/ib_rdma.c | 3 -
net/rose/rose_loopback.c | 27 +-
net/rxrpc/input.c | 12 +-
net/rxrpc/local_object.c | 3 +-
net/sunrpc/cache.c | 3 +
net/tipc/netlink_compat.c | 24 +-
net/tls/tls_device.c | 4 +-
net/tls/tls_device_fallback.c | 13 +-
net/tls/tls_main.c | 5 +-
net/tls/tls_sw.c | 3 +
net/vmw_vsock/virtio_transport_common.c | 22 +-
sound/pci/hda/patch_ca0132.c | 4 +-
98 files changed, 969 insertions(+), 593 deletions(-)
The ACEPC T8 and T11 Cherry Trail Z8350 mini PCs use an AXP288 and as PCs,
rather then portables, they does not have a battery. Still for some
reason the AXP288 not only thinks there is a battery, it actually
thinks it is discharging while the PC is running, slowly going to
0% full, causing userspace to shutdown the system due to the battery
being critically low after a while.
This commit adds the ACEPC T8 and T11 to the axp288 fuel-gauge driver
blacklist, so that we stop reporting bogus battery readings on this device.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1690852
Cc: stable(a)vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
---
drivers/power/supply/axp288_fuel_gauge.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
index 9ff2461820d8..368281bc0d2b 100644
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -685,6 +685,26 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)
* detection reports one despite it not being there.
*/
static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
+ {
+ /* ACEPC T8 Cherry Trail Z8350 mini PC */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T8"),
+ /* also match on somewhat unique bios-version */
+ DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
+ },
+ },
+ {
+ /* ACEPC T11 Cherry Trail Z8350 mini PC */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T11"),
+ /* also match on somewhat unique bios-version */
+ DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
+ },
+ },
{
/* Intel Cherry Trail Compute Stick, Windows version */
.matches = {
--
2.21.0
This is the start of the stable review cycle for the 4.14.115 release.
There are 53 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 Thu 02 May 2019 11:34:49 AM UTC.
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.115-r…
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 <gregkh(a)linuxfoundation.org>
Linux 4.14.115-rc1
ZhangXiaoxu <zhangxiaoxu5(a)huawei.com>
ipv4: set the tcp_min_rtt_wlen range from 0 to one day
Eric Dumazet <edumazet(a)google.com>
net/rose: fix unbound loop in rose_loopback_timer()
Kees Cook <keescook(a)chromium.org>
net/rose: Convert timers to use timer_setup()
Hangbin Liu <liuhangbin(a)gmail.com>
team: fix possible recursive locking when add slaves
Su Bao Cheng <baocheng.su(a)siemens.com>
stmmac: pci: Adjust IOT2000 matching
Vinod Koul <vkoul(a)kernel.org>
net: stmmac: move stmmac_check_ether_addr() to driver probe
Zhu Yanjun <yanjun.zhu(a)oracle.com>
net: rds: exchange of 8K and 1M pool
Erez Alfasi <ereza(a)mellanox.com>
net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query
Amit Cohen <amitc(a)mellanox.com>
mlxsw: spectrum: Fix autoneg status in ethtool
Eric Dumazet <edumazet(a)google.com>
ipv4: add sanity checks in ipv4_link_failure()
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "block/loop: Use global lock for ioctl() operation."
Jan Kara <jack(a)suse.cz>
mm: Fix warning in insert_pfn()
Daniel Borkmann <daniel(a)iogearbox.net>
x86/retpolines: Disable switch jump tables when retpolines are enabled
Daniel Borkmann <daniel(a)iogearbox.net>
x86, retpolines: Raise limit for generating indirect calls from switch-case
Mikulas Patocka <mpatocka(a)redhat.com>
dm integrity: change memcmp to strncmp in dm_integrity_ctr
Xin Long <lucien.xin(a)gmail.com>
tipc: check link name with right length in tipc_nl_compat_link_set
Xin Long <lucien.xin(a)gmail.com>
tipc: check bearer name with right length in tipc_nl_compat_bearer_enable
Yue Haibing <yuehaibing(a)huawei.com>
fm10k: Fix a potential NULL pointer dereference
Florian Westphal <fw(a)strlen.de>
netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.
luca abeni <luca.abeni(a)santannapisa.it>
sched/deadline: Correctly handle active 0-lag timers
Todd Kjos <tkjos(a)android.com>
binder: fix handling of misaligned binder object
Andrea Claudi <aclaudi(a)redhat.com>
ipvs: fix warning on unused variable
YueHaibing <yuehaibing(a)huawei.com>
fs/proc/proc_sysctl.c: Fix a NULL pointer dereference
Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
intel_th: gth: Fix an off-by-one in output unassigning
Linus Torvalds <torvalds(a)linux-foundation.org>
slip: make slhc_free() silently accept an error pointer
Xin Long <lucien.xin(a)gmail.com>
tipc: handle the err returned from cmd header function
Adalbert Lazăr <alazar(a)bitdefender.com>
vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
Dan Carpenter <dan.carpenter(a)oracle.com>
ext4: fix some error pointer dereferences
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
USB: Consolidate LPM checks to avoid enabling LPM twice
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
USB: Add new USB LPM helpers
Maarten Lankhorst <maarten.lankhorst(a)linux.intel.com>
drm/vc4: Fix compilation error reported by kbuild test bot
Dave Airlie <airlied(a)redhat.com>
Revert "drm/i915/fbdev: Actually configure untiled displays"
Maarten Lankhorst <maarten.lankhorst(a)linux.intel.com>
drm/vc4: Fix memory leak during gpu reset.
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning the cache
Dirk Behme <dirk.behme(a)de.bosch.com>
dmaengine: sh: rcar-dmac: With cyclic DMA residue 0 is valid
Alex Williamson <alex.williamson(a)redhat.com>
vfio/type1: Limit DMA mappings per container
Lucas Stach <l.stach(a)pengutronix.de>
Input: synaptics-rmi4 - write config register values to the right offset
NeilBrown <neilb(a)suse.com>
sunrpc: don't mark uninitialised items as VALID.
Trond Myklebust <trondmy(a)gmail.com>
nfsd: Don't release the callback slot unless it was actually held
Yan, Zheng <zyan(a)redhat.com>
ceph: fix ci->i_head_snapc leak
Jeff Layton <jlayton(a)kernel.org>
ceph: ensure d_name stability in ceph_dentry_hash()
Jeff Layton <jlayton(a)kernel.org>
ceph: only use d_name directly when parent is locked
Xie XiuQi <xiexiuqi(a)huawei.com>
sched/numa: Fix a possible divide-by-zero
Josh Collier <josh.d.collier(a)intel.com>
IB/rdmavt: Fix frwr memory registration
Peter Zijlstra <peterz(a)infradead.org>
trace: Fix preempt_enable_no_resched() abuse
Aurelien Jarno <aurelien(a)aurel32.net>
MIPS: scall64-o32: Fix indirect syscall number load
YueHaibing <yuehaibing(a)huawei.com>
lib/Kconfig.debug: fix build error without CONFIG_BLOCK
Jérôme Glisse <jglisse(a)redhat.com>
zram: pass down the bvec we need to read into in the work struct
Jann Horn <jannh(a)google.com>
tracing: Fix buffer_ref pipe ops
Wenwen Wang <wang6495(a)umn.edu>
tracing: Fix a memory leak by early error exit in trace_pid_write()
Frank Sorenson <sorenson(a)redhat.com>
cifs: do not attempt cifs operation on smb2+ rename error
Masahiro Yamada <yamada.masahiro(a)socionext.com>
kbuild: simplify ld-option implementation
-------------
Diffstat:
Documentation/networking/ip-sysctl.txt | 1 +
Makefile | 4 +-
arch/arm/boot/compressed/head.S | 16 ++++-
arch/mips/kernel/scall64-o32.S | 2 +-
arch/x86/Makefile | 9 +++
drivers/android/binder_alloc.c | 18 +++---
drivers/block/loop.c | 58 +++++++++---------
drivers/block/loop.h | 1 +
drivers/block/zram/zram_drv.c | 5 +-
drivers/dma/sh/rcar-dmac.c | 4 +-
drivers/gpu/drm/i915/intel_fbdev.c | 12 ++--
drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
drivers/hwtracing/intel_th/gth.c | 2 +-
drivers/infiniband/sw/rdmavt/mr.c | 17 +++---
drivers/input/rmi4/rmi_f11.c | 2 +-
drivers/md/dm-integrity.c | 6 +-
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/port.c | 4 --
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 8 ++-
drivers/net/slip/slhc.c | 2 +-
drivers/net/team/team.c | 6 ++
drivers/usb/core/driver.c | 23 +++++--
drivers/usb/core/hub.c | 16 ++---
drivers/usb/core/message.c | 3 +-
drivers/usb/core/sysfs.c | 5 +-
drivers/usb/core/usb.h | 10 +++-
drivers/vfio/vfio_iommu_type1.c | 14 +++++
fs/ceph/dir.c | 6 +-
fs/ceph/mds_client.c | 70 ++++++++++++++++++----
fs/ceph/snap.c | 7 ++-
fs/cifs/inode.c | 4 ++
fs/ext4/xattr.c | 3 +
fs/nfs/super.c | 3 +-
fs/nfsd/nfs4callback.c | 8 ++-
fs/nfsd/state.h | 1 +
fs/proc/proc_sysctl.c | 6 +-
fs/splice.c | 4 +-
include/linux/pipe_fs_i.h | 1 +
kernel/sched/deadline.c | 3 +-
kernel/sched/fair.c | 4 ++
kernel/trace/ring_buffer.c | 2 +-
kernel/trace/trace.c | 33 +++++-----
lib/Kconfig.debug | 1 +
mm/memory.c | 9 ++-
net/bridge/netfilter/ebtables.c | 3 +-
net/ipv4/route.c | 32 +++++++---
net/ipv4/sysctl_net_ipv4.c | 5 +-
net/netfilter/ipvs/ip_vs_ctl.c | 3 +-
net/rds/ib_fmr.c | 11 ++++
net/rds/ib_rdma.c | 3 -
net/rose/af_rose.c | 17 +++---
net/rose/rose_link.c | 16 +++--
net/rose/rose_loopback.c | 36 +++++------
net/rose/rose_route.c | 8 +--
net/rose/rose_timer.c | 30 ++++------
net/sunrpc/cache.c | 3 +
net/tipc/netlink_compat.c | 24 ++++++--
net/vmw_vsock/virtio_transport_common.c | 22 ++++---
scripts/Kbuild.include | 4 +-
62 files changed, 424 insertions(+), 220 deletions(-)
This is the start of the stable review cycle for the 4.9.172 release.
There are 41 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 Thu 02 May 2019 11:34:41 AM UTC.
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.172-rc…
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 <gregkh(a)linuxfoundation.org>
Linux 4.9.172-rc1
Peter Oskolkov <posk(a)google.com>
net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c
Peter Oskolkov <posk(a)google.com>
net: IP6 defrag: use rbtrees for IPv6 defrag
Florian Westphal <fw(a)strlen.de>
ipv6: remove dependency of nf_defrag_ipv6 on ipv6 module
Peter Oskolkov <posk(a)google.com>
net: IP defrag: encapsulate rbtree defrag code into callable functions
Eric Dumazet <edumazet(a)google.com>
ipv6: frags: fix a lockdep false positive
ZhangXiaoxu <zhangxiaoxu5(a)huawei.com>
ipv4: set the tcp_min_rtt_wlen range from 0 to one day
Vinod Koul <vkoul(a)kernel.org>
net: stmmac: move stmmac_check_ether_addr() to driver probe
Hangbin Liu <liuhangbin(a)gmail.com>
team: fix possible recursive locking when add slaves
Zhu Yanjun <yanjun.zhu(a)oracle.com>
net: rds: exchange of 8K and 1M pool
Erez Alfasi <ereza(a)mellanox.com>
net/mlx5e: ethtool, Remove unsupported SFP EEPROM high pages query
Amit Cohen <amitc(a)mellanox.com>
mlxsw: spectrum: Fix autoneg status in ethtool
Eric Dumazet <edumazet(a)google.com>
ipv4: add sanity checks in ipv4_link_failure()
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "block/loop: Use global lock for ioctl() operation."
Xin Long <lucien.xin(a)gmail.com>
tipc: check link name with right length in tipc_nl_compat_link_set
Xin Long <lucien.xin(a)gmail.com>
tipc: check bearer name with right length in tipc_nl_compat_bearer_enable
Yue Haibing <yuehaibing(a)huawei.com>
fm10k: Fix a potential NULL pointer dereference
Florian Westphal <fw(a)strlen.de>
netfilter: ebtables: CONFIG_COMPAT: drop a bogus WARN_ON
Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>
NFS: Forbid setting AF_INET6 to "struct sockaddr_in"->sin_family.
YueHaibing <yuehaibing(a)huawei.com>
fs/proc/proc_sysctl.c: Fix a NULL pointer dereference
Alexander Shishkin <alexander.shishkin(a)linux.intel.com>
intel_th: gth: Fix an off-by-one in output unassigning
Linus Torvalds <torvalds(a)linux-foundation.org>
slip: make slhc_free() silently accept an error pointer
Xin Long <lucien.xin(a)gmail.com>
tipc: handle the err returned from cmd header function
Adalbert Lazăr <alazar(a)bitdefender.com>
vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
USB: Consolidate LPM checks to avoid enabling LPM twice
Kai-Heng Feng <kai.heng.feng(a)canonical.com>
USB: Add new USB LPM helpers
Maarten Lankhorst <maarten.lankhorst(a)linux.intel.com>
drm/vc4: Fix compilation error reported by kbuild test bot
Maarten Lankhorst <maarten.lankhorst(a)linux.intel.com>
drm/vc4: Fix memory leak during gpu reset.
Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning the cache
Dirk Behme <dirk.behme(a)de.bosch.com>
dmaengine: sh: rcar-dmac: With cyclic DMA residue 0 is valid
Lucas Stach <l.stach(a)pengutronix.de>
Input: synaptics-rmi4 - write config register values to the right offset
NeilBrown <neilb(a)suse.com>
sunrpc: don't mark uninitialised items as VALID.
Trond Myklebust <trondmy(a)gmail.com>
nfsd: Don't release the callback slot unless it was actually held
Yan, Zheng <zyan(a)redhat.com>
ceph: fix ci->i_head_snapc leak
Jeff Layton <jlayton(a)kernel.org>
ceph: ensure d_name stability in ceph_dentry_hash()
Xie XiuQi <xiexiuqi(a)huawei.com>
sched/numa: Fix a possible divide-by-zero
Josh Collier <josh.d.collier(a)intel.com>
IB/rdmavt: Fix frwr memory registration
Peter Zijlstra <peterz(a)infradead.org>
trace: Fix preempt_enable_no_resched() abuse
Aurelien Jarno <aurelien(a)aurel32.net>
MIPS: scall64-o32: Fix indirect syscall number load
Wenwen Wang <wang6495(a)umn.edu>
tracing: Fix a memory leak by early error exit in trace_pid_write()
Frank Sorenson <sorenson(a)redhat.com>
cifs: do not attempt cifs operation on smb2+ rename error
Masahiro Yamada <yamada.masahiro(a)socionext.com>
kbuild: simplify ld-option implementation
-------------
Diffstat:
Documentation/networking/ip-sysctl.txt | 1 +
Makefile | 4 +-
arch/arm/boot/compressed/head.S | 16 +-
arch/mips/kernel/scall64-o32.S | 2 +-
drivers/block/loop.c | 42 +--
drivers/block/loop.h | 1 +
drivers/dma/sh/rcar-dmac.c | 4 +-
drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
drivers/hwtracing/intel_th/gth.c | 2 +-
drivers/infiniband/sw/rdmavt/mr.c | 17 +-
drivers/input/rmi4/rmi_f11.c | 2 +-
drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/port.c | 4 -
drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +-
drivers/net/slip/slhc.c | 2 +-
drivers/net/team/team.c | 6 +
drivers/usb/core/driver.c | 23 +-
drivers/usb/core/hub.c | 16 +-
drivers/usb/core/message.c | 3 +-
drivers/usb/core/sysfs.c | 5 +-
drivers/usb/core/usb.h | 10 +-
fs/ceph/dir.c | 6 +-
fs/ceph/mds_client.c | 9 +
fs/ceph/snap.c | 7 +-
fs/cifs/inode.c | 4 +
fs/nfs/super.c | 3 +-
fs/nfsd/nfs4callback.c | 8 +-
fs/nfsd/state.h | 1 +
fs/proc/proc_sysctl.c | 6 +-
include/net/inet_frag.h | 16 +-
include/net/ipv6.h | 29 --
include/net/ipv6_frag.h | 111 +++++++
kernel/sched/fair.c | 4 +
kernel/trace/ring_buffer.c | 2 +-
kernel/trace/trace.c | 5 +-
net/bridge/netfilter/ebtables.c | 3 +-
net/ieee802154/6lowpan/reassembly.c | 2 +-
net/ipv4/inet_fragment.c | 293 +++++++++++++++++
net/ipv4/ip_fragment.c | 295 ++---------------
net/ipv4/route.c | 32 +-
net/ipv4/sysctl_net_ipv4.c | 5 +-
net/ipv6/netfilter/nf_conntrack_reasm.c | 273 +++++-----------
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c | 3 +-
net/ipv6/reassembly.c | 361 ++++++---------------
net/openvswitch/conntrack.c | 1 +
net/rds/ib_fmr.c | 11 +
net/rds/ib_rdma.c | 3 -
net/sunrpc/cache.c | 3 +
net/tipc/netlink_compat.c | 24 +-
net/vmw_vsock/virtio_transport_common.c | 22 +-
scripts/Kbuild.include | 4 +-
53 files changed, 866 insertions(+), 854 deletions(-)
In linux stable kernel (tested on 4.14), reading memory.stat in case
of tens of thousands of ghost cgroups pinned by lingering page cache
takes up to 100 ms ~ 700 ms to complete the reading.
Repro steps (tested on 4.14 kernel):
$ cat /tmp/make_zombies
mkdir /tmp/fs
mount -t tmpfs nodev /tmp/fs
for i in {1..10000}; do
mkdir /sys/fs/cgroup/memory/z$i
(echo $BASHPID >> /sys/fs/cgroup/memory/z$i/cgroup.procs && echo $i
> /tmp/fs/$i)
done
# establish baseline
$ perf stat -r3 cat /sys/fs/cgroup/memory/memory.stat > /dev/null
0.011642670 seconds time elapsed
$ bash /tmp/make_zombies
$ perf stat -r3 cat /sys/fs/cgroup/memory/memory.stat > /dev/null
0.134939281 seconds time elapsed
$ rmdir /sys/fs/cgroup/memory/z*
$ perf stat -r3 cat /sys/fs/cgroup/memory/memory.stat > /dev/null
0.135323145 seconds time elapsed
# even after rmdir we have zombies, so still slow.
The fix is already present in linux master (since 4.16) by following commits:
c9019e9bf42e66d028d70d2da6206cad4dd9250d mm: memcontrol: eliminate raw
access to stat and event counters
284542656e22c43fdada8c8cc0ca9ede8453eed7 mm: memcontrol: implement
lruvec stat functions on top of each other
a983b5ebee57209c99f68c8327072f25e0e6e3da mm: memcontrol: fix
excessive complexity in memory.stat reporting
c3cc39118c3610eb6ab4711bc624af7fc48a35fe mm: memcontrol: fix
NR_WRITEBACK leak in memcg and system stats
e27be240df53f1a20c659168e722b5d9f16cc7f4 mm: memcg: make sure
memory.events is uptodate when waking pollers
I would like to request cherry-picking the above commits to
linux-stable branch - 4.14.
Thanks,
Vaibhav
The Linux kernel will auto-disables all boot consoles whenever it
gets a preferred real console.
Currently on RISC-V systems, if we have a real console which is not
RISCV SBI console then boot consoles (such as earlycon=sbi) are not
auto-disabled when a real console (ttyS0 or ttySIF0) is available.
This results in duplicate prints at boot-time after kernel starts
using real console (i.e. ttyS0 or ttySIF0) if "earlycon=" kernel
parameter was passed by bootloader.
The reason for above issue is that RISCV SBI console always adds
itself as preferred console which is causing other real consoles
to be not used as preferred console.
Ideally "console=" kernel parameter passed by bootloaders should
be the one selecting a preferred real console.
This patch fixes above issue by not forcing RISCV SBI console as
preferred console.
Fixes: afa6b1ccfad5 ("tty: New RISC-V SBI console driver")
Cc: stable(a)vger.kernel.org
Signed-off-by: Anup Patel <anup.patel(a)wdc.com>
---
drivers/tty/hvc/hvc_riscv_sbi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/tty/hvc/hvc_riscv_sbi.c b/drivers/tty/hvc/hvc_riscv_sbi.c
index 75155bde2b88..31f53fa77e4a 100644
--- a/drivers/tty/hvc/hvc_riscv_sbi.c
+++ b/drivers/tty/hvc/hvc_riscv_sbi.c
@@ -53,7 +53,6 @@ device_initcall(hvc_sbi_init);
static int __init hvc_sbi_console_init(void)
{
hvc_instantiate(0, 0, &hvc_sbi_ops);
- add_preferred_console("hvc", 0, NULL);
return 0;
}
--
2.17.1