[PATCH 13/47] staging/lustre/gss: fix uninitialized variable

From: Oleg Drokin
Date: Sun Apr 27 2014 - 13:22:48 EST


From: Dmitry Eremin <dmitry.eremin@xxxxxxxxx>

'sg->page_link' is used uninitialized in many functions.

Signed-off-by: Dmitry Eremin <dmitry.eremin@xxxxxxxxx>
Reviewed-on: http://review.whamcloud.com/9325
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629
Reviewed-by: James Simmons <uja.ornl@xxxxxxxxx>
Reviewed-by: John L. Hammond <john.hammond@xxxxxxxxx>
Signed-off-by: Oleg Drokin <oleg.drokin@xxxxxxxxx>
---
drivers/staging/lustre/lustre/ptlrpc/gss/gss_krb5_mech.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/gss/gss_krb5_mech.c b/drivers/staging/lustre/lustre/ptlrpc/gss/gss_krb5_mech.c
index d03f6c1..2cc78b0 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/gss/gss_krb5_mech.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/gss/gss_krb5_mech.c
@@ -525,6 +525,7 @@ void gss_delete_sec_context_kerberos(void *internal_ctx)
static
void buf_to_sg(struct scatterlist *sg, void *ptr, int len)
{
+ sg_init_table(sg, 1);
sg_set_buf(sg, ptr, len);
}

--
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/