]> git.ipfire.org Git - thirdparty/util-linux.git/commit - libblkid/src/probe.c
libblkid: reopen floppy without O_NONBLOCK
authorKarel Zak <kzak@redhat.com>
Mon, 17 Jan 2022 11:37:13 +0000 (12:37 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 20 Jan 2022 09:12:21 +0000 (10:12 +0100)
commit2d24f9639917b1691266b7a82ce9273b4904c0c4
tree4444cb0e9292ad688bccd0da34b3119773ef8c62
parentd241d28c9e625a6c8e96235f78a2af876d0db4d9
libblkid: reopen floppy without O_NONBLOCK

Vladimir Sementsov-Ogievskiy wrote:
> The commit "floppy: reintroduce O_NDELAY fix" was removed from kernel,
> so we faced the bug described and discussed here:
> https://bugzilla.suse.com/show_bug.cgi?id=3D1181018
>
> Discussion in kernel list on reverting the commit:
> https://www.spinics.net/lists/stable/msg493061.html
>
> In short, I can quote Jiri Kosina's comment:
>
>   opening floppy device node with O_NONBLOCK is asking for all kinds
>   of trouble
>
> So opening floppy with O_NONBLOCK in blkid leads to failure of blkid,
> probable failure of mount and unpleasant error messages in dmesg (see
> also patch 02 for details).

Based on patch from Vladimir.

CC: Jiri Kosina <jkosina@suse.cz>
Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
include/fileutils.h
lib/fileutils.c
libblkid/src/probe.c