diff options
author | Jitendra Bhivare <jitendra.bhivare@broadcom.com> | 2017-10-10 16:18:14 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-10-11 14:18:29 -0400 |
commit | a39e9f71e5ed718256681f73740e866c8e572ec6 (patch) | |
tree | 2a322618cd7166407c9b30b6dbb92f25bfad45c4 /drivers/scsi/be2iscsi/be_cmds.c | |
parent | 45371aa398c6473a722e4a3800d9fea5a53e080f (diff) | |
download | linux-a39e9f71e5ed718256681f73740e866c8e572ec6.tar.bz2 |
scsi: be2iscsi: Fix _modify_eq_delay buffer overflow
beiscsi_modify_eq_delay is using embedded command to send request of 788
bytes in 236 bytes buffer. Non-embedded command needs to be used in such
cases.
Use mgmt_alloc_cmd_data fn modified to allow passing of subsystem. Use
mgmt_exec_nonemb_cmd fn modified to allow setting of callback.
Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_cmds.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_cmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index a79a5e72c777..6af448d69126 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -675,8 +675,8 @@ static int be_mbox_notify(struct be_ctrl_info *ctrl) return status; } -void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, - bool embedded, u8 sge_cnt) +void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, u32 payload_len, + bool embedded, u8 sge_cnt) { if (embedded) wrb->emb_sgecnt_special |= MCC_WRB_EMBEDDED_MASK; @@ -688,7 +688,7 @@ void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, } void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, - u8 subsystem, u8 opcode, int cmd_len) + u8 subsystem, u8 opcode, u32 cmd_len) { req_hdr->opcode = opcode; req_hdr->subsystem = subsystem; |