From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 C952B4499A4 for ; Mon, 13 Jul 2026 19:48:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783972141; cv=none; b=T85yjmAppHsqpCDL9vHvdxPvZ0Vf7eHUJgSyFiO4hGqXvDghSuxHJ5S8fq3WWOXXKCkP0gKnnPXQHzypm54dCK/15zdcL5rE9C1u61M+zHVut2h0d4S2qhjGgg3GwWy4QyOTRidldWABGGnFSGuNP1M0hR4t4R0Valu70SlivMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783972141; c=relaxed/simple; bh=cl53LS9VyjfaeNhcfJF8+oJIveH4l0kNujEm4a/TVnc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i242l7Fi1YkGFeYFT0ME8hyV2dat4bAfiI2ZsSi+hU15hycu4VaArGLpP+/mm7RAYSDZaPzds3ngJBR2EaHxZ6yGPK+BgaMOZGSGXR+yI42gDYc4pVqu8vrhTpX6rvjzRK8Za3BNj1blDzLGFWnpg2orhX/CqXqFfBDeqGxsYbM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=iWl6whZj; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iWl6whZj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783972138; 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=oJ+EzR6/4eyBzTaIbA+IBRWvu+AJlHHcGpx6AmbYvOM=; b=iWl6whZjTQnTDrw09SVi3UfXwP4Qu4DdmpCUYuQO6vpMzCLZ1Clz9LQ9crIDFk3m7ABOme GCk/D/X75ku7c3GP7vyUsw8y0ZJvU7c+rfhv9WkPd/qiWl1essax9j1780wAYFaxtqRwLw sW1Tic3vfUspaUkM47ACDWRwcicUoHM= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-261-o9cP-YHWNDCVpkX7VZrznw-1; Mon, 13 Jul 2026 15:48:53 -0400 X-MC-Unique: o9cP-YHWNDCVpkX7VZrznw-1 X-Mimecast-MFC-AGG-ID: o9cP-YHWNDCVpkX7VZrznw_1783972131 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 832761955D96; Mon, 13 Jul 2026 19:48:50 +0000 (UTC) Received: from fedora (unknown [10.44.49.164]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 86B1130002DA; Mon, 13 Jul 2026 19:48:45 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 13 Jul 2026 21:48:50 +0200 (CEST) Date: Mon, 13 Jul 2026 21:48:43 +0200 From: Oleg Nesterov To: "Eric W. Biederman" Cc: Bradley Morgan , akpm@linux-foundation.org, brauner@kernel.org, peterz@infradead.org, tglx@kernel.org, npiggin@gmail.com, pasha.tatashin@soleen.com, kees@kernel.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+8fdf0d8e10bdde1c2e88@syzkaller.appspotmail.com Subject: Re: [PATCH] reboot: enable IRQs before do_exit in the halt and power off fallback Message-ID: References: <20260712125300.31501-1-include@grrlz.net> <87tsq3vbtf.fsf@email.froward.int.ebiederm.org> Precedence: bulk X-Mailing-List: linux-kernel@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: <87tsq3vbtf.fsf@email.froward.int.ebiederm.org> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 On 07/12, Eric W. Biederman wrote: > > Bradley Morgan writes: > > > The reboot syscall calls do_exit(0) after kernel_halt() or > > kernel_power_off(). Those are expected to stop the machine and not > > return. When they do return (no PM info, power off failed), the > > shutdown path has already disabled interrupts: native_machine_shutdown() > > calls local_irq_disable() on x86, and do_exit() then hits its > > WARN_ON(irqs_disabled()) at kernel/exit.c:930. > > > > do_exit only warns by design; make_task_dead() is the path that fixes > > the IRQs disabled state (commit 001c28e57187 ("exit: Detect and fix irq > > disabled state in oops")). The reboot fallback is not an oops and wants > > a clean do_exit, so enable IRQs at the two call sites instead, matching > > the make_task_dead pattern. > > I think this is fixing symptoms not the actual cause. > > How does kernel_halt or kernel_power_off manage to return? Agreed... and this was already reported twice at least. See https://lore.kernel.org/all/20250403-exit-v1-1-8e9266bfc4b7@debian.org/ https://lore.kernel.org/all/20250410143937.1829272-1-Tze-nan.Wu@mediatek.com/ Oleg.