• Keith Busch's avatar
    NVMe: IOCTL path RCU protect queue access · 4f5099af
    Keith Busch authored
    This adds rcu protected access to a queue in the nvme IOCTL path
    to fix potential races between a surprise removal and queue usage in
    nvme_submit_sync_cmd. The fix holds the rcu_read_lock() here to prevent
    the nvme_queue from freeing while this path is executing so it can't
    sleep, and so this path will no longer wait for a available command
    id should they all be in use at the time a passthrough IOCTL request
    is received.
    Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
    Signed-off-by: default avatarMatthew Wilcox <matthew.r.wilcox@intel.com>
    4f5099af
nvme-core.c 65.2 KB