* Patch "soc: qcom: smp2p: Correct addressing of outgoing value" has been added to the 4.7-stable tree
@ 2016-08-18 10:57 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-08-18 10:57 UTC (permalink / raw)
To: bjorn.andersson, andy.gross, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
soc: qcom: smp2p: Correct addressing of outgoing value
to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
soc-qcom-smp2p-correct-addressing-of-outgoing-value.patch
and it can be found in the queue-4.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 63af8e44eaa56ffe613628742a2642c4c2f1a029 Mon Sep 17 00:00:00 2001
From: Bjorn Andersson <bjorn.andersson@linaro.org>
Date: Thu, 9 Jun 2016 17:22:56 -0700
Subject: soc: qcom: smp2p: Correct addressing of outgoing value
From: Bjorn Andersson <bjorn.andersson@linaro.org>
commit 63af8e44eaa56ffe613628742a2642c4c2f1a029 upstream.
The valid_entries index should not be incremented until after we have
acquired the pointer to the value, or we will read and write data one
item off.
Fixes: 50e99641413e ("soc: qcom: smp2p: Qualcomm Shared Memory Point to Point")
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/soc/qcom/smp2p.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/soc/qcom/smp2p.c
+++ b/drivers/soc/qcom/smp2p.c
@@ -344,11 +344,12 @@ static int qcom_smp2p_outbound_entry(str
/* Allocate an entry from the smem item */
strlcpy(buf, entry->name, SMP2P_MAX_ENTRY_NAME);
memcpy_toio(out->entries[out->valid_entries].name, buf, SMP2P_MAX_ENTRY_NAME);
- out->valid_entries++;
/* Make the logical entry reference the physical value */
entry->value = &out->entries[out->valid_entries].value;
+ out->valid_entries++;
+
entry->state = qcom_smem_state_register(node, &smp2p_state_ops, entry);
if (IS_ERR(entry->state)) {
dev_err(smp2p->dev, "failed to register qcom_smem_state\n");
Patches currently in stable-queue which might be from bjorn.andersson@linaro.org are
queue-4.7/mfd-qcom_rpm-parametrize-also-ack-selector-size.patch
queue-4.7/remoteproc-fix-potential-race-condition-in-rproc_add.patch
queue-4.7/tty-serial-msm-don-t-read-off-end-of-tx-fifo.patch
queue-4.7/mfd-qcom_rpm-fix-offset-error-for-msm8660.patch
queue-4.7/soc-qcom-smp2p-correct-addressing-of-outgoing-value.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-18 10:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-18 10:57 Patch "soc: qcom: smp2p: Correct addressing of outgoing value" has been added to the 4.7-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.