rpmsg: qcom_smd: increase bounce buffer size

Bounce buffer size is 4K, which cause buffer overflow when
incoming packet size greater than 4k and packet is wrap around
in FIFO.

To avoid buffer overflow use bounce buffer size same as FIFO size.

Change-Id: Ia23adda1de2bd6613def844fc88a565587bcd82d
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Mandar Mahesh Kamble <quic_maheshka@quicinc.com>
This commit is contained in:
Mandar Mahesh Kamble 2024-05-08 17:02:25 +05:30
parent 23d0f552e1
commit 13ce68c2db

View file

@ -820,9 +820,9 @@ static int qcom_smd_channel_open(struct qcom_smd_channel *channel,
int ret;
/*
* Packets are maximum 4k, but reduce if the fifo is smaller
* Packets are maximum 8k, but reduce if the fifo is smaller
*/
bb_size = min(channel->fifo_size, SZ_4K);
bb_size = min(channel->fifo_size, SZ_8K);
channel->bounce_buffer = kmalloc(bb_size, GFP_KERNEL);
if (!channel->bounce_buffer)
return -ENOMEM;