Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1211470rwl; Fri, 7 Apr 2023 11:42:13 -0700 (PDT) X-Google-Smtp-Source: AKy350ZZ+rETOU+FwIB9TvLTx0NmyvvWYw2Xyb5Cx8hfGtfJioa8FGT8E0zGec4SaJxEwVeR17JD X-Received: by 2002:a05:6402:12:b0:4fb:5fe1:bc3b with SMTP id d18-20020a056402001200b004fb5fe1bc3bmr2161332edu.0.1680892933005; Fri, 07 Apr 2023 11:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680892932; cv=none; d=google.com; s=arc-20160816; b=WdXaL+N+6kVzESei5feLucxXLqvR4n7o4qUel5RSPUNHx44x28qJQ9+XOXPFu8rxAd FQW0g4uBBqmmyKFaV/yHdlTMd08pYQQlhC1zz8gH5wpMasi/o86ItKUMfxi76sb8WBOu RTfkcEbM6xzqy2Qy2W+308v+8KjCQMq2miGh0A8nv2060rpfy5F0QovHDe+Jv62RfXOK /8FaIAm8DVtdt92WydF253KYRKX9LUNg6/G18epGXL7vP/wKoQ43jHYsg96wZnWvs6U3 y0YAKIIpPsgEvvHuyOVxhZDBCCrztLvaye1G9o8bI87sZfWeDDWDIF+vsu6E0urW9Pzw aVgg== 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:dkim-signature; bh=aOaPC3gND1mdqZ7dWlEu15XPT8sqsIoP+fBLAEm4Gjc=; b=TNrjL9q85eB4IE0rOhKrKl+h+/3RxZXHPvV7FJ/hQMXLmYM6AssivF+X+ffP2+eTKP +2W3JQg4pLMrzSKtowreTTJIo6iXMCxZoRttrgiyj3M99fwkqZe9oDiX5+BE8iPGZ/Aw dAyiV/p1l46Es1kR7fsPAP7PJUjGtWXrzfQeNxA05llqZlXvUhjw4kFugcZVallCNKSP u6mZuOn+fCmPCBdy8543m0+8Ffjg+0weY1Zxi1Tkq5X4yoMvLnKeOj13VeIX6pdvdxvF 7natjpqwJfdI/0Y1Gk7adxr5D2IuwllZ8ekp7eLaBL/D3XxTNvuNwqvkt0D4rWHE+USo N9EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d0a4D1bH; 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 t19-20020aa7d713000000b00501d3982cd2si3902771edq.517.2023.04.07.11.41.46; Fri, 07 Apr 2023 11:42:12 -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=@kernel.org header.s=k20201202 header.b=d0a4D1bH; 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 S230060AbjDGSgV (ORCPT + 99 others); Fri, 7 Apr 2023 14:36:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbjDGSgU (ORCPT ); Fri, 7 Apr 2023 14:36:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97DD7A24F for ; Fri, 7 Apr 2023 11:36:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 333826539E for ; Fri, 7 Apr 2023 18:36:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C7FBC433EF; Fri, 7 Apr 2023 18:36:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680892578; bh=D2xQwPruUZnmP/3BgSjgMwUM09Rl4bUBfKl16ynyjks=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d0a4D1bH+MV78nNRrY1x+Fqw2CMHB48rcCHbl3e0eGSYwPXhUH/w5IvYHJZgSmAYk QDFb1fWOYTmrFDGCEe5bXkimjROMELPv2udchVH4GDaed60FLDeNAjiz7AbdknhxXZ 0myneUo+LZHvy/U/qe+RJgan7GZnwYncmPkOd3em2b/FiP2PVLgtD6DvqR7Co9mfoP wQAsIbHJc9mzk3/d8RHxdAIkf5JtZZG5fRSw/pahePWBqWZeg5IADVai+oMxNZSesC hdk+CDxCZwq3Q/TIzdCa6FM6mCX6J1P4BQJWqM5N6bOBhcroqrp8bADDZ+iIymB+rY mctETlCbVMmuA== Date: Fri, 7 Apr 2023 20:36:15 +0200 From: Frederic Weisbecker To: Thomas Gleixner Cc: Marco Elver , syzbot , linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, Anna-Maria Behnsen , Jacob Keller , "Paul E. McKenney" , Peter Zijlstra Subject: Re: WARNING in timer_wait_running Message-ID: References: <87h6tsred7.ffs@tglx> <874jpsqdy1.ffs@tglx> <87lej3twhv.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lej3twhv.ffs@tglx> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 On Fri, Apr 07, 2023 at 07:47:40PM +0200, Thomas Gleixner wrote: > On Fri, Apr 07 2023 at 13:50, Frederic Weisbecker wrote: > > On Fri, Apr 07, 2023 at 10:44:22AM +0200, Thomas Gleixner wrote: > >> Now memory came back. The problem with posix CPU timers is that it is > >> not really known to the other side which task is actually doing the > >> expiry. For process wide timers this could be any task in the process. > >> > >> For hrtimers this works because the expiring context is known. > > > > So if posix_cpu_timer_del() were to clear ctmr->pid to NULL and then > > delay put_pid() with RCU, we could retrieve that information without > > holding the timer lock (with appropriate RCU accesses all around). > > No, you can't. This only gives you the process, but the expiry might run > on any task of that. To make that work you need a mutex in sighand. Duh right missed that. Ok will try.