lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5h37zzqrpv.wl-tiwai@suse.de>
Date:	Tue, 04 Aug 2015 12:21:32 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	"Dr. Werner Fink" <werner@...e.de>
Subject: Re: May close() return any error code?

On Sun, 02 Aug 2015 16:07:06 +0200,
Al Viro wrote:
> 
> On Wed, Jul 29, 2015 at 07:45:11AM -0700, Dmitry Torokhov wrote:
> > > This seems coming from evdev_flush().  As there is no fd leak, it's no
> > > big problem per se.  But, now the question is whether returning such
> > > an error code is correct behavior at all.  At least, it doesn't seem
> > > defined in POSIX:
> > >   http://pubs.opengroup.org/onlinepubs/009695399/functions/close.html
> > 
> > Hmm, if I checked the right version of the code close_nointr_nofail()
> > expects only 0 as the return code so even if we change the kernel to
> > use more conforming -EIO instead of -ENODEV systemd will still die...
> > 
> > The question is whether we really need to propagate return value from
> > f_op->flush() up to userspace in filp_close(). Why don't we ask Al?
> 
> That's the whole damn point of having ->flush().  And yes, we do need that -
> things like NFS (not to mention tapes, etc.) do rely on that.
> 
> Whether it makes sense to do this kind of "do something that might have
> a failure to report on each close()" for evdev is up to driver, obviously.

So, the behavior of VFS layer is as designed.  Then I suppose the fix
should be rather in evdev.c.  Dmitry, could you paper over it?


thanks,

Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ