Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2325139lqo; Mon, 20 May 2024 02:10:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVQi+xgE1Tf8vyhhw08I08kTOLrA7j1QN6y7KFHZ6Hu7tfCwEBSQGDwLiZmR6Ggwp+YVOKJPoohxAKNw+k+TFxjUdAiD826f/GJt/ktGA== X-Google-Smtp-Source: AGHT+IGeLEOz6d0IxALUVBqsDxpoKI2u7FeFh8QcMNE6iDcibu1vDvslvetXmIt74WiQQIzprPut X-Received: by 2002:a50:a6d4:0:b0:56e:3293:3777 with SMTP id 4fb4d7f45d1cf-5734d5c1594mr26719577a12.17.1716196222717; Mon, 20 May 2024 02:10:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716196222; cv=pass; d=google.com; s=arc-20160816; b=gGgnKbktMULnrnqhG+wiVBouc1d4AhJHb2WnVBTTgqzOAbRQhakwibgs5aKLFZgyu7 /Z206MAlZBqkZYAFet7e1IMXG5Lh8nTvLYN+0s0EyzJGGiAXZQhnb99963CsnIShNoQ+ k5O7yHCxe55SSu7g+pZAiN4Xt9aJuAzOeQnOukDTm+1Tj8VrafRajCPy6qPOcr0OcSN7 41SgZ0QM2PH8xIMGQVlOyWn2TsMZ/BGF15UyGcBQhsbf7vHPHBKoBmCsbrT+kPp8bHxH ISp/3er7Ba/eoz+zHMUSEZF0IU3bOqp2uG67J5M8vGEoMRZlHEjDCg+mvywKtJCKVhZa awRw== 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:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter; bh=ITagZGQ3VHzpt1AUxt0LwozxAebgPmFLksDrhcMgLC8=; fh=IimdnF2v+ERSLMQ7CYQoO7uZmE5Zq3Rg9N52VRAL5rQ=; b=AyYUhZXGd3dVejWC/MUrnfm3H6bo1uDJm4dbt4Ney8vK7fQ1XaoYOkERpZHDqGNHh2 ZoNbZEZxbezmYMHURDQ78s1bSoaVuR1I0vuzIsfS+aCH5aibUtChaCDFO4A7B1Ir5TPQ SRm7Bd3VvBpP41Eacit+qtgqHtdXxxjJQS6QcK182q11CjsVzLFeSepzGIJkb6Am4KKo MOfgtr5vf80P5lcMBDTWAvKi05XGMT4hz5HIZADTxdZ2fA45XZREBZmS9eFogJaVNrVF sUnQ0ChTQQBWtkTXVtoptxzBfbeSNccY2Veawvm6/43idn+ueuiPouYWEoVp3TNvR5XL ivNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ispras.ru header.s=default header.b=VX1XD5fH; arc=pass (i=1 spf=pass spfdomain=ispras.ru dkim=pass dkdomain=ispras.ru dmarc=pass fromdomain=ispras.ru); spf=pass (google.com: domain of linux-kernel+bounces-183519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ispras.ru Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17945e24si1292990266b.139.2024.05.20.02.10.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 02:10:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ispras.ru header.s=default header.b=VX1XD5fH; arc=pass (i=1 spf=pass spfdomain=ispras.ru dkim=pass dkdomain=ispras.ru dmarc=pass fromdomain=ispras.ru); spf=pass (google.com: domain of linux-kernel+bounces-183519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ispras.ru 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 728961F2117A for ; Mon, 20 May 2024 09:10:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3C941CD18; Mon, 20 May 2024 09:10:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b="VX1XD5fH" Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43A68208A0; Mon, 20 May 2024 09:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.149.199.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716196213; cv=none; b=U1nYfwB642mM0eCzjALpHOZRY2gUXZChwyEVk1AZO5WYiOHVz55nILxlzKJE6sLQpmaiAhpmEdZNoN+tc4ZwgK3+CPkcCqX+jP+F9xy0ntjSH/Q8stqJvKn+7uyI846fw6dKyYtL7zkTum6wmOqUhTP5uULdkUkMenagT2Iy2Do= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716196213; c=relaxed/simple; bh=545Z9tkN34N0Dsh1Q1qIJ26oe7owU6dG5nZ3IvZTHz4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=UzQi+WamN/WOHJhNfVvZcm8vpuqsofZJF26ktCLec0ZLvlUNEwxjiSFNpFwHIaz5Q6arjEiWulBrOe0eTQyz103D0B3tbfb1DLImGRrGMrUffbh5Jlu4z89sga6RDPSdDLS1sfmRsd9ZyWRaeWxDDGQIfYA8o7d5pavvneIoPqk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru; spf=pass smtp.mailfrom=ispras.ru; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b=VX1XD5fH; arc=none smtp.client-ip=83.149.199.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ispras.ru Received: from localhost.localdomain (unknown [5.228.116.47]) by mail.ispras.ru (Postfix) with ESMTPSA id 1046C407853B; Mon, 20 May 2024 09:10:01 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 1046C407853B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru; s=default; t=1716196201; bh=ITagZGQ3VHzpt1AUxt0LwozxAebgPmFLksDrhcMgLC8=; h=From:To:Cc:Subject:Date:From; b=VX1XD5fHx8v2bAF4FE179K/dueE5KZaWO5YqetmsajbMQTTHnHcsB1v2Y7OE1vsL5 RmH+FDOFJzdssBBoXv8Lz8IgsqQrVp71nBMfZFZr88CNq36dqUPV2Cp8ANun0wKtCp W7U8qCNUesiy1syEDlUVMWeIqi2wJPSw72t4xqcA= From: Fedor Pchelkin To: Jens Axboe , Christian Brauner Cc: Fedor Pchelkin , Alexander Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Khoroshilov , lvc-project@linuxtesting.org Subject: [PATCH 1/2] signalfd: fix error return code Date: Mon, 20 May 2024 12:08:18 +0300 Message-Id: <20240520090819.76342-1-pchelkin@ispras.ru> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit If anon_inode_getfile() fails, return appropriate error code. This looks like a single typo: the similar code changes in timerfd and userfaultfd are okay. Found by Linux Verification Center (linuxtesting.org). Fixes: fbe38120eb1d ("signalfd: convert to ->read_iter()") Signed-off-by: Fedor Pchelkin --- fs/signalfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/signalfd.c b/fs/signalfd.c index 4a5614442dbf..65fe5eed0be4 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c @@ -282,7 +282,7 @@ static int do_signalfd4(int ufd, sigset_t *mask, int flags) if (IS_ERR(file)) { put_unused_fd(ufd); kfree(ctx); - return ufd; + return PTR_ERR(file); } file->f_mode |= FMODE_NOWAIT; -- 2.39.2