From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 882E0C43219 for ; Thu, 2 May 2019 15:39:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 511AC216FD for ; Thu, 2 May 2019 15:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556811581; bh=amzHIsb1JZLNUlbv3jmFnjLvDs4ldLoWwIImwCYYt6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=IP8/kDkvMFGEd774OW+oo+2mlowR+XThHMejR4vviv0i060k9+czqJhaeIIxo9ywr bVkoTDvGxzLHu8x2v6Cak/Vs1NEJ1lTaGCsxh8GRLYda1gPBevqhwCAZtrUtCxkjDC sHZMg7LHNuXJIfeINsqcxFODiS3RoUeSZy7P4QBQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728422AbfEBPjk (ORCPT ); Thu, 2 May 2019 11:39:40 -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: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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