Patch "net: ipa: terminate message handler arrays" 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

    net: ipa: terminate message handler arrays

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:
     net-ipa-terminate-message-handler-arrays.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 3c4844e70a4224f9559bfcf033194482bf0d9803
Author: Alex Elder <elder@xxxxxxxxxx>
Date:   Fri Mar 12 09:12:48 2021 -0600

    net: ipa: terminate message handler arrays
    
    [ Upstream commit 3a9ef3e11c5d33e5cb355b4aad1a4caad2407541 ]
    
    When a QMI handle is initialized, an array of message handler
    structures is provided, defining how any received message should
    be handled based on its type and message ID.  The QMI core code
    traverses this array when a message arrives and calls the function
    associated with the (type, msg_id) found in the array.
    
    The array is supposed to be terminated with an empty (all zero)
    entry though.  Without it, an unsupported message will cause
    the QMI core code to go past the end of the array.
    
    Fix this bug, by properly terminating the message handler arrays
    provided when QMI handles are set up by the IPA driver.
    
    Fixes: 530f9216a9537 ("soc: qcom: ipa: AP/modem communications")
    Reported-by: Sujit Kautkar <sujitka@xxxxxxxxxxxx>
    Signed-off-by: Alex Elder <elder@xxxxxxxxxx>
    Reviewed-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ipa/ipa_qmi.c b/drivers/net/ipa/ipa_qmi.c
index 5090f0f923ad..1a87a49538c5 100644
--- a/drivers/net/ipa/ipa_qmi.c
+++ b/drivers/net/ipa/ipa_qmi.c
@@ -249,6 +249,7 @@ static struct qmi_msg_handler ipa_server_msg_handlers[] = {
 		.decoded_size	= IPA_QMI_DRIVER_INIT_COMPLETE_REQ_SZ,
 		.fn		= ipa_server_driver_init_complete,
 	},
+	{ },
 };
 
 /* Handle an INIT_DRIVER response message from the modem. */
@@ -269,6 +270,7 @@ static struct qmi_msg_handler ipa_client_msg_handlers[] = {
 		.decoded_size	= IPA_QMI_INIT_DRIVER_RSP_SZ,
 		.fn		= ipa_client_init_driver,
 	},
+	{ },
 };
 
 /* Return a pointer to an init modem driver request structure, which contains



[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