DivestOS/Patches/Linux_CVEs/CVE-2017-0651/ANY/0001.patch

27 lines
754 B
Diff
Raw Normal View History

2017-10-29 22:14:37 -04:00
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index b4ef711..9a8000e 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -871,6 +871,7 @@
struct ion_device *dev = p->dev;
struct rb_node *n;
struct ion_debugfs_handle_header header;
+ struct ion_debugfs_handle_entry entry;
header.version = 1;
/*
@@ -883,11 +884,12 @@
if (seq_write(s, &header, sizeof(header)))
return 0;
+ memset(&entry, 0, sizeof(entry));
+
mutex_lock(&dev->buffer_lock);
for (n = rb_first(&dev->buffers); n; n = rb_next(n)) {
struct ion_buffer *buffer = rb_entry(n, struct ion_buffer,
node);
- struct ion_debugfs_handle_entry entry;
if (buffer->pid != p->pid)
continue;