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 198DBC6FD18 for ; Wed, 19 Apr 2023 07:33:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232358AbjDSHdd (ORCPT ); Wed, 19 Apr 2023 03:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232340AbjDSHdZ (ORCPT ); Wed, 19 Apr 2023 03:33:25 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CFEF9037 for ; Wed, 19 Apr 2023 00:33:23 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1681889601; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CA8pq10uWD0ZpuG1kPN4dWhcbPnN2/F6yKuNqv6psE4=; b=kJzMWQso/GD8LLTRZ1XqUE6PRN50+ccNTLZVm1NgsDwNSm1/+0ok84/g2gg3SUJJcI2rPT /7RlwtX94XCu/+e0r+34k8drtzWODfeabe3aGqlMmVC6HEQ3eNBwmDd6dGxBNXxCFyco1X kLx2/Oj3B7tPQRDZBvApTT0JyAF+SeFBp4icBNHinSBRemErT+UshABDNHL7YfJs9hkpxG fOaC8z1nYIFdRHASeE8KMsn+9bNAt3i1mmEhaa19GeXCScMZ4oGQAawdpl3VHUo0x5gdO5 k7owLA/qcS5+9RymTD1Wzq5q/+HW8EIsFkmAtsvQAQBjKB/iI7DW+ktGNAPzUA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1681889601; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CA8pq10uWD0ZpuG1kPN4dWhcbPnN2/F6yKuNqv6psE4=; b=OVPh9r7jDLIYw14Xh24jGIEvlnPs+2jC+5zWr+xIR/0fznUCzlpR5X1F7gpwDkbhul9Iol h7b6TVrRxCP4ruAA== 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 , Sebastian Andrzej Siewior Subject: Re: [PATCH] posix-cpu-timers: Implement the missing timer_wait_running callback In-Reply-To: References: <87h6tsred7.ffs@tglx> <874jpsqdy1.ffs@tglx> <87lej3twhv.ffs@tglx> <87ile7trv7.ffs@tglx> <87zg764ojw.ffs@tglx> Date: Wed, 19 Apr 2023 09:33:20 +0200 Message-ID: <87cz40498f.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 18 2023 at 18:44, Frederic Weisbecker wrote: > Le Mon, Apr 17, 2023 at 03:37:55PM +0200, Thomas Gleixner a =C3=A9crit : >> struct cpu_timer { >> struct timerqueue_node node; >> @@ -72,6 +74,7 @@ struct cpu_timer { >> struct pid *pid; >> struct list_head elist; >> int firing; >> + struct task_struct *handling; > > I guess it can be made __rcu Indeed.=20 >> if (likely(cpu_firing >=3D 0)) >> cpu_timer_fire(timer); >> + /* See posix_cpu_timer_wait_running() */ >> + WRITE_ONCE(timer->it.cpu.handling, NULL); > > And rcu_assign_pointer() I fix that up on the fly. > Aside the boring details: > > Reviewed-by: Frederic Weisbecker Thanks for going through this!