Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1094225rwb; Wed, 7 Dec 2022 08:32:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf60EnbJ+pmbVixsl7hylps4N6Y19feSPwO9E4gFJl6rkmOzzajcDEMRQLbwkPfkYMxH1npa X-Received: by 2002:a63:5a62:0:b0:476:ed2a:6215 with SMTP id k34-20020a635a62000000b00476ed2a6215mr66796903pgm.559.1670430776968; Wed, 07 Dec 2022 08:32:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670430776; cv=none; d=google.com; s=arc-20160816; b=gMsWASKCWLpLBVvaNFIDkBrnSgateUCPDHoekjyFR6Hvh55W1G+FzMqDuTwynu75y9 47zMFjZWkq/rELxToKj/SlKiQGkPmHJ+mMtRmvgZqu8Ef43+cnR9LtVOkH4qruutforK JSRmotayObn4NM7iY7jM4eGispTYAhicmzsBJytvHDEOBCZ7ccPRO8aNIgHnq/6Ja+x8 xmcC3y3PM0J2H5R/PoH63/mcHaw4re0bMx1tbF+ftFk1aac7f+hPX/MjI0V0TLuW0Z3n xXpRF3MCuUz3i7l55XjoWSo6f2cd3wtt730bIGpD2ESPJSuM/sUVXddAFn/39BUWsTvb sMLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Bn9I9xV79fJUCgoxsa3ub+uGmmlj3Tv0J26ZcN9So2c=; b=kJ9gzouGnuOeLYBPIpWWtvm2iCw4H7V21uWMrKDFLrSvYPmFWsOL6xPwPyq+G6K+sy YukGXaz21/M7Vbj3WMcqfgjYnJ0qyMfD+jriR9QYGOeMEu49nQYacUs38gZIdlzPCRBC n7JcUz299GrdqmTupfPo3aC5+J9D37brYW/uammew9MpBPmO2az/L/+fpC+2rXbaW0+p lUdh+mPC8DODM0cKeNywtD9lwfr0DAgM/PNvBvO26FOITqg2CxBjYk6JpJ8JmHaNfEKt Sfdtnq9U3CU2f9/Mx9Ou2KCtW64Y3uOXfBpDgAQS5exniNxPeAZ8z2WNG1q2+8MkwGmR Vfxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=oktSzxAS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e65-20020a636944000000b00478831d07f9si12207315pgc.312.2022.12.07.08.32.46; Wed, 07 Dec 2022 08:32:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b=oktSzxAS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbiLGQW4 (ORCPT + 77 others); Wed, 7 Dec 2022 11:22:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbiLGQWv (ORCPT ); Wed, 7 Dec 2022 11:22:51 -0500 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF3C025C7A for ; Wed, 7 Dec 2022 08:22:47 -0800 (PST) Received: by mail-io1-xd2d.google.com with SMTP id n188so12065425iof.8 for ; Wed, 07 Dec 2022 08:22:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Bn9I9xV79fJUCgoxsa3ub+uGmmlj3Tv0J26ZcN9So2c=; b=oktSzxAShr3BHoD72bP4RFPVPK2PQ9754FcMwUZLSN4JtDJnGYSSmZWOGHv94kk8p2 hRwss1tlAVG7p8Av2GnMo81SayC6jYcGxuvgfQjOmrGY3anuIuUmHTnrOwK4bjFlrHLH 8X2zXyi3q6BymHi1hN9CxD5+hoxVUb4cv+kVB+LerzeBetWY4WfSZ5+f327qAreMbIrn 68t4pMOeqqBpF9HLmnL9+4GnvtxCjB6tGckAQYSJQEdBSt77fS7PfaRqOq6S74eXp1OI HyGz4pZzTJh8yNYLubKPUaRkK+fiekioy/q9ElL9E6hHGOMvjaC1n0ZrZ+A9RVFAaNNK rmtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Bn9I9xV79fJUCgoxsa3ub+uGmmlj3Tv0J26ZcN9So2c=; b=g94zhfWQRLBd/sGA5OP7A9o5zpLs0fSyXdG0rIZk1pXzRetQtp64wrxCq/hOk3kBqB J2clymFNKO3fApMpQy26TCeSPzLlPpn3Mk345rkjzwoiHBUyF7P/1E2XXa9MVo8ChMur yMlwCHgM9Tca7EHcFS6SaXpKrFSs0jWPQQmGfHIDichzSKhrUOJLgiAPjNrqaTSzmWfc jVzQxIdVO5+TOvv60+9wJ1FzyizQ/1Wdw7aX8M+G3FOp0psQWscBwCYALinW4vax7dIZ jwn57sHLdgARW2aVI7mGP24dA+SdxQX22WZSjZMjSgRXLzhooM1RofWpzvCqpPhBG3Ia a13A== X-Gm-Message-State: ANoB5plwVDQGU9MJ4cuM17bgUmAn34SZ4KXljPJDuaxvb1ndojP/2y4e svRGZDZdAFLYk6Z1sw3cCwh66Q== X-Received: by 2002:a02:334d:0:b0:376:22fe:5e7c with SMTP id k13-20020a02334d000000b0037622fe5e7cmr43131407jak.126.1670430167275; Wed, 07 Dec 2022 08:22:47 -0800 (PST) Received: from [192.168.1.94] ([207.135.234.126]) by smtp.gmail.com with ESMTPSA id p12-20020a056e0206cc00b00302f958e71dsm7202366ils.49.2022.12.07.08.22.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Dec 2022 08:22:46 -0800 (PST) Message-ID: Date: Wed, 7 Dec 2022 09:22:45 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: next: LTP: syscalls: epoll_clt() if fd is an invalid fd expected EBADF: EINVAL (22) Content-Language: en-US To: Naresh Kamboju , open list , linux-fsdevel@vger.kernel.org, regressions@lists.linux.dev, lkft-triage@lists.linaro.org, Linux-Next Mailing List , LTP List Cc: Alexander Viro , Anders Roxell , Arnd Bergmann , chrubis References: From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/7/22 8:58?AM, Naresh Kamboju wrote: > LTP syscalls epoll_ctl02 is failing on Linux next master. > The reported problem is always reproducible and starts from next-20221205. > > GOOD tag: next-20221202 > BAD tag: next-20221205 > > tst_test.c:1524: TINFO: Timeout per run is 0h 05m 00s > epoll_ctl02.c:87: TPASS: epoll_clt(...) if epfd is an invalid fd : EBADF (9) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd does not support epoll : EPERM (1) > epoll_ctl02.c:87: TFAIL: epoll_clt(...) if fd is an invalid fd > expected EBADF: EINVAL (22) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if op is not supported : EINVAL (22) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is the same as epfd : EINVAL (22) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if events is NULL : EFAULT (14) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is not registered with > EPOLL_CTL_DEL : ENOENT (2) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is not registered with > EPOLL_CTL_MOD : ENOENT (2) > epoll_ctl02.c:87: TPASS: epoll_clt(...) if fd is already registered > with EPOLL_CTL_ADD : EEXIST (17) This should fix it: diff --git a/fs/eventpoll.c b/fs/eventpoll.c index ec7ffce8265a..de9c551e1993 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -2195,6 +2195,7 @@ int do_epoll_ctl(int epfd, int op, int fd, struct epoll_event *epds, } /* Get the "struct file *" for the target file */ + error = -EBADF; tf = fdget(fd); if (!tf.file) goto error_fput; -- Jens Axboe