Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7368561yba; Thu, 2 May 2019 08:42:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCx2FRfI9bhinx0zQb0n1gGTTOtZgQ5RByM4VnEm9WDmNbBplIxTtNYwknsJqKJeSxGR+k X-Received: by 2002:a17:902:e58e:: with SMTP id cl14mr4517281plb.85.1556811756131; Thu, 02 May 2019 08:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556811756; cv=none; d=google.com; s=arc-20160816; b=mXo6dTJ01u45FXpewAVWNLviAWd4XxaBjJJMw9oKzZONSsLO76mmuIXIdPKad7y7kp ZVTA4dDx30019AAY9v1eqgcZcEToCWQZcVx103xENgi1tV5RqPLxwUf6LECYF0Eq9Jgn +aOnQ4HcBxDC+0R9JWRHvI7A3Z/o3fiMPYfio2dt+7sMY886F8ZIbj1YFj0BV1WF04s2 EEOxOsezsOxQWh+6YnkBcFcz8abmN1eQwuNlZDdEHunY7DBJCrqrmglMTwmY9vTbWWah rvJpEDXzezR4s87vW9coskYyOgVTxmV3eAxYtk0ofMAg7+fvNq20gtrPvJ6i3X1QUwt0 inQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I9G6K3rI9mca7ofIycmK/zj5hBuaQVexmN2Mg9RJbl4=; b=cg7yKviu+6/GfM3bn6svUP4PgoJ5Ca1Cj0oyCQxH24CuO9qmrSM3MS+X5J1gBNsn/Q ez8cuEbqkLPpmBK+Klbb7KeR9jm9AGbGm5YS8P8sCQBn0VazGfOY2XJ9Ol2vz46m3h2k dG0k3mOsNiN2e2ebzjNxD55ExRSU+Y30NeZPaBnQsYwycjp+TASZz9Q5XDIU+0+0dX75 TNY3zSytfLQUQL1E69YZsQmjLT0bZBeHtONP6VTCUwAXoqNKjQ8OCs4kEYelAv3a5EZ0 XjUVpbjoKq5dZ8WKM5Wi/y63tqnf6LWhHvMFGIZUVcn8gp8Ihn+XNRHLyG9k6zpPNPDL T21A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sDt1QdBU; 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 y4si40647215pgv.154.2019.05.02.08.42.21; Thu, 02 May 2019 08:42:36 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=sDt1QdBU; 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 S1728719AbfEBPjl (ORCPT + 99 others); Thu, 2 May 2019 11:39:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:47510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728472AbfEBP3e (ORCPT ); Thu, 2 May 2019 11:29:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C220C20B7C; Thu, 2 May 2019 15:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556810974; bh=amzHIsb1JZLNUlbv3jmFnjLvDs4ldLoWwIImwCYYt6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sDt1QdBUIBdiJK9MjDRtKkhsENFYRswxk6RkFZwP9vFTyLO5yuqOoS7Vq8IXfKgBE gj4GvQMohs/oqG8sXoby35FB6uiS77p8+WAaxByi2dEQoFbdQRoCzzdsIdqM+0RVi0 Bf1Xn5fuZDzE+HJI2Lr0bq5g6XeKHdhtY7H9xC7c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Julian Wiedmann , "David S. Miller" , "Sasha Levin (Microsoft)" Subject: [PATCH 5.0 027/101] s390/qeth: fix race when initializing the IP address table Date: Thu, 2 May 2019 17:20:29 +0200 Message-Id: <20190502143341.539158443@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190502143339.434882399@linuxfoundation.org> References: <20190502143339.434882399@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 7221b727f0079a32aca91f657141e1de564d4b97 ] The ucast IP table is utilized by some of the L3-specific sysfs attributes that qeth_l3_create_device_attributes() provides. So initialize the table _before_ registering the attributes. Fixes: ebccc7397e4a ("s390/qeth: add missing hash table initializations") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin (Microsoft) --- drivers/s390/net/qeth_l3_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index df34bff4ac31..f73ce96e9603 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -2316,12 +2316,14 @@ static int qeth_l3_probe_device(struct ccwgroup_device *gdev) struct qeth_card *card = dev_get_drvdata(&gdev->dev); int rc; + hash_init(card->ip_htable); + if (gdev->dev.type == &qeth_generic_devtype) { rc = qeth_l3_create_device_attributes(&gdev->dev); if (rc) return rc; } - hash_init(card->ip_htable); + hash_init(card->ip_mc_htable); card->info.hwtrap = 0; return 0; -- 2.19.1