Commit 6e18f688 authored by Steve French's avatar Steve French Committed by Steve French

[CIFS] zero more of SMB param area on SMB allocation

Signed-off-by: Steve French (sfrench@us.ibm.com)
parent 810d5a02
......@@ -880,6 +880,8 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon,
pSMB->Fid = netfid;
pSMB->OffsetLow = cpu_to_le32(offset & 0xFFFFFFFF);
pSMB->OffsetHigh = cpu_to_le32(offset >> 32);
pSMB->Reserved = 0xFFFFFFFF;
pSMB->WriteMode = 0;
pSMB->Remaining = 0;
bytes_sent = (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & ~0xFF;
if (bytes_sent > count)
......
......@@ -163,10 +163,10 @@ cifs_buf_get(void)
(struct smb_hdr *) mempool_alloc(cifs_req_poolp, SLAB_KERNEL | SLAB_NOFS);
/* clear the first few header bytes */
/* clear through bcc + 1, making an even 40 bytes */
/* clear through bcc + 1, making an even 0x40 bytes */
if (ret_buf) {
memset(ret_buf, 0, sizeof(struct smb_hdr) + 3 );
memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);
atomic_inc(&bufAllocCount);
}
......@@ -201,9 +201,9 @@ cifs_small_buf_get(void)
(struct smb_hdr *) mempool_alloc(cifs_sm_req_poolp, SLAB_KERNEL | SLAB_NOFS);
/* clear the first few header bytes */
/* clear through bcc + 1, making an even 40 bytes */
/* clear through bcc + 1, making an even 0x40 bytes */
if (ret_buf) {
memset(ret_buf, 0, sizeof(struct smb_hdr) + 3);
memset(ret_buf, 0, sizeof(struct smb_hdr) + 27);
atomic_inc(&smBufAllocCount);
}
......
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