Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2777939yba; Mon, 22 Apr 2019 12:47:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbdcp52BiR/aKEwTH9zBjCKwpFK5ME6WapwtIcq3vCei+9nNWhd0wV7sfQO+1nzPHJdGtg X-Received: by 2002:a62:6fc6:: with SMTP id k189mr22288087pfc.154.1555962450956; Mon, 22 Apr 2019 12:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555962450; cv=none; d=google.com; s=arc-20160816; b=TvYnJx5562lQzi9Y0bs9a1AmHyoAYMvXhUBKROFhLMwrAAtplejAl5d0w3f4hIJc1m DcDY+ugHISXbGACw3aMhuPs534lRTejJIG2o+kjA2ZtpP8pYzFKr6fs+1uj8BWJ4E9B5 juUoQjGI7gRKkW81tJj9OfIefwXpR+a0BshR238S458R+y7yC8zucbrFsOUuQEC5MAKQ oHnOEU2gVAk5hTHK70OipmbhjZiLuTcWkBfMmnKqZnSEiybMcFz0D8gVZEmIy7jgMx7V /3/jlB+L2wpvWn2PkOf1zqGRf0U1s0vOUG4LH5BgSkCx0I+R6zkxaet+TQZ6ZyaEgK/4 2YGw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PYElBFk+zP4kuH1lJrW/0puXtbuJwh7gGKt/qWmvyvY=; b=IoKhynCR8A9OjWVLs9y1vkiFRnn+WRJ+oS2zQBzhwR4FlJKAFb+87YF2w1klAHWgSq iaeHZNBMdJzAg4uyTZSCnTvZv5ljqA75xSUyRB3mJV6J8HiclWD5GAnXwZIAojjgsu+R yfoDRIfgSf5JSyooUc8HMQGESxwXZ6oScFk0UFP4xOvJ13ZE///r+yRzBtysFyPkc81D kF3kNCl6tfWEnWqHgDYI9xCG9ZsacsEWyTG2evFBQ+rCiDVdGbYlkKeILtX73bD4lgpf xhqVSMzZWMCfoLrM99Vhy5z3WuaJrZw0bGa5t+7M6DnsDuryV2ZwyAxQTrLaeADbXdRX n8+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wN4862Ck; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k12si13660499pll.73.2019.04.22.12.47.15; Mon, 22 Apr 2019 12:47:30 -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=wN4862Ck; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729860AbfDVTpu (ORCPT + 99 others); Mon, 22 Apr 2019 15:45:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:47590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729329AbfDVTpn (ORCPT ); Mon, 22 Apr 2019 15:45:43 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 21128218FC; Mon, 22 Apr 2019 19:45:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555962342; bh=KIHD3FTr5hMonU1tvkDj/CFp8Gcw0o8BBF2Qt4bOC1Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wN4862CkqYbLPjsbiaVYPR70hPN4gdb1GI4X63nDz06HxadW07SPr8iMfTu1wn553 vXYp3DzyWqaN5AR2+a2YJAlBztYzALWYpX4AXcaE4ypee6wfRrPEb564PAv3pQqgjX bPNUWHTJgC1VT36UdtlwNm0GOuroqPaV9ba1Qhh8= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Julian Wiedmann , "David S . Miller" , Sasha Levin , linux-s390@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 14/68] s390/qeth: fix race when initializing the IP address table Date: Mon, 22 Apr 2019 15:44:22 -0400 Message-Id: <20190422194516.11634-14-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190422194516.11634-1-sashal@kernel.org> References: <20190422194516.11634-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Julian Wiedmann [ 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 7f71ca0d08e7..9c5e801b3f6c 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -2586,12 +2586,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->options.layer2 = 0; card->info.hwtrap = 0; -- 2.19.1