I'm announcing the release of the 3.18.122 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/alpha/kernel/osf_sys.c | 64 ++++++++++------------
arch/arm/boot/dts/tegra30-cardhu.dtsi | 1
arch/powerpc/include/asm/fadump.h | 3 -
arch/powerpc/kernel/fadump.c | 92 +++++++++++++++++++++++++++-----
arch/powerpc/platforms/pseries/ras.c | 2
arch/sparc/kernel/sys_sparc_32.c | 22 ++++---
arch/sparc/kernel/sys_sparc_64.c | 20 ++++---
drivers/iio/frequency/ad9523.c | 4 -
drivers/md/bcache/writeback.c | 4 +
drivers/md/dm-cache-metadata.c | 3 -
drivers/pwm/pwm-tiehrpwm.c | 2
drivers/spi/spi-davinci.c | 2
drivers/video/fbdev/core/fbmem.c | 38 +++++++++++--
fs/nfs/blocklayout/dev.c | 2
fs/ubifs/journal.c | 7 ++
fs/ubifs/lprops.c | 8 +-
fs/xattr.c | 2
include/video/udlfb.h | 2
kernel/kthread.c | 8 ++
kernel/sys.c | 95 ++++++++++++++++------------------
kernel/trace/blktrace.c | 4 +
kernel/trace/trace.c | 4 +
kernel/trace/trace_uprobe.c | 2
kernel/user_namespace.c | 39 ++++++-------
kernel/utsname_sysctl.c | 41 ++++++++------
mm/memory.c | 9 ---
net/9p/client.c | 2
net/9p/trans_fd.c | 7 ++
net/9p/trans_rdma.c | 3 +
net/9p/trans_virtio.c | 6 +-
31 files changed, 308 insertions(+), 192 deletions(-)
Al Viro (1):
osf_getdomainname(): use copy_to_user()
Bartosz Golaszewski (1):
spi: davinci: fix a NULL pointer dereference
Christian Brauner (1):
getxattr: use correct xattr length
Dan Carpenter (1):
pnfs/blocklayout: off by one in bl_map_stripe()
Eric W. Biederman (1):
userns; Correct the comment in map_write
Greg Kroah-Hartman (1):
Linux 3.18.122
Hari Bathini (1):
powerpc/fadump: handle crash memory ranges array index overflow
Jann Horn (2):
sys: don't hold uts_sem while accessing userspace memory
userns: move user access out of the mutex
Jon Hunter (1):
ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
Lars-Peter Clausen (2):
iio: ad9523: Fix displayed phase
iio: ad9523: Fix return value for ad952x_store()
Mahesh Salgaonkar (1):
powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
Mike Snitzer (1):
dm cache metadata: save in-core policy_hint_size to on-disk superblock
Mikulas Patocka (2):
fb: fix lost console when the user unplugs a USB adapter
udlfb: set optimal write delay
Peter Zijlstra (1):
mm/tlb: Remove tlb_remove_table() non-concurrent condition
Richard Weinberger (3):
ubifs: Fix memory leak in lprobs self-check
Revert "UBIFS: Fix potential integer overflow in allocation"
ubifs: Fix synced_i_size calculation for xattr inodes
Shan Hai (1):
bcache: release dc->writeback_lock properly in bch_writeback_thread()
Snild Dolkow (1):
kthread, tracing: Don't expose half-written comm when creating kthreads
Steven Rostedt (VMware) (3):
tracing: Do not call start/stop() functions when tracing_on does not change
tracing/blktrace: Fix to allow setting same value
uprobes: Use synchronize_rcu() not synchronize_sched()
Tomas Bortoli (3):
net/9p/client.c: version pointer uninitialized
net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
9p: fix multiple NULL-pointer-dereferences
Vignesh R (1):
pwm: tiehrpwm: Fix disabling of output of PWMs
jiangyiwen (1):
9p/virtio: fix off-by-one error in sg list bounds check
From: Al Viro <viro(a)zeniv.linux.org.uk>
cls_u32.c misuses refcounts for struct tc_u_hnode - it counts references via
->hlist and via ->tp_root together. u32_destroy() drops the former and, in
case when there had been links, leaves the sucker on the list. As the result,
there's nothing to protect it from getting freed once links are dropped.
That also makes the "is it busy" check incapable of catching the root hnode -
it *is* busy (there's a reference from tp), but we don't see it as something
separate. "Is it our root?" check partially covers that, but the problem
exists for others' roots as well.
AFAICS, the minimal fix preserving the existing behaviour (where it doesn't
include oopsen, that is) would be this:
* count tp->root and tp_c->hlist as separate references. I.e.
have u32_init() set refcount to 2, not 1.
* in u32_destroy() we always drop the former; in u32_destroy_hnode() -
the latter.
That way we have *all* references contributing to refcount. List
removal happens in u32_destroy_hnode() (called only when ->refcnt is 1)
an in u32_destroy() in case of tc_u_common going away, along with everything
reachable from it. IOW, that way we know that u32_destroy_key() won't
free something still on the list (or pointed to by someone's ->root).
Cc: stable(a)vger.kernel.org
Signed-off-by: Al Viro <viro(a)zeniv.linux.org.uk>
---
net/sched/cls_u32.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index f218ccf1e2d9..b2c3406a2cf2 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -398,6 +398,7 @@ static int u32_init(struct tcf_proto *tp)
rcu_assign_pointer(tp_c->hlist, root_ht);
root_ht->tp_c = tp_c;
+ root_ht->refcnt++;
rcu_assign_pointer(tp->root, root_ht);
tp->data = tp_c;
return 0;
@@ -610,7 +611,7 @@ static int u32_destroy_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht,
struct tc_u_hnode __rcu **hn;
struct tc_u_hnode *phn;
- WARN_ON(ht->refcnt);
+ WARN_ON(--ht->refcnt);
u32_clear_hnode(tp, ht, extack);
@@ -649,7 +650,7 @@ static void u32_destroy(struct tcf_proto *tp, struct netlink_ext_ack *extack)
WARN_ON(root_ht == NULL);
- if (root_ht && --root_ht->refcnt == 0)
+ if (root_ht && --root_ht->refcnt == 1)
u32_destroy_hnode(tp, root_ht, extack);
if (--tp_c->refcnt == 0) {
@@ -698,7 +699,6 @@ static int u32_delete(struct tcf_proto *tp, void *arg, bool *last,
}
if (ht->refcnt == 1) {
- ht->refcnt--;
u32_destroy_hnode(tp, ht, extack);
} else {
NL_SET_ERR_MSG_MOD(extack, "Can not delete in-use filter");
@@ -708,11 +708,11 @@ static int u32_delete(struct tcf_proto *tp, void *arg, bool *last,
out:
*last = true;
if (root_ht) {
- if (root_ht->refcnt > 1) {
+ if (root_ht->refcnt > 2) {
*last = false;
goto ret;
}
- if (root_ht->refcnt == 1) {
+ if (root_ht->refcnt == 2) {
if (!ht_empty(root_ht)) {
*last = false;
goto ret;
--
2.11.0
I'm announcing the release of the 4.18.7 kernel.
All users of the 4.18 kernel series must upgrade.
The updated 4.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/alpha/kernel/osf_sys.c | 51 ++++-----
arch/arm/boot/dts/am571x-idk.dts | 4
arch/arm/boot/dts/am572x-idk-common.dtsi | 4
arch/arm/boot/dts/am57xx-idk-common.dtsi | 7 +
arch/arm/boot/dts/tegra30-cardhu.dtsi | 1
arch/arm64/Kconfig | 1
arch/arm64/crypto/sm4-ce-glue.c | 2
arch/powerpc/include/asm/fadump.h | 3
arch/powerpc/include/asm/nohash/pgtable.h | 9 -
arch/powerpc/include/asm/pkeys.h | 11 -
arch/powerpc/kernel/fadump.c | 91 +++++++++++++---
arch/powerpc/kernel/process.c | 1
arch/powerpc/kvm/book3s_hv.c | 1
arch/powerpc/mm/mmu_context_book3s64.c | 8 -
arch/powerpc/mm/mmu_context_iommu.c | 17 +--
arch/powerpc/mm/pgtable-book3s64.c | 17 +--
arch/powerpc/mm/pkeys.c | 134 +++++++-----------------
arch/powerpc/platforms/powernv/pci-ioda.c | 37 ++++++
arch/powerpc/platforms/pseries/ras.c | 2
arch/sparc/kernel/sys_sparc_32.c | 22 ++-
arch/sparc/kernel/sys_sparc_64.c | 20 ++-
arch/x86/crypto/aesni-intel_asm.S | 66 +++++------
arch/x86/kernel/kexec-bzimage64.c | 2
arch/x86/kvm/vmx.c | 26 ++--
arch/xtensa/include/asm/cacheasm.h | 69 +++++++-----
block/bfq-cgroup.c | 3
block/blk-core.c | 61 ++++++----
block/blk-lib.c | 10 +
block/blk-sysfs.c | 15 ++
block/blk.h | 1
certs/system_keyring.c | 3
crypto/asymmetric_keys/pkcs7_key_type.c | 2
drivers/acpi/acpica/hwsleep.c | 11 -
drivers/acpi/acpica/psloop.c | 17 +--
drivers/block/zram/zram_drv.c | 7 +
drivers/cpufreq/cpufreq_governor.c | 12 +-
drivers/cpuidle/governors/menu.c | 47 ++++++--
drivers/crypto/caam/caamalg_qi.c | 6 -
drivers/crypto/caam/caampkc.c | 20 +--
drivers/crypto/caam/jr.c | 3
drivers/crypto/vmx/aes_cbc.c | 30 ++---
drivers/crypto/vmx/aes_xts.c | 21 ++-
drivers/dma-buf/reservation.c | 6 -
drivers/extcon/extcon.c | 3
drivers/hv/channel.c | 40 ++++---
drivers/hv/channel_mgmt.c | 10 +
drivers/i2c/busses/i2c-designware-master.c | 1
drivers/i2c/busses/i2c-designware-platdrv.c | 7 +
drivers/iio/accel/sca3000.c | 1
drivers/iio/frequency/ad9523.c | 4
drivers/infiniband/hw/mlx5/main.c | 2
drivers/infiniband/hw/mlx5/qp.c | 6 -
drivers/infiniband/sw/rxe/rxe_comp.c | 1
drivers/infiniband/ulp/srpt/ib_srpt.c | 34 ++++--
drivers/infiniband/ulp/srpt/ib_srpt.h | 4
drivers/iommu/dmar.c | 6 -
drivers/iommu/intel-iommu.c | 18 +++
drivers/iommu/ipmmu-vmsa.c | 7 +
drivers/mailbox/mailbox-xgene-slimpro.c | 6 -
drivers/md/bcache/writeback.c | 4
drivers/md/dm-cache-metadata.c | 13 +-
drivers/md/dm-crypt.c | 10 -
drivers/md/dm-integrity.c | 6 -
drivers/md/dm-thin.c | 2
drivers/md/dm-writecache.c | 2
drivers/media/i2c/tvp5150.c | 2
drivers/mfd/hi655x-pmic.c | 2
drivers/misc/cxl/main.c | 2
drivers/misc/ocxl/link.c | 24 ++--
drivers/misc/vmw_balloon.c | 67 +++++++-----
drivers/mmc/core/queue.c | 12 +-
drivers/mmc/core/queue.h | 1
drivers/mmc/host/renesas_sdhi_internal_dmac.c | 10 +
drivers/net/wireless/marvell/libertas/dev.h | 1
drivers/net/wireless/marvell/libertas/if_sdio.c | 30 ++++-
drivers/nvdimm/bus.c | 4
drivers/nvdimm/dimm_devs.c | 31 +++++
drivers/nvdimm/namespace_devs.c | 6 -
drivers/nvdimm/nd-core.h | 8 +
drivers/nvdimm/region_devs.c | 24 ++++
drivers/pwm/pwm-omap-dmtimer.c | 5
drivers/pwm/pwm-tiehrpwm.c | 14 --
drivers/rtc/rtc-omap.c | 18 +--
drivers/spi/spi-cadence.c | 2
drivers/spi/spi-davinci.c | 2
drivers/spi/spi-fsl-dspi.c | 24 ++--
drivers/spi/spi-pxa2xx.c | 4
drivers/tty/serial/serial_core.c | 17 ++-
drivers/video/fbdev/core/fbmem.c | 38 +++++-
drivers/video/fbdev/udlfb.c | 105 ++++++++++--------
fs/9p/xattr.c | 6 -
fs/lockd/clntlock.c | 2
fs/lockd/clntproc.c | 2
fs/lockd/svclock.c | 16 +-
fs/lockd/svcsubs.c | 4
fs/nfs/blocklayout/dev.c | 2
fs/nfs/callback_proc.c | 14 +-
fs/nfs/nfs4proc.c | 9 +
fs/nfs/pnfs_nfs.c | 16 +-
fs/nfsd/nfs4state.c | 2
fs/overlayfs/readdir.c | 19 +++
fs/quota/quota.c | 2
fs/ubifs/dir.c | 5
fs/ubifs/journal.c | 21 +++
fs/ubifs/lprops.c | 8 -
fs/ubifs/xattr.c | 24 ++++
fs/udf/super.c | 31 +++--
fs/xattr.c | 2
include/linux/blk-cgroup.h | 18 +++
include/linux/hyperv.h | 2
include/linux/intel-iommu.h | 8 -
include/linux/lockd/lockd.h | 4
include/linux/mm_types.h | 5
include/linux/overflow.h | 31 +++++
include/linux/sunrpc/clnt.h | 1
include/linux/verification.h | 6 +
include/uapi/linux/eventpoll.h | 8 -
include/video/udlfb.h | 5
kernel/livepatch/core.c | 6 +
kernel/memremap.c | 1
kernel/power/Kconfig | 1
kernel/printk/printk_safe.c | 4
kernel/rcu/tree_exp.h | 9 +
kernel/sched/idle.c | 2
kernel/sys.c | 95 ++++++++---------
kernel/trace/blktrace.c | 4
kernel/trace/trace.c | 4
kernel/trace/trace_uprobe.c | 2
kernel/user_namespace.c | 24 +---
kernel/utsname_sysctl.c | 41 ++++---
mm/hmm.c | 2
mm/memory.c | 9 -
mm/readahead.c | 12 +-
net/9p/client.c | 2
net/9p/trans_fd.c | 7 +
net/9p/trans_rdma.c | 3
net/9p/trans_virtio.c | 13 ++
net/9p/trans_xen.c | 3
net/ieee802154/6lowpan/tx.c | 21 +++
net/mac802154/tx.c | 15 ++
net/sunrpc/clnt.c | 28 +++--
scripts/kconfig/Makefile | 5
security/apparmor/secid.c | 1
security/commoncap.c | 2
sound/ac97/bus.c | 4
sound/ac97/snd_ac97_compat.c | 19 +++
tools/perf/util/auxtrace.c | 3
148 files changed, 1373 insertions(+), 765 deletions(-)
Adrian Hunter (2):
mmc: block: Fix unsupported parallel dispatch of requests
perf auxtrace: Fix queue resize
Alexander Aring (2):
net: 6lowpan: fix reserved space for single frames
net: mac802154: tx: expand tailroom if necessary
Amir Goldstein (2):
ovl: fix wrong use of impure dir cache in ovl_iterate()
nfsd: fix leaked file lock with nfs exported overlayfs
Ard Biesheuvel (1):
crypto: arm64/sm4-ce - check for the right CPU feature bit
Bart Van Assche (9):
blkcg: Introduce blkg_root_lookup()
block: Introduce blk_exit_queue()
block: Ensure that a request queue is dissociated from the cgroup controller
IB/srpt: Fix srpt_cm_req_recv() error path (1/2)
IB/srpt: Fix srpt_cm_req_recv() error path (2/2)
IB/srpt: Support HCAs with more than two ports
ib_srpt: Fix a use-after-free in srpt_close_ch()
ib_srpt: Fix a use-after-free in __srpt_close_all_ch()
RDMA/rxe: Set wqe->status correctly if an unexpected response is received
Bartosz Golaszewski (1):
spi: davinci: fix a NULL pointer dereference
Benjamin Herrenschmidt (1):
powerpc/powernv/pci: Work around races in PCI bridge enabling
Bill Baker (1):
NFSv4 client live hangs after live data migration recovery
Boqun Feng (1):
rcu: Make expedited GPs handle CPU 0 being offline
Chanwoo Choi (1):
extcon: Release locking when sending the notification of connector state
Chirantan Ekbote (1):
9p/net: Fix zero-copy path in the 9p virtio transport
Christian Brauner (1):
getxattr: use correct xattr length
Christophe Leroy (1):
powerpc/nohash: fix pte_access_permitted()
Dan Carpenter (1):
pnfs/blocklayout: off by one in bl_map_stripe()
Dan Williams (1):
mm, dev_pagemap: Do not clear ->mapping on final put
Daniel Mack (1):
libertas: fix suspend and resume for SDIO connected cards
Dave Watson (1):
crypto: aesni - Use unaligned loads from gcm_context_data
David Rivshin (1):
pwm: omap-dmtimer: Return -EPROBE_DEFER if no dmtimer platform data
Dexuan Cui (2):
Drivers: hv: vmbus: Fix the offer_in_progress in vmbus_process_offer()
Drivers: hv: vmbus: Reset the channel callback in vmbus_onoffer_rescind()
Dmitry Osipenko (1):
iommu/ipmmu-vmsa: Don't register as BUS IOMMU if machine doesn't have IPMMU-VMSA
Eddie.Horng (1):
cap_inode_getsecurity: use d_find_any_alias() instead of d_find_alias()
Erik Schmauss (1):
ACPICA: AML Parser: skip opcodes that open a scope upon parse failure
Frederic Barrat (1):
ocxl: Fix page fault handler in case of fault on dying process
Greg Kroah-Hartman (2):
eventpoll.h: wrap casts in () properly
Linux 4.18.7
Gustavo A. R. Silva (2):
mailbox: xgene-slimpro: Fix potential NULL pointer dereference
iio: sca3000: Fix missing return in switch
Hans de Goede (1):
i2c: designware: Re-init controllers with pm_disabled set on resume
Hari Bathini (1):
powerpc/fadump: handle crash memory ranges array index overflow
Henry Willard (1):
cpufreq: governor: Avoid accessing invalid governor_data
Horia Geantă (3):
crypto: caam - fix DMA mapping direction for RSA forms 2 & 3
crypto: caam/jr - fix descriptor DMA unmapping
crypto: caam/qi - fix error path in xts setkey
Hou Tao (1):
dm thin: stop no_space_timeout worker when switching to write-mode
Ilya Dryomov (1):
dm cache metadata: set dirty on all cache blocks after a crash
Jacob Pan (2):
iommu/vt-d: Add definitions for PFSID
iommu/vt-d: Fix dev iotlb pfsid use
James Morse (1):
arm64: mm: always enable CONFIG_HOLES_IN_ZONE
Jan Kara (1):
udf: Fix mounting of Win7 created UDF filesystems
Janek Kotas (1):
spi: cadence: Change usleep_range() to udelay(), for atomic context
Jann Horn (2):
sys: don't hold uts_sem while accessing userspace memory
userns: move user access out of the mutex
Jason Gunthorpe (2):
IB/mlx5: Fix leaking stack memory to userspace
overflow.h: Add arithmetic shift helper
Javier Martinez Canillas (1):
media: Revert "[media] tvp5150: fix pad format frame height"
Jeremy Cline (1):
fs/quota: Fix spectre gadget in do_quotactl
Johan Hovold (2):
rtc: omap: fix resource leak in registration error path
rtc: omap: fix potential crash on power off
John Johansen (1):
apparmor: fix bad debug check in apparmor_secid_to_secctx()
Jon Hunter (1):
ARM: tegra: Fix Tegra30 Cardhu PCA954x reset
Kamalesh Babulal (1):
livepatch: Validate module/old func name length
Keith Busch (1):
libnvdimm: Use max contiguous area for namespace size
Krzysztof Kozlowski (1):
spi: spi-fsl-dspi: Fix imprecise abort on VF500 during probe
Lars-Peter Clausen (2):
iio: ad9523: Fix displayed phase
iio: ad9523: Fix return value for ad952x_store()
Leon Romanovsky (1):
RDMA/mlx5: Fix shift overflow in mlx5_ib_create_wq
Lihua Yao (3):
ALSA: ac97: fix device initialization in the compat layer
ALSA: ac97: fix check of pm_runtime_get_sync failure
ALSA: ac97: fix unbalanced pm_runtime_enable
Luke Dashjr (1):
powerpc64/ftrace: Include ftrace.h needed for enable/disable calls
Maciej S. Szmigiero (1):
block, bfq: return nbytes and not zero from struct cftype .write() method
Mahesh Salgaonkar (1):
powerpc/pseries: Fix endianness while restoring of r3 in MCE handler.
Markus Stockhausen (1):
readahead: stricter check for bdi io_pages
Masahiro Yamada (1):
kconfig: fix "Can't open ..." in parallel build
Max Filippov (2):
xtensa: limit offsets in __loop_cache_{all,page}
xtensa: increase ranges in ___invalidate_{i,d}cache_all
Michel Dänzer (1):
dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace
Mika Westerberg (1):
spi: pxa2xx: Add support for Intel Ice Lake
Mike Snitzer (1):
dm cache metadata: save in-core policy_hint_size to on-disk superblock
Mikulas Patocka (12):
block: fix infinite loop if the device loses discard capability
dm integrity: change 'suspending' variable from bool to int
dm crypt: don't decrease device limits
dm writecache: fix a crash due to reading past end of dirty_bitmap
fb: fix lost console when the user unplugs a USB adapter
udlfb: fix semaphore value leak
udlfb: fix display corruption of the last line
udlfb: don't switch if we are switching to the same videomode
udlfb: set optimal write delay
udlfb: make a local copy of fb_ops
udlfb: handle allocation failure
udlfb: set line_length in dlfb_ops_set_par
Ming Lei (1):
block: really disable runtime-pm for blk-mq
Nadav Amit (4):
vmw_balloon: fix inflation of 64-bit GFNs
vmw_balloon: do not use 2MB without batching
vmw_balloon: VMCI_DOORBELL_SET does not check status
vmw_balloon: fix VMCI use when balloon built into kernel
Nicholas Piggin (1):
powerpc/64s: Fix page table fragment refcount race vs speculative references
Ondrej Mosnacek (1):
crypto: vmx - Fix sleep-in-atomic bugs
Paolo Bonzini (1):
KVM: VMX: fixes for vmentry_l1d_flush module parameter
Parav Pandit (1):
IB/mlx5: Honor cnt_set_id_valid flag instead of set_id
Paul Mackerras (1):
KVM: PPC: Book3S: Fix guest DMA when guest partially backed by THP pages
Peter Kalauskas (1):
drivers/block/zram/zram_drv.c: fix bug storing backing_dev
Peter Zijlstra (1):
mm/tlb: Remove tlb_remove_table() non-concurrent condition
Rafael David Tinoco (1):
mfd: hi655x: Fix regmap area declared size for hi655x
Rafael J. Wysocki (4):
ACPICA: Clear status of all events when entering sleep states
sched: idle: Avoid retaining the tick when it has been stopped
cpuidle: menu: Handle stopped tick more aggressively
cpuidle: menu: Retain tick when shallow state is selected
Ram Pai (6):
powerpc/pkeys: Give all threads control of their key permissions
powerpc/pkeys: Deny read/write/execute by default
powerpc/pkeys: key allocation/deallocation must not change pkey registers
powerpc/pkeys: Save the pkey registers before fork
powerpc/pkeys: Fix calculation of total pkeys.
powerpc/pkeys: Preallocate execute-only key
Richard Weinberger (6):
ubifs: Fix memory leak in lprobs self-check
Revert "UBIFS: Fix potential integer overflow in allocation"
ubifs: Check data node size before truncate
ubifs: xattr: Don't operate on deleted inodes
ubifs: Fix directory size calculation for symlinks
ubifs: Fix synced_i_size calculation for xattr inodes
Roger Quadros (1):
ARM: dts: am57xx-idk: Enable dual role for USB2 port
Sergei Shtylyov (2):
mmc: renesas_sdhi_internal_dmac: mask DMAC interrupts
mmc: renesas_sdhi_internal_dmac: fix #define RST_RESERVED_BITS
Shan Hai (1):
bcache: release dc->writeback_lock properly in bch_writeback_thread()
Steven Rostedt (VMware) (4):
tracing: Do not call start/stop() functions when tracing_on does not change
tracing/blktrace: Fix to allow setting same value
printk/tracing: Do not trace printk_nmi_enter()
uprobes: Use synchronize_rcu() not synchronize_sched()
Tomas Bortoli (3):
9p: fix multiple NULL-pointer-dereferences
net/9p/client.c: version pointer uninitialized
net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree()
Trond Myklebust (2):
NFSv4: Fix locking in pnfs_generic_recover_commit_reqs
NFSv4: Fix a sleep in atomic context in nfs4_callback_sequence()
Tycho Andersen (1):
uart: fix race between uart_put_char() and uart_shutdown()
Vaibhav Jain (1):
cxl: Fix wrong comparison in cxl_adapter_context_get()
Vignesh R (2):
pwm: tiehrpwm: Don't use emulation mode bits to control PWM output
pwm: tiehrpwm: Fix disabling of output of PWMs
Vishal Verma (1):
libnvdimm: fix ars_status output length calculation
Yannik Sembritzki (2):
Replace magic for trusting the secondary keyring with #define
Fix kexec forbidding kernels signed with keys in the secondary keyring to boot
jiangyiwen (1):
9p/virtio: fix off-by-one error in sg list bounds check
piaojun (1):
fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed
xiao jin (1):
block: blk_init_allocated_queue() set q->fq as NULL in the fail case
zhangyi (F) (1):
PM / sleep: wakeup: Fix build error caused by missing SRCU support
From: Al Viro <viro(a)zeniv.linux.org.uk>
cls_u32.c misuses refcounts for struct tc_u_hnode - it counts references via
->hlist and via ->tp_root together. u32_destroy() drops the former and, in
case when there had been links, leaves the sucker on the list. As the result,
there's nothing to protect it from getting freed once links are dropped.
That also makes the "is it busy" check incapable of catching the root hnode -
it *is* busy (there's a reference from tp), but we don't see it as something
separate. "Is it our root?" check partially covers that, but the problem
exists for others' roots as well.
AFAICS, the minimal fix preserving the existing behaviour (where it doesn't
include oopsen, that is) would be this:
* count tp->root and tp_c->hlist as separate references. I.e.
have u32_init() set refcount to 2, not 1.
* in u32_destroy() we always drop the former; in u32_destroy_hnode() -
the latter.
That way we have *all* references contributing to refcount. List
removal happens in u32_destroy_hnode() (called only when ->refcnt is 1)
an in u32_destroy() in case of tc_u_common going away, along with everything
reachable from it. IOW, that way we know that u32_destroy_key() won't
free something still on the list (or pointed to by someone's ->root).
Cc: stable(a)vger.kernel.org
Signed-off-by: Al Viro <viro(a)zeniv.linux.org.uk>
---
net/sched/cls_u32.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index f218ccf1e2d9..3f985f29ef30 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -398,6 +398,7 @@ static int u32_init(struct tcf_proto *tp)
rcu_assign_pointer(tp_c->hlist, root_ht);
root_ht->tp_c = tp_c;
+ root_ht->refcnt++;
rcu_assign_pointer(tp->root, root_ht);
tp->data = tp_c;
return 0;
@@ -610,7 +611,7 @@ static int u32_destroy_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht,
struct tc_u_hnode __rcu **hn;
struct tc_u_hnode *phn;
- WARN_ON(ht->refcnt);
+ WARN_ON(--ht->refcnt);
u32_clear_hnode(tp, ht, extack);
@@ -649,7 +650,7 @@ static void u32_destroy(struct tcf_proto *tp, struct netlink_ext_ack *extack)
WARN_ON(root_ht == NULL);
- if (root_ht && --root_ht->refcnt == 0)
+ if (root_ht && --root_ht->refcnt == 1)
u32_destroy_hnode(tp, root_ht, extack);
if (--tp_c->refcnt == 0) {
@@ -698,7 +699,6 @@ static int u32_delete(struct tcf_proto *tp, void *arg, bool *last,
}
if (ht->refcnt == 1) {
- ht->refcnt--;
u32_destroy_hnode(tp, ht, extack);
} else {
NL_SET_ERR_MSG_MOD(extack, "Can not delete in-use filter");
--
2.11.0
Hi,
I would like to check if you have received my email from last week?
We are a team of 11 image editors who can help you for cutting out, your
photos, also add retouching.
Editing is for your products photos or portrait photos, catalog photos.
Let me know if you have interests, we can send you testing work.
Thanks,
Denis Jones
Commit 822fb18a82aba ("xen-netfront: wait xenbus state change when load
module manually") added a new wait queue to wait on for a state change
when the module is loaded manually. Unfortunately there is no wakeup
anywhere to stop that waiting.
Instead of introducing a new wait queue rename the existing
module_unload_q to module_wq and use it for both purposes (loading and
unloading).
As any state change of the backend might be intended to stop waiting
do the wake_up_all() in any case when netback_changed() is called.
Fixes: 822fb18a82aba ("xen-netfront: wait xenbus state change when load module manually")
Cc: <stable(a)vger.kernel.org> #4.18
Signed-off-by: Juergen Gross <jgross(a)suse.com>
---
drivers/net/xen-netfront.c | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 73f596a90c69..9407acbd19a9 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -87,8 +87,7 @@ struct netfront_cb {
/* IRQ name is queue name with "-tx" or "-rx" appended */
#define IRQ_NAME_SIZE (QUEUE_NAME_SIZE + 3)
-static DECLARE_WAIT_QUEUE_HEAD(module_load_q);
-static DECLARE_WAIT_QUEUE_HEAD(module_unload_q);
+static DECLARE_WAIT_QUEUE_HEAD(module_wq);
struct netfront_stats {
u64 packets;
@@ -1332,11 +1331,11 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
netif_carrier_off(netdev);
xenbus_switch_state(dev, XenbusStateInitialising);
- wait_event(module_load_q,
- xenbus_read_driver_state(dev->otherend) !=
- XenbusStateClosed &&
- xenbus_read_driver_state(dev->otherend) !=
- XenbusStateUnknown);
+ wait_event(module_wq,
+ xenbus_read_driver_state(dev->otherend) !=
+ XenbusStateClosed &&
+ xenbus_read_driver_state(dev->otherend) !=
+ XenbusStateUnknown);
return netdev;
exit:
@@ -2010,15 +2009,14 @@ static void netback_changed(struct xenbus_device *dev,
dev_dbg(&dev->dev, "%s\n", xenbus_strstate(backend_state));
+ wake_up_all(&module_wq);
+
switch (backend_state) {
case XenbusStateInitialising:
case XenbusStateInitialised:
case XenbusStateReconfiguring:
case XenbusStateReconfigured:
- break;
-
case XenbusStateUnknown:
- wake_up_all(&module_unload_q);
break;
case XenbusStateInitWait:
@@ -2034,12 +2032,10 @@ static void netback_changed(struct xenbus_device *dev,
break;
case XenbusStateClosed:
- wake_up_all(&module_unload_q);
if (dev->state == XenbusStateClosed)
break;
/* Missed the backend's CLOSING state -- fallthrough */
case XenbusStateClosing:
- wake_up_all(&module_unload_q);
xenbus_frontend_closed(dev);
break;
}
@@ -2147,14 +2143,14 @@ static int xennet_remove(struct xenbus_device *dev)
if (xenbus_read_driver_state(dev->otherend) != XenbusStateClosed) {
xenbus_switch_state(dev, XenbusStateClosing);
- wait_event(module_unload_q,
+ wait_event(module_wq,
xenbus_read_driver_state(dev->otherend) ==
XenbusStateClosing ||
xenbus_read_driver_state(dev->otherend) ==
XenbusStateUnknown);
xenbus_switch_state(dev, XenbusStateClosed);
- wait_event(module_unload_q,
+ wait_event(module_wq,
xenbus_read_driver_state(dev->otherend) ==
XenbusStateClosed ||
xenbus_read_driver_state(dev->otherend) ==
--
2.16.4
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 50229128727f7e11840ca1b2b501f880818d56b6 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui(a)microsoft.com>
Date: Tue, 5 Jun 2018 13:37:52 -0700
Subject: [PATCH] Drivers: hv: vmbus: Fix the offer_in_progress in
vmbus_process_offer()
I didn't really hit a real bug, but just happened to spot the bug:
we have decreased the counter at the beginning of vmbus_process_offer(),
so we mustn't decrease it again.
Fixes: 6f3d791f3006 ("Drivers: hv: vmbus: Fix rescind handling issues")
Signed-off-by: Dexuan Cui <decui(a)microsoft.com>
Cc: stable(a)vger.kernel.org
Cc: Stephen Hemminger <sthemmin(a)microsoft.com>
Cc: K. Y. Srinivasan <kys(a)microsoft.com>
Cc: Stable <stable(a)vger.kernel.org> # 4.14 and above
Signed-off-by: K. Y. Srinivasan <kys(a)microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index ecc2bd275a73..f3b551a50653 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -527,10 +527,8 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
struct hv_device *dev
= newchannel->primary_channel->device_obj;
- if (vmbus_add_channel_kobj(dev, newchannel)) {
- atomic_dec(&vmbus_connection.offer_in_progress);
+ if (vmbus_add_channel_kobj(dev, newchannel))
goto err_free_chan;
- }
if (channel->sc_creation_callback != NULL)
channel->sc_creation_callback(newchannel);
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From d1c392c9e2a301f38998a353f467f76414e38725 Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (VMware)" <rostedt(a)goodmis.org>
Date: Wed, 5 Sep 2018 16:29:49 -0400
Subject: [PATCH] printk/tracing: Do not trace printk_nmi_enter()
I hit the following splat in my tests:
------------[ cut here ]------------
IRQs not enabled as expected
WARNING: CPU: 3 PID: 0 at kernel/time/tick-sched.c:982 tick_nohz_idle_enter+0x44/0x8c
Modules linked in: ip6t_REJECT nf_reject_ipv6 ip6table_filter ip6_tables ipv6
CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.19.0-rc2-test+ #2
Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 02/22/2014
EIP: tick_nohz_idle_enter+0x44/0x8c
Code: ec 05 00 00 00 75 26 83 b8 c0 05 00 00 00 75 1d 80 3d d0 36 3e c1 00
75 14 68 94 63 12 c1 c6 05 d0 36 3e c1 01 e8 04 ee f8 ff <0f> 0b 58 fa bb a0
e5 66 c1 e8 25 0f 04 00 64 03 1d 28 31 52 c1 8b
EAX: 0000001c EBX: f26e7f8c ECX: 00000006 EDX: 00000007
ESI: f26dd1c0 EDI: 00000000 EBP: f26e7f40 ESP: f26e7f38
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010296
CR0: 80050033 CR2: 0813c6b0 CR3: 2f342000 CR4: 001406f0
Call Trace:
do_idle+0x33/0x202
cpu_startup_entry+0x61/0x63
start_secondary+0x18e/0x1ed
startup_32_smp+0x164/0x168
irq event stamp: 18773830
hardirqs last enabled at (18773829): [<c040150c>] trace_hardirqs_on_thunk+0xc/0x10
hardirqs last disabled at (18773830): [<c040151c>] trace_hardirqs_off_thunk+0xc/0x10
softirqs last enabled at (18773824): [<c0ddaa6f>] __do_softirq+0x25f/0x2bf
softirqs last disabled at (18773767): [<c0416bbe>] call_on_stack+0x45/0x4b
---[ end trace b7c64aa79e17954a ]---
After a bit of debugging, I found what was happening. This would trigger
when performing "perf" with a high NMI interrupt rate, while enabling and
disabling function tracer. Ftrace uses breakpoints to convert the nops at
the start of functions to calls to the function trampolines. The breakpoint
traps disable interrupts and this makes calls into lockdep via the
trace_hardirqs_off_thunk in the entry.S code. What happens is the following:
do_idle {
[interrupts enabled]
<interrupt> [interrupts disabled]
TRACE_IRQS_OFF [lockdep says irqs off]
[...]
TRACE_IRQS_IRET
test if pt_regs say return to interrupts enabled [yes]
TRACE_IRQS_ON [lockdep says irqs are on]
<nmi>
nmi_enter() {
printk_nmi_enter() [traced by ftrace]
[ hit ftrace breakpoint ]
<breakpoint exception>
TRACE_IRQS_OFF [lockdep says irqs off]
[...]
TRACE_IRQS_IRET [return from breakpoint]
test if pt_regs say interrupts enabled [no]
[iret back to interrupt]
[iret back to code]
tick_nohz_idle_enter() {
lockdep_assert_irqs_enabled() [lockdep say no!]
Although interrupts are indeed enabled, lockdep thinks it is not, and since
we now do asserts via lockdep, it gives a false warning. The issue here is
that printk_nmi_enter() is called before lockdep_off(), which disables
lockdep (for this reason) in NMIs. By simply not allowing ftrace to see
printk_nmi_enter() (via notrace annotation) we keep lockdep from getting
confused.
Cc: stable(a)vger.kernel.org
Fixes: 42a0bb3f71383 ("printk/nmi: generic solution for safe printk in NMI")
Acked-by: Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>
Acked-by: Petr Mladek <pmladek(a)suse.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt(a)goodmis.org>
diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c
index a0a74c533e4b..0913b4d385de 100644
--- a/kernel/printk/printk_safe.c
+++ b/kernel/printk/printk_safe.c
@@ -306,12 +306,12 @@ static __printf(1, 0) int vprintk_nmi(const char *fmt, va_list args)
return printk_safe_log_store(s, fmt, args);
}
-void printk_nmi_enter(void)
+void notrace printk_nmi_enter(void)
{
this_cpu_or(printk_context, PRINTK_NMI_CONTEXT_MASK);
}
-void printk_nmi_exit(void)
+void notrace printk_nmi_exit(void)
{
this_cpu_and(printk_context, ~PRINTK_NMI_CONTEXT_MASK);
}