From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:60754 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751599AbdHCWoE (ORCPT ); Thu, 3 Aug 2017 18:44:04 -0400 Subject: Patch "mailbox: handle empty message in tx_tick" has been added to the 3.18-stable tree To: sudeep.holla@arm.com, amit.pundir@linaro.org, gregkh@linuxfoundation.org, jaswinder.singh@linaro.org Cc: , From: Date: Thu, 03 Aug 2017 15:43:59 -0700 Message-ID: <1501800239149234@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From cb710ab1d8a23f68ff8f45aedf3e552bb90e70de Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Tue, 21 Mar 2017 11:30:16 +0000 Subject: mailbox: handle empty message in tx_tick From: Sudeep Holla 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") Signed-off-by: Sudeep Holla Signed-off-by: Jassi Brar Signed-off-by: Amit Pundir Signed-off-by: Greg Kroah-Hartman --- drivers/mailbox/mailbox.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -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 sudeep.holla@arm.com 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