Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp501670lqc; Fri, 8 Mar 2024 04:10:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVUC0FpcVKj/kMPD4I7LWwJVt2HEFINo02MrfnxySh9+stI9v8ZQxeVoxMbMDMWbQRTV1o+glCxqgJRMmREIbsxRBu8byYu0uft6kFRSQ== X-Google-Smtp-Source: AGHT+IHu7ky/aBCbr1UyqRoKjwhKnaTBQJpmQRO2Wx2TgD2P55OZCE+MLDxlB6vd3ZmqKGCrL1zS X-Received: by 2002:a17:90b:3658:b0:29b:9f2c:2833 with SMTP id nh24-20020a17090b365800b0029b9f2c2833mr3195490pjb.43.1709899804232; Fri, 08 Mar 2024 04:10:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709899804; cv=pass; d=google.com; s=arc-20160816; b=z4RmRIin52un2kD0eeyZyOJS0iB8QaNolZkjlej1Y3+wIcSQJzYJrv+9/tCM4c/d3u qsmESJI8aex3u0UXoLLWRn4LuxLC5vV1lpSsE9waal4/69K6ZlBDflZwCd7IAV3D1aNo +7zLGFqHzp5mg/Bs6pJXj4sTvrD1fpj+oQDxGHg+d5yAJmApHDOrqqLfAzXlaiNBE3Ir nNE07OmYx0RuXI1jGAB0Wh4I/W3P9YznBlKAKdmfFvOGkeRgPmEI+vMhnzTQiqiBhFWM Psl7PmTAxsFvdT+Ai2taBoLeRyi/5CioxPp1Ni0HZ4+wkLVkf8VE3jwvEtI7LHgPfmV3 JtPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=2ZlErBB6KJk2Vv9thMRJ5PkZTUcyeVlNQCdjMe57hMc=; fh=V0Dbtd5eY0wrmftDFdXL1b8dcwfburptNMq6hLjQYro=; b=YPGqEo8s0bpGB03kb4SlZMU3dcJ1KVws3qAvUHHqaVzgzti1FHWz80pBnCKO12IGON nbExBdgHO1m02nRDnRA22KNiHRw1a8zSvYCZq44tDYsVHok0trOkqAxhZvrMpZhoh1Kw tVBM2nztPyDsGaHtlga52Cvg5kxlwkwMjjS5gyzysHT4wtkg7m9nGXFlJ6xgWlQKFaEI P5c3GJfzHP9SGFgBPlo987fT9lYCz4m7lhd20/IaGQeBSUZzhuX+1FzvH99Ns/fjQ0bg BsS4NRTHUmI9zH7nAoPeWEP3KaMXOm7MycyYp/6t0ZqwJh1DwWXbEHuANF8fXWtyUqa4 JYwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-96977-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96977-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id on12-20020a17090b1d0c00b0029babd39a70si1771433pjb.110.2024.03.08.04.10.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 04:10:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96977-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-96977-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96977-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E58AB2834D0 for ; Fri, 8 Mar 2024 12:10:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A16756755; Fri, 8 Mar 2024 12:09:52 +0000 (UTC) Received: from mail115-95.sinamail.sina.com.cn (mail115-95.sinamail.sina.com.cn [218.30.115.95]) (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 4618557880 for ; Fri, 8 Mar 2024 12:09:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.95 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709899791; cv=none; b=VWofeN+Y5OckW5bZAO1Jcoye1v4X24Ae3jMgIC/QHFElxA0xD21bC98ZzzXk3wYAVpHwVjoRHgRxwLEnT54mZjlgdrGthER28/HpMCBDhQJMAhBfIDitvlAzhCuz5N+LN9DIM/fmG3H9dv22DjtjTOjNXa9mJGB+8lvZrDJuYOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709899791; c=relaxed/simple; bh=qAjGdgYAZ5gXnXvfvJoY9hUIxV78LOQSHo/7T1A2Ln0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z+2m9EepYtxbJ6T+fW1/SC539825NFcMSCGQpanhc1OTbv8U3d4ktCYEBLfc1R3NghzJxmgWN5Bvka8VSuNOiVRCh1v0KJWKUmAiY3BKtIfi9JGAYHapARAaqHOVVho65fkBYkWv2Pof35Uxh0mxxKxpOBBK64bEYGPotBC2OgQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=218.30.115.95 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([116.24.10.223]) by sina.com (172.16.235.24) with ESMTP id 65EB0002000041DB; Fri, 8 Mar 2024 20:09:40 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 82321545089465 X-SMAIL-UIID: F6EE870248784DB281733AB3491D99A0-20240308-200940-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] INFO: rcu detected stall in syscall_exit_to_user_mode (2) Date: Fri, 8 Mar 2024 20:09:30 +0800 Message-Id: <20240308120930.1718-1-hdanton@sina.com> In-Reply-To: <000000000000081ff305f0b14072@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Sun, 25 Dec 2022 17:42:37 -0800 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 72a85e2b0a1e Merge tag 'spi-fix-v6.2-rc1' of git://git.ker.. > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12569d7f880000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master --- x/drivers/media/rc/imon.c +++ y/drivers/media/rc/imon.c @@ -1758,6 +1758,7 @@ static void usb_rx_callback_intf0(struct switch (urb->status) { case -ENOENT: /* usbcore unlink successful! */ + case -EPROTO: return; case -ESHUTDOWN: /* transport endpoint was shut down */ --- x/net/batman-adv/network-coding.c +++ y/net/batman-adv/network-coding.c @@ -397,6 +397,7 @@ static void batadv_nc_purge_orig_hash(st struct hlist_head *head; struct batadv_orig_node *orig_node; u32 i; + int loop = 0; if (!hash) return; @@ -406,9 +407,14 @@ static void batadv_nc_purge_orig_hash(st head = &hash->table[i]; rcu_read_lock(); - hlist_for_each_entry_rcu(orig_node, head, hash_entry) + hlist_for_each_entry_rcu(orig_node, head, hash_entry) { batadv_nc_purge_orig(bat_priv, orig_node, batadv_nc_to_purge_nc_node); + if (++loop > 20) { + rcu_read_unlock(); + return; + } + } rcu_read_unlock(); } } @@ -433,6 +439,7 @@ static void batadv_nc_purge_paths(struct struct batadv_nc_path *nc_path; spinlock_t *lock; /* Protects lists in hash */ u32 i; + int loop = 0; for (i = 0; i < hash->size; i++) { head = &hash->table[i]; @@ -441,6 +448,10 @@ static void batadv_nc_purge_paths(struct /* For each nc_path in this bin */ spin_lock_bh(lock); hlist_for_each_entry_safe(nc_path, node_tmp, head, hash_entry) { + if (++loop > 20) { + spin_unlock_bh(lock); + return; + } /* if an helper function has been passed as parameter, * ask it if the entry has to be purged or not */ @@ -675,6 +686,7 @@ batadv_nc_process_nc_paths(struct batadv struct batadv_nc_path *nc_path; bool ret; int i; + int loop = 0; if (!hash) return; @@ -686,6 +698,10 @@ batadv_nc_process_nc_paths(struct batadv /* Loop coding paths */ rcu_read_lock(); hlist_for_each_entry_rcu(nc_path, head, hash_entry) { + if (++loop > 20) { + rcu_read_unlock(); + return; + } /* Loop packets */ spin_lock_bh(&nc_path->packet_list_lock); list_for_each_entry_safe(nc_packet, nc_packet_tmp, --