Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3527948pxf; Mon, 15 Mar 2021 11:33:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6S+sXOZt17rWT1Cy113HiUrtJT+llHz2+pEovEW/r6oMJugPb4EvA2lPqx8iciJXKpZWN X-Received: by 2002:aa7:db15:: with SMTP id t21mr31553738eds.145.1615833199784; Mon, 15 Mar 2021 11:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833199; cv=none; d=google.com; s=arc-20160816; b=WlouXkBhY28ugPCWYpr+LwBjEWi0Sbw8TOcp5fkqvO/VwUpDGh2zJhJpZpMr5qLulU 7IQuvigJ0M+Ro6W2Tx2Zqf6Mfj4Vo2F/ZeeAiitaKd8MSf4j8Sr6bdXQMl50V2Jy1ruO ojaox7v0JrjbJBr5xnDWICsLlVwhHQUOvPPKcEdC5WsGM916T/jel/VBhoxALZ04dzN9 wQLBN8lIUE4NeMQmlIoYBrYz6bRfnHhJDZr4/KNTXYlSphGOMHcbq3RTlVMKrP6VaRx9 ZG5EBbj8yhCmzxI70+KxkkkLvT55NWoeiTuvOrlyBoRXtxa0qwx9WBFuZMzh9v1ZMGji tGiA== 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=WrZmq1DT/DK4vtiWoAjRb4Pwxi5Up89eJebp7aojyuU=; b=LsRxvmY4JbPjaYkwv9bQ1pVMVKI+DQuHUD7hJh2WD5Elcq9ffr0QKb5Mkk9eT8QNZ3 S9aaN+H8A1yXkQ6D+tIPHks6yjC2fMuZScsJpH4u+FFR6eR0at/JHJ/Fk1L+d8TpHlZS wBZJUxcEpVHSQHRCmNIUW4EZ/Dqki28QyxA+DlNafrZpZT+2L0ie95Xr47tVVY7RLuJk KxHvFGIT2hv1AA9gOKIWyc+byIVIWz78Yzzi5v/89QMtsLMMSS8khyeE/UpF/ERBfT/j B6nqORtqoMscCnQMmu3vmzF0e/Oq0c/UQkc5MyzdnaFB1YlCykKEv2IXiUuaqf5g6X15 1JmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ezjW++H7; 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 hr14si12277618ejc.394.2021.03.15.11.32.57; Mon, 15 Mar 2021 11:33:19 -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=ezjW++H7; 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 S238330AbhCOOoH (ORCPT + 99 others); Mon, 15 Mar 2021 10:44:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:49878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232842AbhCOODo (ORCPT ); Mon, 15 Mar 2021 10:03:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F2A4F64EF3; Mon, 15 Mar 2021 14:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615817022; bh=5Q28Insji8hCawfXC4N4OSXAj2QgE19Qfz+hVjQ/DAE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ezjW++H7DaIThPSu25UIKVd/uixf056rrqcY3KqwCSa/pPSUcC26NABixR0SMrO+z qLXcbhhXl0BnU61DWWnKJQxjdJbqDKnTVV70Tcooc4poppR6m/sqVaNZwBbj4J9FQy RmNiOA9iEZjL6torwVmvEhhIqmH5Qi4lm0CGX+Gg= 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.11 264/306] seqlock,lockdep: Fix seqcount_latch_init() Date: Mon, 15 Mar 2021 14:55:27 +0100 Message-Id: <20210315135516.564663602@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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 2f7bb92b4c9e..f61e34fbaaea 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -664,10 +664,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