Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3857076rwb; Tue, 16 Aug 2022 09:52:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR5gWYseiVdLrtf/5ULCLiG5gPYPgGmWh6FA7jQJSj00jRSij3bYhaMflyio3Bsjv09Xb1B2 X-Received: by 2002:a17:903:28c:b0:16f:1ef4:dd1e with SMTP id j12-20020a170903028c00b0016f1ef4dd1emr22641074plr.22.1660668753462; Tue, 16 Aug 2022 09:52:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660668753; cv=none; d=google.com; s=arc-20160816; b=IJtB2npnrzlrO9vdDW82yWqPOtS28Fl39Pp0IG7aqzrYeMZ4u/zh92ZU9i6WowFw3q Y1sZhLgOcT0fZC1zjv1N0Z6GvWeH3IjLX186AAhWhaKzOH16jxhfQjV0CIxQUVWTc6CB CYjfXVjEANuY4qW9p188DkiJGu8hMfa9ky+s28FZbRzLOgQgTSXUpKHH4fZwCw40IHI6 iJkhTM5b6a2h9iKMSH9B3d4C2eldMDbzTh8VKePGCuaEUz4SB38DvX7R2T9E1tTnOUj/ r3VjT4sdhXRYBDld3GpFDqVq/TB5ksw0g32RGL4IIhT545TY+8GdwMxXoFQTkTzd+iJn 7F+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=ljLPeyJn0iV7kitzqLVt7KHdOIXq5hmQNIGV4Rf22NI=; b=cpXvFiKC5+pUy96MO/W0bnKgBlC1ztxfLgtLXQ3Da5koi7f2V6NQlsU5gB3AjcQPcn DHAqgEjZRJbnJDZWuBIlULas1a92NMhLOmzvLCS7XyNtHU6LAmSdAOqNMRgJKZylDuSA Miv+vGqv+ePQ2c2JvSOhDuZVkjWnuqZhqJF3WedXy/COi4OwVzJBMM2IPhSEj291u3nJ T/Mabnb6wP3qDf0VurnHW1BESv1Pwdjk79KtPcCflCwtONuDc/UEE+3ylriY14zy6mhp zZMTdD+xz7Fg2xz6CnG0cn4PUzQfW6gdEFWSm5heJrO7/Md3B5v6q2pOLGl2CPJNVA6w 7gVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jXPLtZvY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e24-20020a631e18000000b004218416eab5si13756425pge.463.2022.08.16.09.52.22; Tue, 16 Aug 2022 09:52:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jXPLtZvY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236337AbiHPQ0v (ORCPT + 99 others); Tue, 16 Aug 2022 12:26:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236307AbiHPQ0r (ORCPT ); Tue, 16 Aug 2022 12:26:47 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 121BA7B2BF; Tue, 16 Aug 2022 09:26:46 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id m2so9681095pls.4; Tue, 16 Aug 2022 09:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc; bh=ljLPeyJn0iV7kitzqLVt7KHdOIXq5hmQNIGV4Rf22NI=; b=jXPLtZvYYGW1UCSKcJdgu1Qq8Dj49ejW9ZdP9CCg/hqwv1bdbEY4wPJD1MAowdz/WT mM3FVSjRlhXKRvZgtCo0kM6Jq41EYfJP4r27COFSuti8y26r/GuQXgSRz27GvtKrMXcT EaJlN9jrbiJVSc0uUm3EkTyblrXhYhEJNRnqvwEXkQ0yovmOnig8MXCGcfFMdtcjXnYj qVCCWsLaNimCmMXYqLQoBwhUlzvgly9FLSDRjVCyhgYtXDzF5qwRpyvIEIf9+AcJyHE4 MG6kHbVv08KVZi1rlJGbVipz/eDBdBNBe8VMw0uoSVbnZN0TczWAdr54yVWeUH/LGbJ7 BrQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc; bh=ljLPeyJn0iV7kitzqLVt7KHdOIXq5hmQNIGV4Rf22NI=; b=X+foym+Wp0us27bMYvqAFj5q2xClqovjfAAtgDgMqGHfxo1cI8EMx4eTarnkjhc9xm XNm1ujFlIw+182kgKW9aNS4ScIqXIApBQPdF9SGsveaP3fop4SNHTlBQ07t2A76CBsrs gzbHc974SE5kEOdAAijQkCh/YCYoQavxuTxM/hAyr+v1pp/RKkYYS2pWtOO82KfACSRJ gtguZkLHvLJNWnMGWrrhXDiMxGJcRuNgVk5r+nJDErlhtTmtWqKVda9bmZjLqBleGpoT +knEDdhMSOr6gQq9fr3ANPOIma8aTbd2WH7Q4G5K1jwxb9q+He3VOYFW/fKhd1fUCLRE Sq/Q== X-Gm-Message-State: ACgBeo026asFPcmkfssQjSrbk3rX5AN6NXWJ8+oiDXWe0vI+uw5CaEwL IZVBTuS4bnxXyAmjyXUKB24= X-Received: by 2002:a17:902:d151:b0:172:9361:2a11 with SMTP id t17-20020a170902d15100b0017293612a11mr1044157plt.148.1660667205379; Tue, 16 Aug 2022 09:26:45 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:7229]) by smtp.gmail.com with ESMTPSA id d2-20020a17090a02c200b001faae55c013sm133834pjd.52.2022.08.16.09.26.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Aug 2022 09:26:44 -0700 (PDT) Sender: Tejun Heo Date: Tue, 16 Aug 2022 06:26:43 -1000 From: Tejun Heo To: Herbert Xu Cc: Linus Torvalds , marcan@marcan.st, will@kernel.org, peterz@infradead.org, jirislaby@kernel.org, maz@kernel.org, mark.rutland@arm.com, boqun.feng@gmail.com, catalin.marinas@arm.com, oneukum@suse.com, roman.penyaev@profitbricks.com, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] workqueue: Fix memory ordering race in queue_work*() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Tue, Aug 16, 2022 at 12:15:38PM +0800, Herbert Xu wrote: > Tejun Heo wrote: > > > > Oh, tricky one and yeah you're absolutely right that it makes no sense to > > not guarantee barrier semantics when already pending. I didn't even know > > test_and_set_bit() wasn't a barrier when it failed. Thanks a lot for hunting > > down and fixing this. Applied to wq/for-6.0-fixes. > > Please revert this as test_and_set_bit was always supposed to be > a full memory barrier. This is an arch bug. Alright, reverting. Thanks. -- tejun