Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3529230pxf; Mon, 15 Mar 2021 11:35:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyb0opfPB9oYFPwJcq8JwZPSiiy/UTLZ4qdsCtLYSVvQCJjYNfYbxGe+5DH1Sm3yHI5UOc+ X-Received: by 2002:a17:906:5e4a:: with SMTP id b10mr25302794eju.116.1615833310595; Mon, 15 Mar 2021 11:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833310; cv=none; d=google.com; s=arc-20160816; b=U3ZJZBksQJ6MzQaDHkPKAg9mlIgKjmff7eyg+oJLRcp2HgLPP8HEXnugG+6nStbaf5 xleaWNEnVz82o9fVX1q8uyP1b6KDOXERFHYaUSb8yKSfa041E3ZAaJU4FIlDd71jWSb7 jPlFemj8477AM6uhWd31IlvkbRxBjqyT88Eq0Ofy8lURbiHYtxPm+MiRZ70B/0Qlnshu 77kRxXBNRWde9E3PPaug5vSvAr/9ZQyLmdiScvmWLUwj8bpavMUnQuFYogrGhQmFig0V LigNKTqUR4Y//b1QRN8IgsymuJkv7mDvS5nEy1Lhme0Iy5ppFvaELNzsG/xmzAxCUBqA eIMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=64n0tGVmshyK9DWVgdO4RFRP0czlXF2PIHQVsV7QLk4=; b=PQA8gpMvWwnwEWgJEmwZgYcFasvKu+U2/AUC8m/jaUOwb4M5a2h5Qva+FWbE+xfBq6 Owbx6duwXTAQrN2XDZJOw8JxPN7wbHrsy0sbM+IpTJ6O/Xo+KcdrvlqHvq3BsRJ3BgXh TlzD7lGjn1bG3SPWxEOZf1WTCsfgLCVmkFjfPBvD/6XLePCaixGKqELVon9N/I8VmwkB 50Pu16aR50Esmi8Ml3Qkg/UnpkF2Ay/HVaHndfFsbfc5lQOsuua8Pz7Ug0qhzmLxu2k3 nI46rdSbipgKAJ88psvkrlVu99Fyzo0vhb2tSen8mn8XTlvhqVF7E1zl4kpyiQIkVklk YQTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lFThMuuv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga18si11608868ejb.632.2021.03.15.11.34.48; Mon, 15 Mar 2021 11:35:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lFThMuuv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237035AbhCOOoZ (ORCPT + 99 others); Mon, 15 Mar 2021 10:44:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:50750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232876AbhCOOD4 (ORCPT ); Mon, 15 Mar 2021 10:03:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 27BF264F0B; Mon, 15 Mar 2021 14:03:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615817034; bh=/JTvGATYW5r/jlAqVIzH0rTIktRXFjvbCTITl6syH2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lFThMuuveseEsqLvMS+Dr4PgRsZaFqLZ+20LBDoARZo5iCNPcyX5mJaXHK8QpqwTd f9yS6STLiD5Pd4kLL4GLCNUQcCyjrMa9bSrhr7yF9XqyeBqKxPxkSixsYBBD4O+JjE ou/xK+ebyY58M6HfDzCRxIXpzFYPP5U5Bi5GZZsg= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , "Peter Zijlstra (Intel)" , Sasha Levin Subject: [PATCH 5.10 257/290] seqlock,lockdep: Fix seqcount_latch_init() Date: Mon, 15 Mar 2021 14:55:50 +0100 Message-Id: <20210315135550.693627314@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Peter Zijlstra [ Upstream commit 4817a52b306136c8b2b2271d8770401441e4cf79 ] seqcount_init() must be a macro in order to preserve the static variable that is used for the lockdep key. Don't then wrap it in an inline function, which destroys that. Luckily there aren't many users of this function, but fix it before it becomes a problem. Fixes: 80793c3471d9 ("seqlock: Introduce seqcount_latch_t") Reported-by: Eric Dumazet Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/YEeFEbNUVkZaXDp4@hirez.programming.kicks-ass.net Signed-off-by: Sasha Levin --- include/linux/seqlock.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index cbfc78b92b65..1ac20d75b061 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -659,10 +659,7 @@ typedef struct { * seqcount_latch_init() - runtime initializer for seqcount_latch_t * @s: Pointer to the seqcount_latch_t instance */ -static inline void seqcount_latch_init(seqcount_latch_t *s) -{ - seqcount_init(&s->seqcount); -} +#define seqcount_latch_init(s) seqcount_init(&(s)->seqcount) /** * raw_read_seqcount_latch() - pick even/odd latch data copy -- 2.30.1