Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1165683rwl; Fri, 7 Apr 2023 10:56:04 -0700 (PDT) X-Google-Smtp-Source: AKy350Yak5pxyQIoco0+CuOYC3oAx3t34OnsCvW/n5dWmSCyAixZE5Vfwc4TRZn3EvQsPmwd5Ikf X-Received: by 2002:a17:903:1249:b0:1a1:e237:5f0 with SMTP id u9-20020a170903124900b001a1e23705f0mr4070945plh.58.1680890164167; Fri, 07 Apr 2023 10:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680890164; cv=none; d=google.com; s=arc-20160816; b=TIeY+OGPRn2JAIWYGpNRcHHcVdeFGNGmNWWLWp3l4Sc10EXShdTQB6GPkDkN9SENgy 9z/60VP6s/LVFwznxo4V/Nh7V5HGEGz5vH82GKydtP6FY+t3fnoXqHzUBzIrrDdmIShX 2Kyc68qJkt+YiNjcTVqy/qkzKjV43hDWQG0cfMLL0+nuDNe3+iywFOrGSHTZA+R40FkV sM1QyX5V0e2jY6W0TNgU3+SjtXvVAApXhROZc8jmY0ZWu09Yr59b8lCM2ET9+O34TKzq K1Xc/2RJ9oVJ47xEPEpHHT7SsTUTUA32gOXXGc8vGviokgyGnJmjB68kjF0mfwLCyh1Y DMVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=c0k1aH3SN6RIb4G5Py8osu0QB7lf5RDZkIrsmh2XPXg=; b=0bJl0w5cAKPhhChD8JWl+uyLLx8E7ULRq1kOo8jc22VeB7noj17MIpSZtoJ4bxm/no th776i8UraCQMlxLbiXJpeCgOJip8hPDkBPW4GYFhWq/QvNk4cJr5yKLo8O5pvET0prA AyiOAqUyXS/0PaFo0cBn2DIlQjLMEVGgMvjPxePtHsra+AR6gZ6RBv1adcLHgmr4L7Zf Px3S54JyauxU5Zy1vRf8lovgMP9lSPunnQeZAsNaATQZOYB9x5m7O+Ywwa4f1LOERfft WSoa4b2gN5bs0V6natlSNOG7I1UYalHO1m0S3UAQ8v9Gtl8hH89Cqtw+5GqkUEAOZdzM Jy+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iAmuhZZ0; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a170903018a00b001a24efe1f22si4562120plg.64.2023.04.07.10.55.52; Fri, 07 Apr 2023 10:56:04 -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=@linutronix.de header.s=2020 header.b=iAmuhZZ0; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229853AbjDGRrr (ORCPT + 99 others); Fri, 7 Apr 2023 13:47:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbjDGRro (ORCPT ); Fri, 7 Apr 2023 13:47:44 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD752B469 for ; Fri, 7 Apr 2023 10:47:42 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1680889660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c0k1aH3SN6RIb4G5Py8osu0QB7lf5RDZkIrsmh2XPXg=; b=iAmuhZZ0LvoCUFe/y7VuyMmKTHOxNRXP81+ZpXXYxYOXLkFMPbcnFvh7F2UbujK0An98u5 2M+LK5EVTyFFQbhtXEZxTQzkIgh3sNK8CnEfikbatxJxpwZbfp0NlyADCEefzCgPCrRIma Xz+X+IrgSxCIAZJuVmjV4NDENXZU7XXUferzXMbIsaFylvlYRXvFyf/mjrRI8uSCcolblX 3FnEOlO639h4tg1VufBUkpowDxVm7AHbwNxgng0EqSciBa9n3ipWmBPxJ9GYaeZvHajWVi ZpZRe/Tf5OILFyST4dto9OOys4KvVgkea59T8efmU8nI0oH8m5use85+OFIN4w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1680889660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c0k1aH3SN6RIb4G5Py8osu0QB7lf5RDZkIrsmh2XPXg=; b=xqhRk2V4R4Wghzp494BP4lRPr/lYX5QPjwfmGgNr46DKJYKkZjkH6Zf4Y8OGo+AfGQKDu9 pv9jIpnGq72RHkBw== To: Frederic Weisbecker 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 In-Reply-To: References: <87h6tsred7.ffs@tglx> <874jpsqdy1.ffs@tglx> Date: Fri, 07 Apr 2023 19:47:40 +0200 Message-ID: <87lej3twhv.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.5 required=5.0 tests=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 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. Thanks, tglx