Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100312
b: refs/heads/master
c: dea3f66
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 50cac07 commit 290f902
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9aaf20cbf5b7cccd45495326cba0b35b2884e6b3
refs/heads/master: dea3f665d6fa263a9870a54e9f8cfd146016f140
5 changes: 5 additions & 0 deletions trunk/drivers/scsi/dpt_i2o.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver");
#include <linux/kernel.h> /* for printk */
#include <linux/sched.h>
#include <linux/reboot.h>
#include <linux/smp_lock.h>
#include <linux/spinlock.h>
#include <linux/dma-mapping.h>

Expand Down Expand Up @@ -1727,10 +1728,12 @@ static int adpt_open(struct inode *inode, struct file *file)
int minor;
adpt_hba* pHba;

lock_kernel();
//TODO check for root access
//
minor = iminor(inode);
if (minor >= hba_count) {
unlock_kernel();
return -ENXIO;
}
mutex_lock(&adpt_configuration_lock);
Expand All @@ -1741,6 +1744,7 @@ static int adpt_open(struct inode *inode, struct file *file)
}
if (pHba == NULL) {
mutex_unlock(&adpt_configuration_lock);
unlock_kernel();
return -ENXIO;
}

Expand All @@ -1751,6 +1755,7 @@ static int adpt_open(struct inode *inode, struct file *file)

pHba->in_use = 1;
mutex_unlock(&adpt_configuration_lock);
unlock_kernel();

return 0;
}
Expand Down

0 comments on commit 290f902

Please sign in to comment.