From e5e4531049c98b139aa963051083d45476a3983c Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 25 May 2017 02:11:06 +0000 Subject: [PATCH] iscsi-scst: cleanup There's no need to end-align the padding. Plus, it's not optimal to access front misaligned memory Reported-by: David Butterfield git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7195 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/nthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index 5e0bf81b8..082418e74 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -1695,7 +1695,7 @@ static int tx_padding(struct iscsi_cmnd *cmnd, int state) TRACE_DBG("Sending %d padding bytes (cmd %p)", rest, cmnd); - iov.iov_base = (char *)(&padding) + (sizeof(uint32_t) - rest); + iov.iov_base = (char *)&padding; iov.iov_len = rest; res = kernel_sendmsg(cmnd->conn->sock, &msg, &iov, 1, rest);