From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1AC1C76196 for ; Fri, 7 Apr 2023 18:36:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230173AbjDGSgW (ORCPT ); Fri, 7 Apr 2023 14:36:22 -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> 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.