Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32378540rwd; Fri, 7 Jul 2023 12:56:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlEJejvZ6fgN4UgUNGWje56d5bqiMAzjlVZFkAV40QECKBM/+hpJ8Un1m6+1kAP/N4aSdOE0 X-Received: by 2002:a9d:4b16:0:b0:6b1:5f4a:f52d with SMTP id q22-20020a9d4b16000000b006b15f4af52dmr6362240otf.22.1688759816870; Fri, 07 Jul 2023 12:56:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688759816; cv=none; d=google.com; s=arc-20160816; b=sobft9j2kmasCk9SvHTg+slAM9hNXH2Zev+r6kw3p7uqe8xbzJYc1otkQaP/0sSrwi i0AruiI826nibbvmsxzGrb5y2AxcYa3RW1lYNwMPKix1uCPBsLrt3ZD3XGmTFCG5A97i L1MlPpreHrlZdjEWLcZuIbLBgdCPSFgAKdI6MID9uZhlY0gOdqnizt3FfzCCQhT8eCce 5Co9Zai88HEm6qn6jxOk4dsXfJmDo8NSzcTSZ3iXdvCbAod1o1z4XkrEAVlQMf1l+Sdb 7gqvfOW5zbcNzpCGUK/q/NVWpM6155fnPkH20FGBWWae4FJQUJLLbyVxQTRfK0AXkx9z fzow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:cc:references:message-id:date :subject:mime-version:from:content-transfer-encoding:dkim-signature; bh=u+r3jktYVc7BJ0t7RIvh+DPkaX+O9am5ilz167T+8Rw=; fh=bJGmbFs5wG3IMfQ0AXQr4nFCgmXliYFBnF7pX6MpOv4=; b=lsQDmohSXQgKvxx5g/HTVXQyfZZmZpmVr0voC8rruV9EkMMPhTv22QD+5vjCvtsd9q 89RttkqGKeOJoph0Bv3E5ejYwvNh+BPEi+mjUFNG4Nv3yVtjZj60DpNqHGhapDMmNebQ QmS8qBSIaxCk8HaH9Uhe+PHcpULe/iNZuJ+4GSEnzXTOb+m+kvOCeYIAKRggdXAQpOCI Y3LkLkB244ww2otg+4uAZF8jwMXHyWCvgKObLrMNfkrtaFPQ68dOdPYlbbGGWZFXFIWT JhKGzQwJLLxjPI7z4aJbPNa8F6jIv8sO3KCp0i+MJ9fgo/yx8KUhWFrkGrCQPHUk+0zu MSkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=VksFiZLU; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a63e444000000b00553828d0361si4451192pgk.588.2023.07.07.12.56.42; Fri, 07 Jul 2023 12:56:56 -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=@joelfernandes.org header.s=google header.b=VksFiZLU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229822AbjGGT3o (ORCPT + 99 others); Fri, 7 Jul 2023 15:29:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233053AbjGGT1n (ORCPT ); Fri, 7 Jul 2023 15:27:43 -0400 Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CABF726AB for ; Fri, 7 Jul 2023 12:25:10 -0700 (PDT) Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-76754b9eac0so208552685a.0 for ; Fri, 07 Jul 2023 12:25:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; t=1688757910; x=1691349910; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=u+r3jktYVc7BJ0t7RIvh+DPkaX+O9am5ilz167T+8Rw=; b=VksFiZLUMkRUpHwPfLwxO749mxs+riqT1fz/v77lK8YECz2jLXyeBn36G1BTzde71m inTJDBVSJy+4wRdAg9ThlFwOCDK+wsUjCHVejqJ3AWaJ4XD6jA/KEb2XIgKfEoQIKcn3 hFPQMjfsrUT00FQ7KEPSGGVRmabgmg1Xq6ypk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688757910; x=1691349910; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u+r3jktYVc7BJ0t7RIvh+DPkaX+O9am5ilz167T+8Rw=; b=dAHRA+GXGktJMBFf61UNXi+UMSdXYUzZEqXg8ALPmB2OefsewunugmIhEV0lAGQWJ4 XdzcGR3eX8yBGOzNDBB+/qqJxOi45K5HrWmF5weRcpTgI91TMHjlxABB6gD3BDM3xB+q cGKzZW+3sCwSTvRrlvory5+KSSeM93ZSPzASiaXnIcRXgLmpwCNygTIzManzXtvdIzQD t1m5pq2YxyYSbu8w9xpmEYlyYqKjZRLhvsyTRyrKAJ6u3yqdwp612bn+dj345j4MJiDA IJZI9C/a3x2LOe6fWf2lnhKUVvuEJcwTDH+yxbyIgUfi+f4nZ5K/+6kodfHXMcIpdnum p2Yg== X-Gm-Message-State: ABy/qLZ5ITO715HT8nV2JIv4fXvrIWEr2/rchXU9tzQZfvabg1gv83KC 6SpEu/n7qpv6k2EUhhTRvhqFZg== X-Received: by 2002:a05:620a:28c4:b0:767:3b7d:687c with SMTP id l4-20020a05620a28c400b007673b7d687cmr7479809qkp.15.1688757909831; Fri, 07 Jul 2023 12:25:09 -0700 (PDT) Received: from smtpclient.apple ([45.85.144.223]) by smtp.gmail.com with ESMTPSA id ou30-20020a05620a621e00b00754b7ee6922sm2131293qkn.9.2023.07.07.12.25.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jul 2023 12:25:08 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Joel Fernandes Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] refscale: Fix use of uninitalized wait_queue_head_t Date: Fri, 7 Jul 2023 15:24:58 -0400 Message-Id: <140FCD95-052F-4DA9-AA5A-374D417490A9@joelfernandes.org> References: Cc: Davidlohr Bueso , "Paul E. McKenney" , Josh Triplett , Frederic Weisbecker , Neeraj Upadhyay , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Boqun Feng , Zqiang , rcu@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: To: Waiman Long X-Mailer: iPhone Mail (20B101) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Jul 7, 2023, at 10:56 AM, Waiman Long wrote: >=20 > =EF=BB=BFOn 7/7/23 10:07, Davidlohr Bueso wrote: >>> On Thu, 06 Jul 2023, Waiman Long wrote: >>>=20 >>> It was found that running the refscale test might sometimes crash the >>> kernel with the following error: >>>=20 >>> [ 8569.952896] BUG: unable to handle page fault for address: fffffffffff= fffe8 >>> [ 8569.952900] #PF: supervisor read access in kernel mode >>> [ 8569.952902] #PF: error_code(0x0000) - not-present page >>> [ 8569.952904] PGD c4b048067 P4D c4b049067 PUD c4b04b067 PMD 0 >>> [ 8569.952910] Oops: 0000 [#1] PREEMPT_RT SMP NOPTI >>> [ 8569.952916] Hardware name: Dell Inc. PowerEdge R750/0WMWCR, BIOS 1.2.= 4 05/28/2021 >>> [ 8569.952917] RIP: 0010:prepare_to_wait_event+0x101/0x190 >>> : >>> [ 8569.952940] Call Trace: >>> [ 8569.952941] >>> [ 8569.952944] ref_scale_reader+0x380/0x4a0 [refscale] >>> [ 8569.952959] kthread+0x10e/0x130 >>> [ 8569.952966] ret_from_fork+0x1f/0x30 >>> [ 8569.952973] >>>=20 >>> This is likely caused by the fact that init_waitqueue_head() is called >>> after the ref_scale_reader kthread is created. So the kthread may try >>> to use the waitqueue head before it is properly initialized. Fix this >>> by initializing the waitqueue head first before kthread creation. >>>=20 >>> Fixes: 653ed64b01dc ("refperf: Add a test to measure performance of read= -side synchronization") >>> Signed-off-by: Waiman Long >>=20 >> Strange this wasn't reported sooner. >=20 > Red Hat does have a pretty large QE organization that run all sort of test= s include this one pretty frequently. The race window is pretty small, but t= hey did hit this once in a while. Having worked on this test initially, I am happy to hear that Redhat runs th= is test! Thanks for fixing this issue. Acked-by: Joel Fernandes (Google) -Joel >=20 > Cheers, > Longman >=20