Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77021
b: refs/heads/master
c: b10c36a
h: refs/heads/master
i:
  77019: c15eddb
v: v3
  • Loading branch information
bo yang authored and James Bottomley committed Jan 12, 2008
1 parent 4fadfae commit 064a3e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14faea9f7fe1e8805629b50cf14a65a85fe4a4fd
refs/heads/master: b10c36a57552f03582c0ab3ece04f3cce791922d
13 changes: 8 additions & 5 deletions trunk/drivers/scsi/megaraid/megaraid_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -2825,6 +2825,7 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
void *sense = NULL;
dma_addr_t sense_handle;
u32 *sense_ptr;
unsigned long *sense_buff;

memset(kbuff_arr, 0, sizeof(kbuff_arr));

Expand Down Expand Up @@ -2929,14 +2930,16 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
*/
if (ioc->sense_len) {
/*
* sense_ptr points to the location that has the user
* sense_buff points to the location that has the user
* sense buffer address
*/
sense_ptr = (u32 *) ((unsigned long)ioc->frame.raw +
ioc->sense_off);
sense_buff = (unsigned long *) ((unsigned long)ioc->frame.raw +
ioc->sense_off);

if (copy_to_user((void __user *)((unsigned long)(*sense_ptr)),
sense, ioc->sense_len)) {
if (copy_to_user((void __user *)(unsigned long)(*sense_buff),
sense, ioc->sense_len)) {
printk(KERN_ERR "megasas: Failed to copy out to user "
"sense data\n");
error = -EFAULT;
goto out;
}
Expand Down

0 comments on commit 064a3e4

Please sign in to comment.