From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8972235E94B; Fri, 13 Mar 2026 15:52:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773417155; cv=none; b=u7NHl7NVuGNHFkWufwo3U8eA4qW7f8LcgFgfrLI52jsw8JAQfxHuCXbL8QJOEh1nY/pFPaeQJ72d36rfi8Z/A65DO0bfAkQLA1tORSMczy6RdE9yG/9qrLHTkx7Z99VP3MT0kNC+D80x828l9Y1RbCR12wNSxgj7mvNPH892WuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773417155; c=relaxed/simple; bh=cLD4UeOXJEUjkMvUeEZ9aUKn0n85Sd7Thbn1qGBM0uo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=k4iGlZLhYkIV7tjDL2IRxRJRh++h7GciVJqF9W/ZXX/CDPuCleA2RpqKPptCYSAJePVtKwcZ08IoD6U18bcuH/JnK3xC09U/llpZEYOmZwhciD01+Q1zqGUOtIBl6DYZxvUAZh470Mi/vzwdIvAdgzG8t1wQd9PQAPRnb9ZUxRE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XqOmm3A0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="XqOmm3A0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AA18C19425; Fri, 13 Mar 2026 15:52:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773417155; bh=cLD4UeOXJEUjkMvUeEZ9aUKn0n85Sd7Thbn1qGBM0uo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XqOmm3A0UZs9o+49rm7NCPNLl6y2BgofzBQ/MVdHloql3+txX9ZVv6nIClHxFk7D0 NxcnY6lKcEMxCqba0hVKiM+eb5ldNI4tGaTnjM5MliA8h9J3pZ6UQkctN7+z79HObz E3+AUjS96c53npC+NNUFW0NFVEnBwWvYXdq7mx7I= Date: Fri, 13 Mar 2026 16:52:30 +0100 From: Greg Kroah-Hartman To: Sasha Levin Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kselftest@vger.kernel.org, workflows@vger.kernel.org, tools@kernel.org, x86@kernel.org, Thomas Gleixner , "Paul E. McKenney" , Jonathan Corbet , Dmitry Vyukov , Randy Dunlap , Cyril Hrubis , Kees Cook , Jake Edge , David Laight , Askar Safin , Gabriele Paoloni , Mauro Carvalho Chehab , Christian Brauner , Alexander Viro , Andrew Morton , Masahiro Yamada , Shuah Khan , Ingo Molnar , Arnd Bergmann Subject: Re: [PATCH 6/9] kernel/api: add API specification for sys_close Message-ID: <2026031321-steadfast-fang-ba42@gregkh> References: <20260313150928.2637368-1-sashal@kernel.org> <20260313150928.2637368-7-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-api@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260313150928.2637368-7-sashal@kernel.org> On Fri, Mar 13, 2026 at 11:09:16AM -0400, Sasha Levin wrote: > + * notes: This syscall has subtle non-POSIX semantics: the fd is ALWAYS closed > + * regardless of the return value. POSIX specifies that on EINTR, the state > + * of the fd is unspecified, but Linux always closes it. HP-UX requires > + * retrying close() on EINTR, but doing so on Linux may close an unrelated > + * fd that was reassigned by another thread. For portable code, the safest > + * approach is to check for errors but never retry close(). We don't care about HP-UX :) > + * Error codes from the flush callback (EIO, ENOSPC, EDQUOT) indicate that > + * previously written data may have been lost. These errors are particularly > + * common on NFS where write errors are often deferred to close time. What flush callback? > + * > + * The driver's release() callback errors are explicitly ignored by the > + * kernel, so device driver cleanup errors are not propagated to userspace. What "The driver" here? release() callbacks aren't really relevant here. thanks, greg k-h