linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Anton Vorontsov <anton.vorontsov@linaro.org>, linux-mm@kvack.org
Subject: [PATCH 1/2] vmevent: don't leak unitialized data to userspace
Date: Wed, 23 May 2012 09:27:58 +0200	[thread overview]
Message-ID: <201205230927.58802.b.zolnierkie@samsung.com> (raw)

From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: [PATCH] vmevent: don't leak unitialized data to userspace

Remember to initialize all attrs[nr] fields in vmevent_setup_watch().

Cc: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 mm/vmevent.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: b/mm/vmevent.c
===================================================================
--- a/mm/vmevent.c	2012-05-22 17:51:13.195231958 +0200
+++ b/mm/vmevent.c	2012-05-22 17:51:40.991231956 +0200
@@ -350,7 +350,10 @@
 
 		attrs = new;
 
-		attrs[nr++].type = attr->type;
+		attrs[nr].type = attr->type;
+		attrs[nr].value = 0;
+		attrs[nr].state = 0;
+		nr++;
 	}
 
 	watch->sample_attrs	= attrs;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2012-05-23  7:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23  7:27 Bartlomiej Zolnierkiewicz [this message]
2012-05-25  7:17 ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201205230927.58802.b.zolnierkie@samsung.com \
    --to=b.zolnierkie@samsung.com \
    --cc=anton.vorontsov@linaro.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox