Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934994AbcJXLeU (ORCPT ); Mon, 24 Oct 2016 07:34:20 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35582 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933728AbcJXLeS (ORCPT ); Mon, 24 Oct 2016 07:34:18 -0400 Subject: Re: [PATCH] fs: fcntl, avoid undefined behaviour To: Jeff Layton , "J. Bruce Fields" References: <20161014092342.25546-1-jslaby@suse.cz> <1476445695.12134.19.camel@redhat.com> <20161014133846.GB16547@fieldses.org> <60f57792-8b4a-8ae0-f0fe-42db78bc795e@suse.cz> <1477308581.2625.20.camel@redhat.com> Cc: viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org From: Jiri Slaby Message-ID: Date: Mon, 24 Oct 2016 13:34:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1477308581.2625.20.camel@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 729 Lines: 22 On 10/24/2016, 01:29 PM, Jeff Layton wrote: > It looks like it lists this as a "may fail" case: > > http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html > > [EINVAL] > The cmd argument is F_SETOWN and the value of the argument > is not valid as a process or process group identifier. Huh, my man 3p fcntl only lists [EDEADLK] at that point. (I have 2013 edition opposing to 2016 from the link above) > IMO, returning an error here is the right thing to do. Either the > application isn't checking for errors, in which case returning one won't > matter, or it is, and they probably want to be informed that their > F_SETOWN didn't do what they expected. Ok, will do. -- js suse labs