Patch "rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length

to the 5.10-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:
     rpmsg-glink-use-only-lower-16-bits-of-param2-for-cmd.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 77fcb38297a860a98650e5fd464c3fc46748a515
Author: Jonathan Marek <jonathan@xxxxxxxx>
Date:   Mon Oct 7 19:59:35 2024 -0400

    rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length
    
    [ Upstream commit 06c59d97f63c1b8af521fa5aef8a716fb988b285 ]
    
    The name len field of the CMD_OPEN packet is only 16-bits and the upper
    16-bits of "param2" are a different "prio" field, which can be nonzero in
    certain situations, and CMD_OPEN packets can be unexpectedly dropped
    because of this.
    
    Fix this by masking out the upper 16 bits of param2.
    
    Fixes: b4f8e52b89f6 ("rpmsg: Introduce Qualcomm RPM glink driver")
    Signed-off-by: Jonathan Marek <jonathan@xxxxxxxx>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241007235935.6216-1-jonathan@xxxxxxxx
    Signed-off-by: Bjorn Andersson <andersson@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 831a5d1cd4806..82670cb063f5a 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -1045,7 +1045,8 @@ static irqreturn_t qcom_glink_native_intr(int irq, void *data)
 			qcom_glink_rx_advance(glink, ALIGN(sizeof(msg), 8));
 			break;
 		case GLINK_CMD_OPEN:
-			ret = qcom_glink_rx_defer(glink, param2);
+			/* upper 16 bits of param2 are the "prio" field */
+			ret = qcom_glink_rx_defer(glink, param2 & 0xffff);
 			break;
 		case GLINK_CMD_TX_DATA:
 		case GLINK_CMD_TX_DATA_CONT:




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux