diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-19 13:12:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-19 13:12:17 -0400 |
commit | 14e931a264498fbd4baef07ee0644e347252393b (patch) | |
tree | c202cd976f478fed3d7d786521ab3e32abdc0f9e /drivers/block | |
parent | a2ae9787568ac50978c03ce67bfb79ad2e100cca (diff) | |
parent | 05c69d298c96703741cac9a5cbbf6c53bd55a6e2 (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
"A few small, but important fixes. Most of them are marked for stable
as well
- Fix failure to release a semaphore on error path in mtip32xx.
- Fix crashable condition in bio_get_nr_vecs().
- Don't mark end-of-disk buffers as mapped, limit it to i_size.
- Fix for build problem with CONFIG_BLOCK=n on arm at least.
- Fix for a buffer overlow on UUID partition printing.
- Trivial removal of unused variables in dac960."
* 'for-linus' of git://git.kernel.dk/linux-block:
block: fix buffer overflow when printing partition UUIDs
Fix blkdev.h build errors when BLOCK=n
bio allocation failure due to bio_get_nr_vecs()
block: don't mark buffers beyond end of disk as mapped
mtip32xx: release the semaphore on an error path
dac960: Remove unused variables from DAC960_CreateProcEntries()
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/DAC960.c | 23 | ||||
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 4 |
2 files changed, 13 insertions, 14 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 8db9089127c5..9a13e889837e 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -6580,24 +6580,21 @@ static const struct file_operations dac960_user_command_proc_fops = { | |||
6580 | 6580 | ||
6581 | static void DAC960_CreateProcEntries(DAC960_Controller_T *Controller) | 6581 | static void DAC960_CreateProcEntries(DAC960_Controller_T *Controller) |
6582 | { | 6582 | { |
6583 | struct proc_dir_entry *StatusProcEntry; | ||
6584 | struct proc_dir_entry *ControllerProcEntry; | 6583 | struct proc_dir_entry *ControllerProcEntry; |
6585 | struct proc_dir_entry *UserCommandProcEntry; | ||
6586 | 6584 | ||
6587 | if (DAC960_ProcDirectoryEntry == NULL) { | 6585 | if (DAC960_ProcDirectoryEntry == NULL) { |
6588 | DAC960_ProcDirectoryEntry = proc_mkdir("rd", NULL); | 6586 | DAC960_ProcDirectoryEntry = proc_mkdir("rd", NULL); |
6589 | StatusProcEntry = proc_create("status", 0, | 6587 | proc_create("status", 0, DAC960_ProcDirectoryEntry, |
6590 | DAC960_ProcDirectoryEntry, | 6588 | &dac960_proc_fops); |
6591 | &dac960_proc_fops); | ||
6592 | } | 6589 | } |
6593 | 6590 | ||
6594 | sprintf(Controller->ControllerName, "c%d", Controller->ControllerNumber); | 6591 | sprintf(Controller->ControllerName, "c%d", Controller->ControllerNumber); |
6595 | ControllerProcEntry = proc_mkdir(Controller->ControllerName, | 6592 | ControllerProcEntry = proc_mkdir(Controller->ControllerName, |
6596 | DAC960_ProcDirectoryEntry); | 6593 | DAC960_ProcDirectoryEntry); |
6597 | proc_create_data("initial_status", 0, ControllerProcEntry, &dac960_initial_status_proc_fops, Controller); | 6594 | proc_create_data("initial_status", 0, ControllerProcEntry, &dac960_initial_status_proc_fops, Controller); |
6598 | proc_create_data("current_status", 0, ControllerProcEntry, &dac960_current_status_proc_fops, Controller); | 6595 | proc_create_data("current_status", 0, ControllerProcEntry, &dac960_current_status_proc_fops, Controller); |
6599 | UserCommandProcEntry = proc_create_data("user_command", S_IWUSR | S_IRUSR, ControllerProcEntry, &dac960_user_command_proc_fops, Controller); | 6596 | proc_create_data("user_command", S_IWUSR | S_IRUSR, ControllerProcEntry, &dac960_user_command_proc_fops, Controller); |
6600 | Controller->ControllerProcEntry = ControllerProcEntry; | 6597 | Controller->ControllerProcEntry = ControllerProcEntry; |
6601 | } | 6598 | } |
6602 | 6599 | ||
6603 | 6600 | ||
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 00f9fc992090..304000c3d433 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
@@ -2510,8 +2510,10 @@ static struct scatterlist *mtip_hw_get_scatterlist(struct driver_data *dd, | |||
2510 | up(&dd->port->cmd_slot); | 2510 | up(&dd->port->cmd_slot); |
2511 | return NULL; | 2511 | return NULL; |
2512 | } | 2512 | } |
2513 | if (unlikely(*tag < 0)) | 2513 | if (unlikely(*tag < 0)) { |
2514 | up(&dd->port->cmd_slot); | ||
2514 | return NULL; | 2515 | return NULL; |
2516 | } | ||
2515 | 2517 | ||
2516 | return dd->port->commands[*tag].sg; | 2518 | return dd->port->commands[*tag].sg; |
2517 | } | 2519 | } |