Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp443066lqp; Sat, 13 Apr 2024 04:10:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtp1wKhfsOIQOzjoknzfJC5XqAsvkXHEe/AyWIr98OZEbHRy2aaoryF7kXLalbvbiCIbsTVAMB0oRQX5Gjwl5vLYkM8YUxciwrURo5Mw== X-Google-Smtp-Source: AGHT+IEPAHtNkkS7ghqfcRC3z7Z5lV3LBjaPiv28vgCY2MZAESc2U2/xHak5yv/MUDcU9GfxpLwi X-Received: by 2002:a05:6214:1304:b0:69b:6ca3:e88b with SMTP id pn4-20020a056214130400b0069b6ca3e88bmr244201qvb.47.1713006633119; Sat, 13 Apr 2024 04:10:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713006633; cv=pass; d=google.com; s=arc-20160816; b=aq8ISJP2uBIMaOkCgnzQ9nTMpKkYH6gnTaFX1puGt/34j3SlpnjOdpqxQRiM/j7xxs szmhcs73fxo38/4sninh0y9Gh1nS19pL82g85+7KJaOWpHPrvqF7nhdQEaHNqkEq1Pw1 URxQjlepHXCy9PGqIM0NJxDUbjHLG+OZjskpmJnvhiIF4IZsB5yeH5rqP8WXd5cm5b9Z SHz4MydZ/LHrggABn7+82Xh0fru0b9/wrFmc1LYuwQmz8XqpQuHfuyzcqzST1SrRN67G XJoLARn7uqsR3WV1M7XGSTMTc+UZN763d8jAjSFrrBKQgIw2xxi1wzwuWRfzfoIErfSL alDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=Ud3R6yDl9VRbE7siqBnptDz2G1hQfqVZPP/3nt2wP+w=; fh=R/oDrYJaP7QqcFqdk0j3rEGgDQANKlgw7fZ22LxJ9NU=; b=jJkI85XYnBqNpvlt2Wio9clxiWlujAcRvZ5+VXi8D4Okyv4eRmS32iUaz5a7VNfdN6 SUH4kiczSxXm2z+8WCQAFqq/ZPtwS67z9CpsQXMGGk54hFLxPWHQhsR2Sjdsxx0qMEfB 1A6TZgOaJg16rYqUQ5gsX5MSYm+WSTiqkpGKRTEz0dcDuaOaK7wF5hMdI4CDTP48tVlO bEVtg2zosavLnf4GngiwG2GVD6uoKwhSful8k+6aiHIuSF1oFhc8Zg0DowuFNzvGGG9n kxYO5xsBG7zY1FooRG7KORgjc8sqefzDVML3YN4GN3ZUmvBIU0zyI9jG1JBiY0zctReu s7eA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PmYA3c5+; dkim=neutral (no key) header.i=@linutronix.de; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-143703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r11-20020a0ce28b000000b0069b5e5822eesi2607933qvl.433.2024.04.13.04.10.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 04:10:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PmYA3c5+; dkim=neutral (no key) header.i=@linutronix.de; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-143703-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143703-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D39B31C2123B for ; Sat, 13 Apr 2024 11:10:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E4233E462; Sat, 13 Apr 2024 11:10:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PmYA3c5+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zVWQo0F5" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 A1EDD1DFD0 for ; Sat, 13 Apr 2024 11:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713006626; cv=none; b=h+eWIvfVFRzqM6bFZlGUoCJ37g+ncn90I7xjT80rflgFMmwUorrq3apdpQUCwrEVhIZft0E5+zjoPXpk/d4zbCFomKMQAgEabrfginORpKSlkMXnB3mWEPUdq/CiAx/OoOHce3Nh5XVk0Ymozs6Pz/JJIvrwO+stSI33LWhC8iU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713006626; c=relaxed/simple; bh=AK8PSoFQHCoOJm4ED6t2eH2/Y+s506tQ0RjjxcOPYss=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=isiODrXUfU01HRQz+MeM9bGraSQWOKyxp9dS79tKmmqj9HmH2JrJMpnbMTvudNp8JLGoq5ak7XhYWUX1K5K3Xtvny8AGgs8lsZE0930si5k5XApXltwPusKzyCz8uoLcNpHjI8hVvlmUiyGzcDduacNmqm8l4HQRGTf0V/ZhhNg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=PmYA3c5+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=zVWQo0F5; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1713006616; 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=Ud3R6yDl9VRbE7siqBnptDz2G1hQfqVZPP/3nt2wP+w=; b=PmYA3c5+62jlKLwDbz4DIE0xTP+huhpo2hiHvJ/XSwRKrifPsClIptWaCctZlHyD6e0ohL DC0Tau6a7G5n4ENAcOBG0n6oUpA1uytTHFBngfAvmU4OQ8uRH4n/KPchkbwMsD3+6gt+AN fuYRGYoAeWTI7TUZMrZshkF5eOa5oc4SMU3kMwulOjXM7tJFKaUkAOpY/wVg4Y1hh6PkYm Sq07E0IBN+1ce/wtcuNKsK4QIkkl6c5bf6ozDVtxV6ueMJCyVDDGPTyNB8SPYfBFmwoorT mUA2pIC6bsZ9awqepqMMEpOg5nK7UmekgCP7C2wFsisHTtC3I5vlWNHVRxwVzw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1713006616; 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=Ud3R6yDl9VRbE7siqBnptDz2G1hQfqVZPP/3nt2wP+w=; b=zVWQo0F5mq2VVw2SSbud1xpcs6kSc6YY1Xyl5zi2X96xxL0xoeqJ6s3uB4ES3WuicT3i+e hfVlss9IwHxOx6Bg== To: syzbot , linux-kernel@vger.kernel.org Cc: lizhi.xu@windriver.com, Peter Zijlstra Subject: Re: [syzbot] [syzbot] [kernel?] inconsistent lock state in sock_hash_delete_elem In-Reply-To: <00000000000045aaf30615035889@google.com> References: <00000000000045aaf30615035889@google.com> Date: Sat, 13 Apr 2024 13:10:16 +0200 Message-ID: <8734rpzffr.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Sun, Mar 31 2024 at 23:46, syzbot wrote: > For archival purposes, forwarding an incoming command email to > linux-kernel@vger.kernel.org. > > *** > > Subject: [syzbot] [kernel?] inconsistent lock state in sock_hash_delete_elem > Author: lizhi.xu@windriver.com > > #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git fe46a7dd189e > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index d44efa0d0611..07a3c1d2c2d8 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -5676,7 +5676,7 @@ void scheduler_tick(void) > > sched_clock_tick(); > > - rq_lock(rq, &rf); > + rq_lock_irqsave(rq, &rf); That's just wrong. scheduler_tick() is invoked from hard interrupt context with interrupts disabled. > update_rq_clock(rq); > thermal_pressure = arch_scale_thermal_pressure(cpu_of(rq)); > @@ -5688,7 +5688,7 @@ void scheduler_tick(void) > sched_core_tick(rq); > task_tick_mm_cid(rq, curr); > > - rq_unlock(rq, &rf); > + rq_unlock_irqrestore(rq, &rf); > > if (sched_feat(LATENCY_WARN) && resched_latency) > resched_latency_warn(cpu, resched_latency);