Skip to contentSkip to conversation

Patch "mailbox: handle empty message in tx_tick" has been added to the 3.18-stable tree

PATCH [email protected] 1 participant 1 message Aug 3, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

mailbox: handle empty message in tx_tick

to the 3.18-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:
mailbox-handle-empty-message-in-tx_tick.patch
and it can be found in the queue-3.18 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 cb710ab1d8a23f68ff8f45aedf3e552bb90e70de Mon Sep 17 00:00:00 2001

From: Sudeep Holla <[email protected]>
Date: Tue, 21 Mar 2017 11:30:16 +0000
Subject: mailbox: handle empty message in tx_tick

From: Sudeep Holla <[email protected]>

commit cb710ab1d8a23f68ff8f45aedf3e552bb90e70de upstream.

We already check if the message is empty before calling the client tx_done callback. Calling completion on a wait event is also invalid if the message is empty.

This patch moves the existing empty message check earlier.

Fixes 2b6d83e2b8b7 ("mailbox: Introduce framework for mailbox")
---
 drivers/mailbox/mailbox.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mailbox/mailbox.c +4 -1
@@ -99,8 +99,11 @@ static void tx_tick(struct mbox_chan *ch
 	/* Submit next message */
 	msg_submit(chan);
 
+	if (!mssg)
+		return;
+
 	/* Notify the client */
-	if (mssg && chan->cl->tx_done)
+	if (chan->cl->tx_done)
 		chan->cl->tx_done(chan->cl, mssg, r);
 
 	if (r != -ETIME && chan->cl->tx_block)

Patches currently in stable-queue which might be from [email protected] are

queue-3.18/mailbox-always-wait-in-mbox_send_message-for-blocking-tx-mode.patch queue-3.18/mailbox-skip-complete-wait-event-if-timer-expired.patch queue-3.18/mailbox-handle-empty-message-in-tx_tick.patch