Patch "soc: qcom: smp2p: Correct addressing of outgoing value" has been added to the 4.7-stable tree
Subsystems (3)
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 <[email protected]> know about it.
Quoted 1 line
From
63af8e44eaa56ffe613628742a2642c4c2f1a029Mon Sep 17 00:00:00 2001
From: Bjorn Andersson <[email protected]>
Date: Thu, 9 Jun 2016 17:22:56 -0700
Subject: soc: qcom: smp2p: Correct addressing of outgoing value
From: Bjorn Andersson <[email protected]>
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.
--- drivers/soc/qcom/smp2p.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/qcom/smp2p.c +2 -1
@@ -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 [email protected] 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