Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-rt
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • David Runge
  • linux-rt
  • Repository
Switch branch/tag
  • linux-rt
  • drivers
  • block
  • floppy.c
Find file BlameHistoryPermalink
  • Jiri Kosina's avatar
    floppy: reintroduce O_NDELAY fix · 8a0c014c
    Jiri Kosina authored Jan 22, 2021
    This issue was originally fixed in 09954bad ("floppy: refactor open()
    flags handling").
    
    The fix as a side-effect, however, introduce issue for open(O_ACCMODE)
    that is being used for ioctl-only open. I wrote a fix for that, but
    instead of it being merged, full revert of 09954bad was performed,
    re-introducing the O_NDELAY / O_NONBLOCK issue, and it strikes again.
    
    This is a forward-port of the original fix to current codebase; the
    original submission had the changelog below:
    
    ====
    Commit 09954bad ("floppy: refactor open() flags handling"), as a
    side-effect, causes open(/dev/fdX, O_ACCMODE) to fail. It turns out that
    this is being used setfdprm userspace for ioctl-only open().
    
    Reintroduce back the original behavior wrt !(FMODE_READ|FMODE_WRITE)
    modes, while still keeping the original O_NDELAY bug fixed.
    
    Link: https://lore.kernel.org/r/nycvar.YFH.7.76.2101221209060.5622@cbobk.fhfr.pm
    
    
    Cc: stable@vger.kernel.org
    Reported-by: default avatarWim Osterholt <wim@djo.tudelft.nl>
    Tested-by: default avatarWim Osterholt <wim@djo.tudelft.nl>
    Reported-and-tested-by: default avatarKurt Garloff <kurt@garloff.de>
    Fixes: 09954bad ("floppy: refactor open() flags handling")
    Fixes: f2791e7e
    
     ("Revert "floppy: refactor open() flags handling"")
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
    8a0c014c