From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:34444 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbeBWLLQ (ORCPT ); Fri, 23 Feb 2018 06:11:16 -0500 Subject: Patch "i40iw: Do not free sqbuf when event is I40IW_TIMER_TYPE_CLOSE" has been added to the 4.14-stable tree To: mustafa.ismail@intel.com, alexander.levin@verizon.com, gregkh@linuxfoundation.org, jgg@mellanox.com, shiraz.saleem@intel.com Cc: , From: Date: Fri, 23 Feb 2018 12:10:26 +0100 Message-ID: <1519384226121155@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 i40iw: Do not free sqbuf when event is I40IW_TIMER_TYPE_CLOSE to the 4.14-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: i40iw-do-not-free-sqbuf-when-event-is-i40iw_timer_type_close.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Fri Feb 23 11:45:09 CET 2018 From: Mustafa Ismail Date: Tue, 21 Nov 2017 16:18:31 -0600 Subject: i40iw: Do not free sqbuf when event is I40IW_TIMER_TYPE_CLOSE From: Mustafa Ismail [ Upstream commit 10499986dbd8778e1acf9f9d2e166800dfee44b4 ] When the event type is I40IW_TIMER_TYPE_CLOSE, there is no sqbuf and it should not be freed as one in i40iw_schedule_cm_timer(). Fixes: f27b4746f378 ("i40iw: add connection management code") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/hw/i40iw/i40iw_cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/infiniband/hw/i40iw/i40iw_cm.c +++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c @@ -1043,7 +1043,7 @@ negotiate_done: * i40iw_schedule_cm_timer * @@cm_node: connection's node * @sqbuf: buffer to send - * @type: if it es send ot close + * @type: if it is send or close * @send_retrans: if rexmits to be done * @close_when_complete: is cm_node to be removed * @@ -1067,7 +1067,8 @@ int i40iw_schedule_cm_timer(struct i40iw new_send = kzalloc(sizeof(*new_send), GFP_ATOMIC); if (!new_send) { - i40iw_free_sqbuf(vsi, (void *)sqbuf); + if (type != I40IW_TIMER_TYPE_CLOSE) + i40iw_free_sqbuf(vsi, (void *)sqbuf); return -ENOMEM; } new_send->retrycount = I40IW_DEFAULT_RETRYS; @@ -1082,7 +1083,6 @@ int i40iw_schedule_cm_timer(struct i40iw new_send->timetosend += (HZ / 10); if (cm_node->close_entry) { kfree(new_send); - i40iw_free_sqbuf(vsi, (void *)sqbuf); i40iw_pr_err("already close entry\n"); return -EINVAL; } Patches currently in stable-queue which might be from mustafa.ismail@intel.com are queue-4.14/i40iw-correct-arp-index-mask.patch queue-4.14/i40iw-do-not-free-sqbuf-when-event-is-i40iw_timer_type_close.patch