Skip to content

libblkid: don't use O_NONBLOCK for floppy

Vladimir Sementsov-Ogievskiy util-linux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libblkid: introduce blkid_safe_openlibblkid/src/blkid.h.in libblkid/src/evaluate.c libblkid/src/libblkid.sym +4 more+28 -50 replies
2/2libblkid: reopen floppy without O_NONBLOCKlibblkid/src/probe.c+26 -116 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJiri KosinaMichal SuchánekVladimir Sementsov-Ogievskiy
SeriesA-b R-b
1/2
2/2R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/2] libblkid: don't use O_NONBLOCK for floppy

Good day everyone!

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=1181018

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).

Vladimir Sementsov-Ogievskiy (2):
libblkid: introduce blkid_safe_open
libblkid: reopen floppy without O_NONBLOCK

 libblkid/src/blkid.h.in   |  2 ++
 libblkid/src/evaluate.c   |  2 +-
 libblkid/src/libblkid.sym |  4 ++++
 libblkid/src/probe.c      | 44 ++++++++++++++++++++++++++++++++++++++-
 libblkid/src/verify.c     |  2 +-
 misc-utils/blkid.c        |  2 +-
 misc-utils/wipefs.c       |  2 +-
 7 files changed, 53 insertions(+), 5 deletions(-)
Signature · 1 line
2.31.1