Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1427806lqt; Wed, 20 Mar 2024 03:56:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmH05w5Gh0auGcVq6s/vQP460I6YkViHO4P/vPAup2uj20fe4vYCO7iCfbXNu2ueCJjCuz11M14Ke0A1EvDxnKq9oKwVFvDHmZFT4vhA== X-Google-Smtp-Source: AGHT+IGmJ9WRxl2zLZPfYh6edg6zbqyKfyA4hKJR8KaVuGjpvbYJLq8PnBfA9lJcOV6klalf0ixX X-Received: by 2002:a05:6808:120e:b0:3c2:50c6:f14b with SMTP id a14-20020a056808120e00b003c250c6f14bmr1777195oil.43.1710932202230; Wed, 20 Mar 2024 03:56:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710932202; cv=pass; d=google.com; s=arc-20160816; b=Q+Ut7ByKNP17zS4SVLyNZIDe8IUkRTjFtLiECVy6HlimisqJjHOnVWU7p8AcLcm7o9 A+Kxp4DwlTDJTM+J9DdqTo4510mcR3vmlYlODxYCH5IKPvZovnWORlUxPs/RiT2fBjnQ 16+PY7HcGGXpioyTDKLC6+KeZynhexZuJHhRV0pbIXV0+9YsYtOfpP2q0gX4TBu8/w5S sgweJyGXP9n9y55UFyAMBwXttLIqU53fpmtwmKljnFzuXZ0rPqz362ryuq9I7u7wjLko NOSZb4vZa4XVHIxaGRJnDbnjS+qti3C9RbbhnhoPjgZnb09eI/BZJVf1u7FGDRExPwMf v/Bw== 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=B4EAq4bMC6DQKtqYhwsOhUmZubpA5xV8dycCkj8coLE=; fh=8TYzwojyreGRP3pJ1a1wsEl0cyxD17ikD8X8oWVJy/M=; b=VuD0XoCajNUiLUCKCCvkySWt6ADAGXs/fInRvtw6fBJaffNx8dbp0PqCK7Dd30j+DS fx40ppKf8+RCQ6tvB3+sJOdFJmlVav0sj0hXWtzCC1wPWSqAz/Ki9VfN6ybxh/cI7fvi ghuagTjQN2AmIYIkd0uiVxf9VG56qHJ5tAora8Xu1FH5UyzSOEb2Yt9mdf685KfHw0ff Nr+hJ879t5GUya0JKMwy2gIkeRKXGxsiqtCa7lfXqTLoBzwPmf78zxc2Iou+4QmgNTsG KUpifx8IqMLG/MOW5+zx7+Uxdl5HEc+vNgNIz+/LY9+LodupHOrWi0iTe8ieCEQWCXnU wR3w==; 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-108810-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108810-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q9-20020a635049000000b005d55aec96b2si12091067pgl.41.2024.03.20.03.56.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 03:56:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108810-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-108810-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108810-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 7FE92284B0F for ; Wed, 20 Mar 2024 10:56:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B44A73A1C5; Wed, 20 Mar 2024 10:56:38 +0000 (UTC) Received: from mail78-58.sinamail.sina.com.cn (mail78-58.sinamail.sina.com.cn [219.142.78.58]) (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 C1EF738384 for ; Wed, 20 Mar 2024 10:56:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.58 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710932198; cv=none; b=MWWNoifaurxFrDfqE7OS4vuMx7VPr/Ss4Lk4OFwoNcg7zRJiIjNQpMGatSw/sq9PcKJxZbqtkI0TGAlHSgH1iYMhn7j43DuOLkr43oO8kLvJSrMAtOGQAlSK7lXZ1zzdsDKzPhqwESWfOZaBHtGSRxByDmByC+/ymG5zTHIkX+Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710932198; c=relaxed/simple; bh=brTj4ki1UXquLCalyQed1q20K5Mf3tXooUOhxC4FRu0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z9mBcaC5cfZfjt60DkFUf39ZwjeRU2e+ro+2Ga9C0kSGx9gZbaxsOdtATNeFpzEk6dcy7atmxn6lbkLrIpQteOc4dYAQPO+B2D5Jz/+RJvOpiS8+hbULkNJBAtV7LUYk4iDFTuc8IpFPl6Oy/eLzGKRfL+VC+lmujw4B8HRZbzk= 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=219.142.78.58 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.11.154]) by sina.com (172.16.235.25) with ESMTP id 65FAC0AF00000B32; Wed, 20 Mar 2024 18:55:47 +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: 32788534210202 X-SMAIL-UIID: 5CF71BAC696348EEB0776A3B820D89DE-20240320-185547-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [bpf?] [net?] possible deadlock in hrtimer_run_queues Date: Wed, 20 Mar 2024 18:55:38 +0800 Message-Id: <20240320105538.2238-1-hdanton@sina.com> In-Reply-To: <0000000000004b02a206140b016b@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 Tue, 19 Mar 2024 15:29:19 -0700 > syzbot found the following issue on: > > HEAD commit: ea80e3ed09ab net: ethernet: mtk_eth_soc: fix PPE hanging i.. > git tree: net > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11c64e31180000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git ea80e3ed09ab --- x/net/core/sock_map.c +++ y/net/core/sock_map.c @@ -932,11 +932,12 @@ static long sock_hash_delete_elem(struct struct bpf_shtab_bucket *bucket; struct bpf_shtab_elem *elem; int ret = -ENOENT; + unsigned long flags; hash = sock_hash_bucket_hash(key, key_size); bucket = sock_hash_select_bucket(htab, hash); - spin_lock_bh(&bucket->lock); + spin_lock_irqsave(&bucket->lock, flags); elem = sock_hash_lookup_elem_raw(&bucket->head, hash, key, key_size); if (elem) { hlist_del_rcu(&elem->node); @@ -944,7 +945,7 @@ static long sock_hash_delete_elem(struct sock_hash_free_elem(htab, elem); ret = 0; } - spin_unlock_bh(&bucket->lock); + spin_unlock_irqrestore(&bucket->lock, flags); return ret; } --