When executing 'fw_run_transaction()' with 'TCODE_WRITE_BLOCK_REQUEST',
an address of 'payload' argument is used for streaming DMA mapping by
'firewire_ohci' module if 'size' argument is larger than 8 byte.
Although in this case the address should not be on kernel stack, current
implementation of ALSA bebob driver uses data in kernel stack for a cue
to boot M-Audio devices. This often brings unexpected result, especially
for a case of CONFIG_VMAP_STACK=y.
This commit fixes the bug.
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=201021
Reference: https://forum.manjaro.org/t/firewire-m-audio-410-driver-wont-load-firmware/…
Fixes: a2b2a7798fb6('ALSA: bebob: Send a cue to load firmware for M-Audio Firewire series')
Cc: <stable(a)vger.kernel.org> # v3.16+
Signed-off-by: Takashi Sakamoto <o-takashi(a)sakamocchi.jp>
---
sound/firewire/bebob/bebob_maudio.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/sound/firewire/bebob/bebob_maudio.c b/sound/firewire/bebob/bebob_maudio.c
index bd55620c6a47..0c5a4cbb99ba 100644
--- a/sound/firewire/bebob/bebob_maudio.c
+++ b/sound/firewire/bebob/bebob_maudio.c
@@ -96,17 +96,13 @@ int snd_bebob_maudio_load_firmware(struct fw_unit *unit)
struct fw_device *device = fw_parent_device(unit);
int err, rcode;
u64 date;
- __le32 cues[3] = {
- cpu_to_le32(MAUDIO_BOOTLOADER_CUE1),
- cpu_to_le32(MAUDIO_BOOTLOADER_CUE2),
- cpu_to_le32(MAUDIO_BOOTLOADER_CUE3)
- };
+ __le32 *cues;
/* check date of software used to build */
err = snd_bebob_read_block(unit, INFO_OFFSET_SW_DATE,
&date, sizeof(u64));
if (err < 0)
- goto end;
+ return err;
/*
* firmware version 5058 or later has date later than "20070401", but
* 'date' is not null-terminated.
@@ -114,20 +110,28 @@ int snd_bebob_maudio_load_firmware(struct fw_unit *unit)
if (date < 0x3230303730343031LL) {
dev_err(&unit->device,
"Use firmware version 5058 or later\n");
- err = -ENOSYS;
- goto end;
+ return -ENXIO;
}
+ cues = kmalloc_array(3, sizeof(*cues), GFP_KERNEL);
+ if (!cues)
+ return -ENOMEM;
+
+ cues[0] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE1);
+ cues[1] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE2);
+ cues[2] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE3);
+
rcode = fw_run_transaction(device->card, TCODE_WRITE_BLOCK_REQUEST,
device->node_id, device->generation,
device->max_speed, BEBOB_ADDR_REG_REQ,
- cues, sizeof(cues));
+ cues, 3 * sizeof(*cues));
+ kfree(cues);
if (rcode != RCODE_COMPLETE) {
dev_err(&unit->device,
"Failed to send a cue to load firmware\n");
err = -EIO;
}
-end:
+
return err;
}
--
2.17.1
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