Commit 0d308a79 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] fix ide-tape oops

Set filp->private_data in idetape_chrdev_open() to point to a opened drive,
otherwise driver oopses during future access to tape character device.

Thanks to Stef van der Made <svdmade@planet.nl> for testing ide-tape fixes.
parent 49c19865
...@@ -5581,6 +5581,7 @@ static int idetape_chrdev_open (struct inode *inode, struct file *filp) ...@@ -5581,6 +5581,7 @@ static int idetape_chrdev_open (struct inode *inode, struct file *filp)
return -ENXIO; return -ENXIO;
drive = idetape_chrdevs[i].drive; drive = idetape_chrdevs[i].drive;
tape = drive->driver_data; tape = drive->driver_data;
filp->private_data = drive;
if (test_and_set_bit(IDETAPE_BUSY, &tape->flags)) if (test_and_set_bit(IDETAPE_BUSY, &tape->flags))
return -EBUSY; return -EBUSY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment