From: Colin King <colin.king@canonical.com>
To: Daniel Vetter <daniel.vetter@intel.com>,
Jani Nikula <jani.nikula@linux.intel.com>,
Sean Paul <seanpaul@chromium.org>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org,
Al Viro <viro@zeniv.linux.org.uk>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][drm-next] drm compat: ensure mode in drm_agp_info is being copied
Date: Tue, 4 Jul 2017 17:48:21 +0100 [thread overview]
Message-ID: <20170704164822.20177-1-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
A recent compat change removed the copying of i32.mode from info.mode.
Add it back in to fix this removal as we currently are leaking information
from the stack.
Detected by CoverityScan, CID#1449374 ("Unitialized scalar variable")
Fixes: 2337f2272ee1 ("compat_drm: switch AGP compat ioctls to drm_ioctl_kernel()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/drm_ioc32.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index 340eccfe35a1..94acf5109235 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -648,6 +648,7 @@ static int compat_drm_agp_info(struct file *file, unsigned int cmd,
i32.agp_version_major = info.agp_version_major;
i32.agp_version_minor = info.agp_version_minor;
+ i32.mode = info.mode;
i32.aperture_base = info.aperture_base;
i32.aperture_size = info.aperture_size;
i32.memory_allowed = info.memory_allowed;
--
2.11.0
next reply other threads:[~2017-07-04 16:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-04 16:48 Colin King [this message]
2017-07-04 17:36 ` Al Viro
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=20170704164822.20177-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=seanpaul@chromium.org \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®