From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C1471DA113; Tue, 17 Dec 2024 08:28:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734424102; cv=none; b=LcrfOloZLbNK1zVwmTbY45+CtDNX8ezS9e2K7y0H2xXlngyPat0gFXpeP+1lwnxuNLbtfFFfqvuB9mtJiSQ2GRbwnbKitopDVyA+u6YQcb1UJB8jqh2MbXL2N6HoZZy99NuzztIJ3PBN1GvkEYN9y30xV1bseBKC7Ys1K/1IJ0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734424102; c=relaxed/simple; bh=SPmFEcKXpyPmdcnzipJn8Q/yWwafSU6dklD5P69XHH0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=U2R49dFbuOMpmUtgK+grNr3JllaOqMoQRrdUZVsv0KPFvpcMf+uAbe6v1eyYxOukF5rqAjZtYlB8EiorVNq4dVcj+vO/qRML0m6djMaixBgouCelskqtPJAFiM1YsHR6WMVLN7XBRfL596CX1Wje1+W4d2dVaC+ged/Aqe6DIeQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Q4OeeuwG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Q4OeeuwG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94E06C4CED3; Tue, 17 Dec 2024 08:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734424102; bh=SPmFEcKXpyPmdcnzipJn8Q/yWwafSU6dklD5P69XHH0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q4OeeuwGPzt5YMsCKvfDS+YbGt4LObn0W/QRHrkohzHbbyKstrMv0Czhyia2s7Xea nKjrnsN0lw1pC/VQOoNq5+iaPsHB0VwKRcOjaNnKoBd+yJgGnfWqMLVIvkLzL/JyNZ Cy1WASjCDMZVwIEd4pP1XwwC4GfhtLDYk/ijqRUg= Date: Tue, 17 Dec 2024 09:28:18 +0100 From: Greg Kroah-Hartman To: Z qiang Cc: Conor Dooley , Xiangyu Chen , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, torvalds@linux-foundation.org, stable@vger.kernel.org, lwn@lwn.net, jslaby@suse.cz, rcu Subject: Re: Linux 6.1.120 Message-ID: <2024121703-bobbed-paced-99a5@gregkh> References: <2024121411-multiple-activist-51a1@gregkh> <20241216-comic-handling-3bcf108cc465@wendy> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Dec 17, 2024 at 04:11:21PM +0800, Z qiang wrote: > > > > On Sat, Dec 14, 2024 at 09:53:13PM +0100, Greg Kroah-Hartman wrote: > > > I'm announcing the release of the 6.1.120 kernel. > > > > > > All users of the 6.1 kernel series must upgrade. > > > > > > The updated 6.1.y git tree can be found at: > > > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y > > > and can be browsed at the normal kernel.org git web browser: > > > https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary > > > > > > thanks, > > > > > > greg k-h > > > > > > ------------ > > > > > Zqiang (1): > > > rcu-tasks: Fix access non-existent percpu rtpcp variable in rcu_tasks_need_gpcb() > > > > I was AFK last week so I missed reporting this, but on riscv this patch > > causes: > > [ 0.145463] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274 > > [ 0.155273] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 1, name: swapper/0 > > [ 0.164160] preempt_count: 1, expected: 0 > > [ 0.168716] RCU nest depth: 0, expected: 0 > > [ 0.173370] 1 lock held by swapper/0/1: > > [ 0.177726] #0: ffffffff81494d78 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x2e/0x374 > > [ 0.188768] irq event stamp: 718 > > [ 0.192439] hardirqs last enabled at (717): [] _raw_spin_unlock_irqrestore+0x34/0x5e > > [ 0.203098] hardirqs last disabled at (718): [] _raw_spin_lock_irqsave+0x24/0x60 > > [ 0.213254] softirqs last enabled at (0): [] copy_process+0x50c/0xdac > > [ 0.222445] softirqs last disabled at (0): [<0000000000000000>] 0x0 > > [ 0.229551] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.119-00350-g224fd631c41b #1 > > [ 0.238330] Hardware name: Microchip PolarFire-SoC Icicle Kit (DT) > > [ 0.245329] Call Trace: > > [ 0.248113] [] show_stack+0x2c/0x38 > > [ 0.253868] [] dump_stack_lvl+0x5e/0x80 > > [ 0.260022] [] dump_stack+0x14/0x20 > > [ 0.265768] [] __might_resched+0x200/0x20a > > [ 0.272217] [] __might_sleep+0x3c/0x68 > > [ 0.278258] [] __kmem_cache_alloc_node+0x64/0x240 > > [ 0.285385] [] __kmalloc+0xc0/0x180 > > [ 0.291140] [] cblist_init_generic+0x84/0x374 > > [ 0.297857] [] rcu_spawn_tasks_kthread+0x1c/0x72 > > [ 0.304888] [] rcu_init_tasks_generic+0x20/0x12e > > [ 0.311902] [] kernel_init_freeable+0x56/0xa8 > > [ 0.318638] [] kernel_init+0x1a/0x18e > > [ 0.324574] [] ret_from_exception+0x0/0x1a > > > > Hello, Xiangyu > > For v6.1.x kernels, the cblist_init_generic() is invoke in init task context, > rtp->rtpcp_array is allocated use GFP_KERENL and in the critical section > holding rcu_tasks.cbs_gbl_lock spinlock. so might_resched() trigger warnings. > You should perform the operation of allocating rtpcp_array memory outside > the spinlock. > Are you willing to resend the patch? So should I revert this, or do you have a fixup patch somewhere? confused, greg k-h