Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp207261lqh; Fri, 3 May 2024 20:24:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/l7y0ohfZmnEg3NgiPAOHxnUfCZIgsoT+2x3A0++rXlzG9hQFEThD74xF4KRw4cgaQOlv4Ktw9UwdlPpA9324Bsi27pT4zNS3KqaiLg== X-Google-Smtp-Source: AGHT+IFNzMj1rGklTpqkezrMVIH5VvM1QMOwxt32RbMUJwaD6NMUFA8rJF97dkE+T2MiRy3T3/3c X-Received: by 2002:a05:620a:1923:b0:78d:6e6f:9004 with SMTP id bj35-20020a05620a192300b0078d6e6f9004mr6011126qkb.59.1714793059589; Fri, 03 May 2024 20:24:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714793059; cv=pass; d=google.com; s=arc-20160816; b=dErbUTbopownLVWLLjA+HwkMmmVrA39GFrJNLyg1ZPALXEp59hJCKU+bHGSWJuodIe 0g3+FJSvMOE6Rv5VdrG5sKAs3jjrprjP18xDDNZSRTDqEzQsLHytLn+hBaF1axs1P7aE WJ2Kt75QexE1hDrytpiu6HNKVSw8mCZ823yL6RI4zuQ45lRkDoDpJLnJtnXRrz9Rwg2d seUV9Ou6csBdwT01QztjQze7QE9foYomcwQ3hUFYcD23FADb8laFH7azMeRK1DFQkmFb RW8XO1cXG/welHPs2vi/+IPBXibBmSYy0zDX6JUq8U2kBVFQV2aNmAoWHuoU2fGwZEox Nu9g== 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=dihvxWGj/jmE6tO+uvbOyIStLSMfgpSWlXaqrL19OvQ=; fh=DQtOjmRJNia/B0KXEXSRNmbWplkHIlx5rG0k+IhN/fU=; b=uLudXF+b3xIm7D1g2myIUlyqg1V1DKjx2+QPfKrYaLPdyQzf52mD7axJYSlLSUNdGX 2OWyk/OJkDHefUJUZVHh3L2JxszZZdiWe35Enx/Q2/2T/879oOjeOXrvA2AyN/edjYjG ePIZeiQfV9/dR5vbdIXbb3uZgLW93i62Xn/Y0CJzHLIChuSiLAoKJy/D4EEO6xySD8ks TgCsD7Scvv909FdqqRJ65t9EASkdpvbTd3mevVjJ+FfcyeBoszt6BtJ5QXJGiIL9I4l5 e9A3qCTGQ1Z8q7bmfSZwU7WOc8AL0elRfSM3M6/Vr61F0ALp4aoZ/B8ScObuxFhhUNks iKBw==; 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-168507-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168507-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m1-20020a05620a290100b0078d4d99860asi5085854qkp.81.2024.05.03.20.24.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 20:24:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168507-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-168507-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168507-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5380E1C2258C for ; Sat, 4 May 2024 03:24:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0CBD4107B3; Sat, 4 May 2024 03:24:14 +0000 (UTC) Received: from mail114-240.sinamail.sina.com.cn (mail114-240.sinamail.sina.com.cn [218.30.114.240]) (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 8D715800 for ; Sat, 4 May 2024 03:24:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.114.240 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714793053; cv=none; b=DrtTNMjo1TUbfy8mPbcjB+GvIYyESf74MnAZhY31HBUzdnAHTr8YbwszMo9Hccp4b2UMTK9+9sCm0CAp625cfhDwtW3/XNsBUfzoDQpZApFpyDMoyhTMgiucYyfCUJYnK9WKQHO57uCRkTy0rJuBnq/RX/UJpKJashALIFhQgfM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714793053; c=relaxed/simple; bh=jQ4O/aEuFt08ngMxcl9D4KYRUsBeEcYRIRby+ba80+E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XrmdhrPuc7gpxp6mUJE6Z4MplbKAFqpE79NqnsoFAWCWI9pZ/WchJ5+CXRkmvKwNxxSL0SlSjBhBocPIxxKc05ojeNsnps6qPP99rb0iRS1M7ni8NdMdqeMapM8tKvkeDBdQspCNHOIMpD+eCTL96SiEtL6Vv0zSmc2ZUxiwDQc= 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.114.240 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)([113.118.66.195]) by sina.com (172.16.235.24) with ESMTP id 6635AA4A00005356; Sat, 4 May 2024 11:23:56 +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: 42049345089161 X-SMAIL-UIID: F78DC521C8484564BC286F71B9261858-20240504-112356-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove Date: Sat, 4 May 2024 11:23:45 +0800 Message-Id: <20240504032345.1992-1-hdanton@sina.com> In-Reply-To: <0000000000002d631f0615918f1e@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 Mon, 08 Apr 2024 01:26:16 -0700 > syzbot found the following issue on: > > HEAD commit: 480e035fc4c7 Merge tag 'drm-next-2024-03-13' of https://gi.. > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10801175180000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 480e035fc4c7 --- x/fs/eventpoll.c +++ y/fs/eventpoll.c @@ -991,9 +991,13 @@ static __poll_t ep_item_poll(const struc __poll_t res; pt->_key = epi->event.events; - if (!is_file_epoll(file)) - res = vfs_poll(file, pt); - else + if (!is_file_epoll(file)) { + res = 0; + if (atomic_long_inc_not_zero(&file->f_count)) { + res = vfs_poll(file, pt); + fput(file); + } + } else res = __ep_eventpoll_poll(file, pt, depth); return res & epi->event.events; } --