Received: by 10.223.164.202 with SMTP id h10csp211853wrb; Mon, 13 Nov 2017 05:21:16 -0800 (PST) X-Google-Smtp-Source: AGs4zMb8hIk6SSBLbDKVY/vOosPSaVMc267hCx5HWI2GCOfnTcK7+LvU/oeVbeAYZ7DdIAJZPDSI X-Received: by 10.84.247.22 with SMTP id n22mr8888349pll.145.1510579276562; Mon, 13 Nov 2017 05:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510579276; cv=none; d=google.com; s=arc-20160816; b=V1pLQjZ5z5S4W8Bxr+SFhAJIJ53NdlnIxZHBNg5sq8iCfdP9VFFGz3XjbuqD5KZNA1 xlj+Vwu4NE0vRTya/tEauHlf15NYQtZ/K8F3fo+Mkc7fnekxoBzjo607Fpxve/H+e719 5rr6tqoM+O1MfK4thIwke2l87vssyPRDgtyZJzG0Q2D0ahw6ananKjTD2Z6987alyHZJ cDX3kggFf7s6JpnmKk2qQQKXOjEOQafxzstvjXR9YHXvl8mM+q5tirAuCroS4hi5fwJe 44yICoJWT8S3krJ4AsGx8anEymwhGk5gMQy2QeJo1kejQJzUtI6kEY+88aSDxcRKRpjP DRSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Z1XdZAt5FVcwrMg7RFEt4apJATFCqetZov42E1Ul37c=; b=pZ/r+hqHq3jbqQsiyVpJip6x9wEFFlNBUhh43l5hUg/p2HS9FwIs/As0X8lEzLld53 y3PXT6xM8vej4wVQ7ixixRBg4gMVOTex1q+eIJf/nEEmsn9Xx7w5NQkWvcL3k1Meh4Mx SeqypML/n4rGfRXPsX3Pfne76WOxFsqCTkE7VxF8fx0r0CoYxFSk0I8+Z9loRvRtutCR VaaCC8tgSJ+OkqptOR+HNtGmbmjkdnFi4gIckVg50DTepziXbooNstXyUxikUDqQ+uQ5 SEwuVpjAdtJU4+J6wAqLApDvSaQ57jKS3l1k7PMrsPBNXcwEfQ48s+Ugl8OWzUaOVIWv QbyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r12si5104430plj.70.2017.11.13.05.21.03; Mon, 13 Nov 2017 05:21:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752867AbdKMNUb (ORCPT + 95 others); Mon, 13 Nov 2017 08:20:31 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50364 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753559AbdKMNB4 (ORCPT ); Mon, 13 Nov 2017 08:01:56 -0500 Received: from localhost (LFbn-1-12253-150.w90-92.abo.wanadoo.fr [90.92.67.150]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1A472AA5; Mon, 13 Nov 2017 13:01:55 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Feras Daoud , Erez Shitrit , Alex Vesker , Leon Romanovsky , Yuval Shaia , Doug Ledford , Sasha Levin Subject: [PATCH 4.9 41/87] IB/ipoib: Change list_del to list_del_init in the tx object Date: Mon, 13 Nov 2017 13:55:58 +0100 Message-Id: <20171113125619.107381274@linuxfoundation.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171113125615.304035578@linuxfoundation.org> References: <20171113125615.304035578@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Feras Daoud [ Upstream commit 27d41d29c7f093f6f77843624fbb080c1b4a8b9c ] Since ipoib_cm_tx_start function and ipoib_cm_tx_reap function belong to different work queues, they can run in parallel. In this case if ipoib_cm_tx_reap calls list_del and release the lock, ipoib_cm_tx_start may acquire it and call list_del_init on the already deleted object. Changing list_del to list_del_init in ipoib_cm_tx_reap fixes the problem. Fixes: 839fcaba355a ("IPoIB: Connected mode experimental support") Signed-off-by: Feras Daoud Signed-off-by: Erez Shitrit Reviewed-by: Alex Vesker Signed-off-by: Leon Romanovsky Reviewed-by: Yuval Shaia Signed-off-by: Doug Ledford Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -1392,7 +1392,7 @@ static void ipoib_cm_tx_reap(struct work while (!list_empty(&priv->cm.reap_list)) { p = list_entry(priv->cm.reap_list.next, typeof(*p), list); - list_del(&p->list); + list_del_init(&p->list); spin_unlock_irqrestore(&priv->lock, flags); netif_tx_unlock_bh(dev); ipoib_cm_tx_destroy(p); From 1583958218220087306@xxx Mon Nov 13 13:37:50 +0000 2017 X-GM-THRID: 1583956669688384495 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread