This is a note to let you know that I've just added the patch titled
interconnect: qcom: qcs404: Walk the list safely on node removal
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From f39488ea2a75c49634c8611090f58734f61eee7c Mon Sep 17 00:00:00 2001
From: Georgi Djakov <georgi.djakov(a)linaro.org>
Date: Thu, 12 Dec 2019 09:53:31 +0200
Subject: interconnect: qcom: qcs404: Walk the list safely on node removal
As we will remove items off the list using list_del(), we need to use the
safe version of list_for_each_entry().
Fixes: 5e4e6c4d3ae0 ("interconnect: qcom: Add QCS404 interconnect provider driver")
Reported-by: Dmitry Osipenko <digetx(a)gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson(a)linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov(a)linaro.org>
Cc: <stable(a)vger.kernel.org> # v5.4
Link: https://lore.kernel.org/r/20191212075332.16202-4-georgi.djakov@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/interconnect/qcom/qcs404.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/interconnect/qcom/qcs404.c b/drivers/interconnect/qcom/qcs404.c
index b4966d8f3348..8e0735a87040 100644
--- a/drivers/interconnect/qcom/qcs404.c
+++ b/drivers/interconnect/qcom/qcs404.c
@@ -414,7 +414,7 @@ static int qnoc_probe(struct platform_device *pdev)
struct icc_provider *provider;
struct qcom_icc_node **qnodes;
struct qcom_icc_provider *qp;
- struct icc_node *node;
+ struct icc_node *node, *tmp;
size_t num_nodes, i;
int ret;
@@ -494,7 +494,7 @@ static int qnoc_probe(struct platform_device *pdev)
return 0;
err:
- list_for_each_entry(node, &provider->nodes, node_list) {
+ list_for_each_entry_safe(node, tmp, &provider->nodes, node_list) {
icc_node_del(node);
icc_node_destroy(node->id);
}
@@ -508,9 +508,9 @@ static int qnoc_remove(struct platform_device *pdev)
{
struct qcom_icc_provider *qp = platform_get_drvdata(pdev);
struct icc_provider *provider = &qp->provider;
- struct icc_node *n;
+ struct icc_node *n, *tmp;
- list_for_each_entry(n, &provider->nodes, node_list) {
+ list_for_each_entry_safe(n, tmp, &provider->nodes, node_list) {
icc_node_del(n);
icc_node_destroy(n->id);
}
--
2.24.1
This is a note to let you know that I've just added the patch titled
interconnect: qcom: sdm845: Walk the list safely on node removal
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From b29b8113bb41285eb7ed55ce0c65017b5c0240f7 Mon Sep 17 00:00:00 2001
From: Georgi Djakov <georgi.djakov(a)linaro.org>
Date: Thu, 12 Dec 2019 09:53:30 +0200
Subject: interconnect: qcom: sdm845: Walk the list safely on node removal
As we will remove items off the list using list_del(), we need to use the
safe version of list_for_each_entry().
Fixes: b5d2f741077a ("interconnect: qcom: Add sdm845 interconnect provider driver")
Reported-by: Dmitry Osipenko <digetx(a)gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson(a)linaro.org>
Signed-off-by: Georgi Djakov <georgi.djakov(a)linaro.org>
Cc: <stable(a)vger.kernel.org> # v5.3+
Link: https://lore.kernel.org/r/20191212075332.16202-3-georgi.djakov@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/interconnect/qcom/sdm845.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/interconnect/qcom/sdm845.c b/drivers/interconnect/qcom/sdm845.c
index 502a6c22b41e..387267ee9648 100644
--- a/drivers/interconnect/qcom/sdm845.c
+++ b/drivers/interconnect/qcom/sdm845.c
@@ -868,9 +868,9 @@ static int qnoc_remove(struct platform_device *pdev)
{
struct qcom_icc_provider *qp = platform_get_drvdata(pdev);
struct icc_provider *provider = &qp->provider;
- struct icc_node *n;
+ struct icc_node *n, *tmp;
- list_for_each_entry(n, &provider->nodes, node_list) {
+ list_for_each_entry_safe(n, tmp, &provider->nodes, node_list) {
icc_node_del(n);
icc_node_destroy(n->id);
}
--
2.24.1
Commit 4b927b94d5df ("KVM: arm/arm64: vgic: Introduce find_reg_by_id()")
introduced 'find_reg_by_id()', which looks up a system register only if
the 'id' index parameter identifies a valid system register. As part of
the patch, existing callers of 'find_reg()' were ported over to the new
interface, but this breaks 'index_to_sys_reg_desc()' in the case that the
initial lookup in the vCPU target table fails because we will then call
into 'find_reg()' for the system register table with an uninitialised
'param' as the key to the lookup.
GCC 10 is bright enough to spot this (amongst a tonne of false positives,
but hey!):
| arch/arm64/kvm/sys_regs.c: In function ‘index_to_sys_reg_desc.part.0.isra’:
| arch/arm64/kvm/sys_regs.c:983:33: warning: ‘params.Op2’ may be used uninitialized in this function [-Wmaybe-uninitialized]
| 983 | (u32)(x)->CRn, (u32)(x)->CRm, (u32)(x)->Op2);
| [...]
Revert the hunk of 4b927b94d5df which breaks 'index_to_sys_reg_desc()' so
that the old behaviour of checking the index upfront is restored.
Cc: <stable(a)vger.kernel.org>
Cc: Marc Zyngier <maz(a)kernel.org>
Cc: Vijaya Kumar K <Vijaya.Kumar(a)cavium.com>
Fixes: 4b927b94d5df ("KVM: arm/arm64: vgic: Introduce find_reg_by_id()")
Signed-off-by: Will Deacon <will(a)kernel.org>
---
arch/arm64/kvm/sys_regs.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
index 46822afc57e0..01a515e0171e 100644
--- a/arch/arm64/kvm/sys_regs.c
+++ b/arch/arm64/kvm/sys_regs.c
@@ -2360,8 +2360,11 @@ static const struct sys_reg_desc *index_to_sys_reg_desc(struct kvm_vcpu *vcpu,
if ((id & KVM_REG_ARM_COPROC_MASK) != KVM_REG_ARM64_SYSREG)
return NULL;
+ if (!index_to_params(id, ¶ms))
+ return NULL;
+
table = get_target_table(vcpu->arch.target, true, &num);
- r = find_reg_by_id(id, ¶ms, table, num);
+ r = find_reg(¶ms, table, num);
if (!r)
r = find_reg(¶ms, sys_reg_descs, ARRAY_SIZE(sys_reg_descs));
--
2.24.1.735.g03f4e72817-goog
Please pick the following for stable branches 4.4, 4.9, 4.14, 4.19:
commit 9804501fa1228048857910a6bf23e085aade37cc
Author: YueHaibing <yuehaibing(a)huawei.com>
Date: Thu Mar 14 13:47:59 2019 +0800
appletalk: Fix potential NULL pointer dereference in unregister_snap_client
commit c93ad1337ad06a718890a89cdd85188ff9a5a5cc
Author: YueHaibing <yuehaibing(a)huawei.com>
Date: Tue Apr 30 19:34:08 2019 +0800
appletalk: Set error code if register_snap_client failed
The first commit doesn't apply cleanly to 4.4, 4.9, 4.14; you can use
the attached backport.
Ben.
--
Ben Hutchings
The generation of random numbers is too important to be left to chance.
- Robert Coveyou
Please pick this commit for 4.19 only (newer branches already have it;
older branches don't include this protocol):
commit a21b7f0cff1906a93a0130b74713b15a0b36481d
Author: Navid Emamdoost <navid.emamdoost(a)gmail.com>
Date: Wed Sep 11 10:09:02 2019 -0500
net: qrtr: fix memort leak in qrtr_tun_write_iter
Ben.
--
Ben Hutchings
The generation of random numbers is too important to be left to chance.
- Robert Coveyou
Please pick:
commit 433f4ba1904100da65a311033f17a9bf586b287e
Author: Paolo Bonzini <pbonzini(a)redhat.com>
Date: Wed Dec 4 10:28:54 2019 +0100
KVM: x86: fix out-of-bounds write in KVM_GET_EMULATED_CPUID (CVE-2019-19332)
for all stable branches.
Ben.
--
Ben Hutchings
The generation of random numbers is too important to be left to chance.
- Robert Coveyou
This is the start of the stable review cycle for the 4.4.206 release.
There are 92 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 Fri, 06 Dec 2019 17:42:37 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.206-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.4.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.4.206-rc1
Hans de Goede <hdegoede(a)redhat.com>
platform/x86: hp-wmi: Fix ACPI errors caused by too small buffer
Lionel Debieve <lionel.debieve(a)st.com>
hwrng: stm32 - fix unbalanced pm_runtime_enable
Candle Sun <candle.sun(a)unisoc.com>
HID: core: check whether Usage Page item is after Usage ID items
Dust Li <dust.li(a)linux.alibaba.com>
net: sched: fix `tc -s class show` no bstats on class with nolock subqueues
John Rutherford <john.rutherford(a)dektech.com.au>
tipc: fix link name length check
Paolo Abeni <pabeni(a)redhat.com>
openvswitch: remove another BUG_ON()
Paolo Abeni <pabeni(a)redhat.com>
openvswitch: drop unneeded BUG_ON() in ovs_flow_cmd_build_info()
Jouni Hogander <jouni.hogander(a)unikie.com>
slip: Fix use-after-free Read in slip_open
Paolo Abeni <pabeni(a)redhat.com>
openvswitch: fix flow command message size
Menglong Dong <dong.menglong(a)zte.com.cn>
macvlan: schedule bc_work even if error
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
pwm: Clear chip_data in pwm_put()
Luca Ceresoli <luca(a)lucaceresoli.net>
net: macb: fix error format in dev_err()
Eugen Hristev <eugen.hristev(a)microchip.com>
media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE
Alexander Usyskin <alexander.usyskin(a)intel.com>
mei: bus: prefix device names on bus with the bus name
Fabio D'Urso <fabiodurso(a)hotmail.it>
USB: serial: ftdi_sio: add device IDs for U-Blox C099-F9P
Pan Bian <bianpan2016(a)163.com>
staging: rtl8192e: fix potential use after free
Boris Brezillon <bbrezillon(a)kernel.org>
mtd: Remove a debug trace in mtdpart.c
Gen Zhang <blackgod016574(a)gmail.com>
powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()
John Garry <john.garry(a)huawei.com>
scsi: libsas: Check SMP PHY control function result
James Morse <james.morse(a)arm.com>
ACPI / APEI: Switch estatus pool to use vmalloc memory
John Garry <john.garry(a)huawei.com>
scsi: libsas: Support SATA PHY connection rate unmatch fixing during discovery
Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
net: dev: Use unsigned integer as an argument to left-shift
Eric Dumazet <edumazet(a)google.com>
net: fix possible overflow in __sk_mem_raise_allocated()
Bert Kenward <bkenward(a)solarflare.com>
sfc: initialise found bitmap in efx_ef10_mtd_probe
Hoang Le <hoang.h.le(a)dektech.com.au>
tipc: fix skb may be leaky in tipc_link_input
Johannes Berg <johannes.berg(a)intel.com>
decnet: fix DN_IFREQ_SIZE
Edward Cree <ecree(a)solarflare.com>
sfc: suppress duplicate nvmem partition types in efx_ef10_mtd_probe
Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
net/core/neighbour: fix kmemleak minimal reference count for hash tables
Konstantin Khlebnikov <khlebnikov(a)yandex-team.ru>
net/core/neighbour: tell kmemleak about hash tables
Gustavo A. R. Silva <gustavo(a)embeddedor.com>
tipc: fix memory leak in tipc_nl_compat_publ_dump
Boris Brezillon <bbrezillon(a)kernel.org>
mtd: Check add_mtd_device() ret code
Olof Johansson <olof(a)lixom.net>
lib/genalloc.c: include vmalloc.h
Huang Shijie <sjhuang(a)iluvatar.ai>
lib/genalloc.c: use vzalloc_node() to allocate the bitmap
Junxiao Bi <junxiao.bi(a)oracle.com>
ocfs2: clear journal dirty flag after shutdown journal
Kangjie Lu <kjlu(a)umn.edu>
tipc: fix a missing check of genlmsg_put
Kangjie Lu <kjlu(a)umn.edu>
atl1e: checking the status of atl1e_write_phy_reg
Kangjie Lu <kjlu(a)umn.edu>
net: stmicro: fix a missing check of clk_prepare
Richard Weinberger <richard(a)nod.at>
um: Make GCOV depend on !KCOV
Aditya Pakki <pakki001(a)umn.edu>
net/net_namespace: Check the return value of register_pernet_subsys()
Kangjie Lu <kjlu(a)umn.edu>
regulator: tps65910: fix a missing check of return value
Luc Van Oostenryck <luc.vanoostenryck(a)gmail.com>
drbd: fix print_st_err()'s prototype to match the definition
Lars Ellenberg <lars.ellenberg(a)linbit.com>
drbd: reject attach of unsuitable uuids even if connected
Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
powerpc/44x/bamboo: Fix PCI range
Christophe Leroy <christophe.leroy(a)c-s.fr>
powerpc/mm: Make NULL pointer deferences explicit on bad page faults.
Christophe Leroy <christophe.leroy(a)c-s.fr>
powerpc/prom: fix early DEBUG messages
Kyle Roeschley <kyle.roeschley(a)ni.com>
ath6kl: Fix off by one error in scan completion
Kyle Roeschley <kyle.roeschley(a)ni.com>
ath6kl: Only use match sets when firmware supports it
Varun Prakash <varun(a)chelsio.com>
scsi: csiostor: fix incorrect dma device in case of vport
Anatoliy Glagolev <glagolig(a)gmail.com>
scsi: qla2xxx: deadlock by configfs_depend_item
Bart Van Assche <bvanassche(a)acm.org>
RDMA/srp: Propagate ib_post_send() failures to the SCSI mid-layer
Geert Uytterhoeven <geert(a)linux-m68k.org>
openrisc: Fix broken paths to arch/or32
Alexander Shiyan <shc_work(a)mail.ru>
serial: max310x: Fix tx_empty() callback
Kangjie Lu <kjlu(a)umn.edu>
drivers/regulator: fix a missing check of return value
Christophe Leroy <christophe.leroy(a)c-s.fr>
powerpc/xmon: fix dump_segments()
Christophe Leroy <christophe.leroy(a)c-s.fr>
powerpc/book3s/32: fix number of bats in p/v_block_mapped()
Dan Carpenter <dan.carpenter(a)oracle.com>
IB/qib: Fix an error code in qib_sdma_verbs_send()
Nick Bowler <nbowler(a)draconx.ca>
xfs: Align compat attrlist_by_handle with native implementation.
Bob Peterson <rpeterso(a)redhat.com>
gfs2: take jdata unstuff into account in do_grow
Peter Hutterer <peter.hutterer(a)who-t.net>
HID: doc: fix wrong data structure reference for UHID_OUTPUT
Geert Uytterhoeven <geert+renesas(a)glider.be>
pinctrl: sh-pfc: sh7734: Fix shifted values in IPSR10
Geert Uytterhoeven <geert+renesas(a)glider.be>
pinctrl: sh-pfc: sh7264: Fix PFCR3 and PFCR0 register configuration
Michael Mueller <mimu(a)linux.ibm.com>
KVM: s390: unregister debug feature on failing arch init
Ross Lagerwall <ross.lagerwall(a)citrix.com>
xen/pciback: Check dev_data before using it
Josef Bacik <jbacik(a)fb.com>
btrfs: only track ref_heads in delayed_ref_updates
Lepton Wu <ytht.net(a)gmail.com>
VSOCK: bind to random port for VMADDR_PORT_ANY
Krzysztof Kozlowski <krzk(a)kernel.org>
gpiolib: Fix return value of gpio_to_desc() stub if !GPIOLIB
Masahiro Yamada <yamada.masahiro(a)socionext.com>
microblaze: move "... is ready" messages to arch/microblaze/Makefile
Masahiro Yamada <yamada.masahiro(a)socionext.com>
microblaze: adjust the help to the real behavior
Pan Bian <bianpan2016(a)163.com>
ubi: Do not drop UBI device reference before using
Pan Bian <bianpan2016(a)163.com>
ubi: Put MTD device after it is not used
Darrick J. Wong <darrick.wong(a)oracle.com>
xfs: require both realtime inodes to mount
Pan Bian <bianpan2016(a)163.com>
rtl818x: fix potential use after free
Brian Norris <briannorris(a)chromium.org>
mwifiex: debugfs: correct histogram spacing, formatting
Pan Bian <bianpan2016(a)163.com>
mwifiex: fix potential NULL dereference and use after free
Eric Biggers <ebiggers(a)google.com>
crypto: user - support incremental algorithm dumps
Hans de Goede <hdegoede(a)redhat.com>
ACPI / LPSS: Ignore acpi_device_fix_up_power() return value
Arnd Bergmann <arnd(a)arndb.de>
ARM: ks8695: fix section mismatch warning
Thomas Meyer <thomas(a)m3y3r.de>
PM / AVS: SmartReflex: NULL check before some freeing functions is not needed
Suzuki K Poulose <Suzuki.Poulose(a)arm.com>
arm64: smp: Handle errors reported by the firmware
Helge Deller <deller(a)gmx.de>
parisc: Fix HP SDC hpa address output
Helge Deller <deller(a)gmx.de>
parisc: Fix serio address output
Fabio Estevam <festevam(a)gmail.com>
ARM: dts: imx53-voipac-dmm-668: Fix memory node duplication
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
ARM: debug-imx: only define DEBUG_IMX_UART_PORT if needed
James Smart <jsmart2021(a)gmail.com>
scsi: lpfc: Fix dif and first burst use in write commands
Dan Carpenter <dan.carpenter(a)oracle.com>
block: drbd: remove a stray unlock in __drbd_send_protocol()
Ilya Leoshkevich <iii(a)linux.ibm.com>
scripts/gdb: fix debugging modules compiled with hot/cold partitioning
Jeroen Hofstee <jhofstee(a)victronenergy.com>
can: c_can: D_CAN: c_can_chip_config(): perform a sofware reset on open
Jeroen Hofstee <jhofstee(a)victronenergy.com>
can: peak_usb: report bus recovery as well
Randy Dunlap <rdunlap(a)infradead.org>
reset: fix reset_control_ops kerneldoc comment
Marek Szyprowski <m.szyprowski(a)samsung.com>
clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume
Russell King <rmk+kernel(a)armlinux.org.uk>
ASoC: kirkwood: fix external clock probe defer
Xiaojun Sang <xsang(a)codeaurora.org>
ASoC: compress: fix unsigned integer overflow check
-------------
Diffstat:
Documentation/hid/uhid.txt | 2 +-
Makefile | 4 +-
arch/arm/Kconfig.debug | 28 ++++++------
arch/arm/boot/dts/imx53-voipac-dmm-668.dtsi | 8 +---
arch/arm/mach-ks8695/board-acs5k.c | 2 +-
arch/arm64/kernel/smp.c | 1 +
arch/microblaze/Makefile | 12 ++---
arch/microblaze/boot/Makefile | 4 --
arch/openrisc/kernel/entry.S | 2 +-
arch/openrisc/kernel/head.S | 2 +-
arch/powerpc/boot/dts/bamboo.dts | 4 +-
arch/powerpc/kernel/prom.c | 6 +--
arch/powerpc/mm/fault.c | 17 ++++----
arch/powerpc/mm/ppc_mmu_32.c | 4 +-
arch/powerpc/platforms/pseries/dlpar.c | 4 ++
arch/powerpc/xmon/xmon.c | 2 +-
arch/s390/kvm/kvm-s390.c | 17 ++++++--
arch/um/Kconfig.debug | 1 +
crypto/crypto_user.c | 37 ++++++++--------
drivers/acpi/acpi_lpss.c | 7 +--
drivers/acpi/apei/ghes.c | 30 ++++++-------
drivers/block/drbd/drbd_main.c | 1 -
drivers/block/drbd/drbd_nl.c | 6 +--
drivers/block/drbd/drbd_receiver.c | 19 ++++++++
drivers/block/drbd/drbd_state.h | 2 +-
drivers/char/hw_random/stm32-rng.c | 8 ++++
drivers/clk/samsung/clk-exynos5420.c | 6 +++
drivers/hid/hid-core.c | 51 +++++++++++++++++++---
drivers/infiniband/hw/qib/qib_sdma.c | 4 +-
drivers/infiniband/ulp/srp/ib_srp.c | 1 +
drivers/input/serio/gscps2.c | 4 +-
drivers/input/serio/hp_sdc.c | 4 +-
drivers/media/v4l2-core/v4l2-ctrls.c | 1 +
drivers/misc/mei/bus.c | 9 ++--
drivers/mtd/mtdcore.h | 2 +-
drivers/mtd/mtdpart.c | 35 ++++++++++++---
drivers/mtd/ubi/build.c | 2 +-
drivers/mtd/ubi/kapi.c | 2 +-
drivers/net/can/c_can/c_can.c | 26 +++++++++++
drivers/net/can/usb/peak_usb/pcan_usb.c | 15 ++++---
drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 4 +-
drivers/net/ethernet/cadence/macb.c | 12 ++---
drivers/net/ethernet/sfc/ef10.c | 29 ++++++++----
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 4 +-
drivers/net/macvlan.c | 3 +-
drivers/net/slip/slip.c | 1 +
drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 +-
drivers/net/wireless/mwifiex/debugfs.c | 14 +++---
drivers/net/wireless/mwifiex/scan.c | 18 ++++----
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 3 +-
drivers/pinctrl/sh-pfc/pfc-sh7264.c | 9 +++-
drivers/pinctrl/sh-pfc/pfc-sh7734.c | 16 +++----
drivers/platform/x86/hp-wmi.c | 6 +--
drivers/power/avs/smartreflex.c | 3 +-
drivers/pwm/core.c | 1 +
drivers/pwm/pwm-samsung.c | 1 -
drivers/regulator/palmas-regulator.c | 5 ++-
drivers/regulator/tps65910-regulator.c | 4 +-
drivers/scsi/csiostor/csio_init.c | 2 +-
drivers/scsi/libsas/sas_expander.c | 29 +++++++++++-
drivers/scsi/lpfc/lpfc_scsi.c | 18 ++++++++
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 48 ++++----------------
drivers/scsi/qla2xxx/tcm_qla2xxx.h | 3 --
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 ++-
drivers/tty/serial/max310x.c | 7 +--
drivers/usb/serial/ftdi_sio.c | 3 ++
drivers/usb/serial/ftdi_sio_ids.h | 7 +++
drivers/xen/xen-pciback/pci_stub.c | 3 +-
fs/btrfs/delayed-ref.c | 3 --
fs/gfs2/bmap.c | 2 +
fs/ocfs2/journal.c | 6 +--
fs/xfs/xfs_ioctl32.c | 6 +++
fs/xfs/xfs_rtalloc.c | 4 +-
include/linux/gpio/consumer.h | 2 +-
include/linux/netdevice.h | 2 +-
include/linux/reset-controller.h | 2 +-
include/net/sock.h | 2 +-
lib/genalloc.c | 5 ++-
net/core/neighbour.c | 13 ++++--
net/core/net_namespace.c | 3 +-
net/core/sock.c | 2 +-
net/decnet/dn_dev.c | 2 +-
net/openvswitch/datapath.c | 17 ++++++--
net/sched/sch_mq.c | 2 +-
net/sched/sch_mqprio.c | 3 +-
net/sched/sch_multiq.c | 2 +-
net/sched/sch_prio.c | 2 +-
net/tipc/link.c | 2 +-
net/tipc/netlink_compat.c | 8 +++-
net/vmw_vsock/af_vsock.c | 7 ++-
scripts/gdb/linux/symbols.py | 3 +-
sound/core/compress_offload.c | 2 +-
sound/soc/kirkwood/kirkwood-i2s.c | 8 ++--
93 files changed, 493 insertions(+), 271 deletions(-)
The mei device and i915 must reside on the same
PCH in order for HDCP to work. Make the component
matching function enforce this requirement.
hdcp
|
i915 mei
| |
+----= PCH =----+
Cc: <stable(a)vger.kernel.org> v5.0+
Cc: Ramalingam C <ramalingam.c(a)intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler(a)intel.com>
Reviewed-by: Alexander Usyskin <alexander.usyskin(a)intel.com>
---
drivers/misc/mei/hdcp/mei_hdcp.c | 33 +++++++++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c
index 93027fd96c71..4c596c646ac0 100644
--- a/drivers/misc/mei/hdcp/mei_hdcp.c
+++ b/drivers/misc/mei/hdcp/mei_hdcp.c
@@ -757,11 +757,38 @@ static const struct component_master_ops mei_component_master_ops = {
.unbind = mei_component_master_unbind,
};
+/**
+ * mei_hdcp_component_match - compare function for matching mei hdcp.
+ *
+ * The function checks if the driver is i915, the subcomponent is HDCP
+ * and the grand parent of hdcp and the parent of i915 are the same
+ * PCH device.
+ *
+ * @dev: master device
+ * @subcomponent: subcomponent to match (I915_COMPONENT_HDCP)
+ * @data: compare data (mei hdcp device)
+ *
+ * Return:
+ * * 1 - if components match
+ * * 0 - otherwise
+ */
static int mei_hdcp_component_match(struct device *dev, int subcomponent,
void *data)
{
- return !strcmp(dev->driver->name, "i915") &&
- subcomponent == I915_COMPONENT_HDCP;
+ struct device *base = data;
+
+ if (strcmp(dev->driver->name, "i915") ||
+ subcomponent != I915_COMPONENT_HDCP)
+ return 0;
+
+ base = base->parent;
+ if (!base)
+ return 0;
+
+ base = base->parent;
+ dev = dev->parent;
+
+ return (base && dev && dev == base);
}
static int mei_hdcp_probe(struct mei_cl_device *cldev,
@@ -785,7 +812,7 @@ static int mei_hdcp_probe(struct mei_cl_device *cldev,
master_match = NULL;
component_match_add_typed(&cldev->dev, &master_match,
- mei_hdcp_component_match, comp_master);
+ mei_hdcp_component_match, &cldev->dev);
if (IS_ERR_OR_NULL(master_match)) {
ret = -ENOMEM;
goto err_exit;
--
2.21.0
After DMA is complete, and the device and CPU caches are synchronized,
it's still required to mark the CPU pages as dirty, if the data was
coming from the device. However, this driver was just issuing a
bare put_page() call, without any set_page_dirty*() call.
Fix the problem, by calling set_page_dirty_lock() if the CPU pages
were potentially receiving data from the device.
Reviewed-by: Christoph Hellwig <hch(a)lst.de>
Acked-by: Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: John Hubbard <jhubbard(a)nvidia.com>
---
drivers/media/v4l2-core/videobuf-dma-sg.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/videobuf-dma-sg.c b/drivers/media/v4l2-core/videobuf-dma-sg.c
index 66a6c6c236a7..28262190c3ab 100644
--- a/drivers/media/v4l2-core/videobuf-dma-sg.c
+++ b/drivers/media/v4l2-core/videobuf-dma-sg.c
@@ -349,8 +349,11 @@ int videobuf_dma_free(struct videobuf_dmabuf *dma)
BUG_ON(dma->sglen);
if (dma->pages) {
- for (i = 0; i < dma->nr_pages; i++)
+ for (i = 0; i < dma->nr_pages; i++) {
+ if (dma->direction == DMA_FROM_DEVICE)
+ set_page_dirty_lock(dma->pages[i]);
put_page(dma->pages[i]);
+ }
kfree(dma->pages);
dma->pages = NULL;
}
--
2.24.0