]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length
authorJonathan Marek <jonathan@marek.ca>
Mon, 7 Oct 2024 23:59:35 +0000 (19:59 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:06 +0000 (19:51 +0100)
commit3dbb7e68669d08e6180dfa8bb853beb8abf83c75
tree8810f0c344d05ee9e4af10820095e4256bb11e53
parent04fcb57ac0fe691e74d842139177f9ecb9d61be3
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@marek.ca>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20241007235935.6216-1-jonathan@marek.ca
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/rpmsg/qcom_glink_native.c