* [PATCH] vfio: platform: remove needless stack usage
@ 2015-11-20 0:17 Kees Cook
0 siblings, 0 replies; only message in thread
From: Kees Cook @ 2015-11-20 0:17 UTC (permalink / raw)
To: linux-kernel
Cc: Baptiste Reynal, Alex Williamson, Eric Auger, Arnd Bergmann, kvm
request_module already takes format strings, so no need to duplicate
the effort.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/vfio/platform/vfio_platform_common.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c
index a1c50d630792..418cdd9ba3f4 100644
--- a/drivers/vfio/platform/vfio_platform_common.c
+++ b/drivers/vfio/platform/vfio_platform_common.c
@@ -51,13 +51,10 @@ static vfio_platform_reset_fn_t vfio_platform_lookup_reset(const char *compat,
static void vfio_platform_get_reset(struct vfio_platform_device *vdev)
{
- char modname[256];
-
vdev->reset = vfio_platform_lookup_reset(vdev->compat,
&vdev->reset_module);
if (!vdev->reset) {
- snprintf(modname, 256, "vfio-reset:%s", vdev->compat);
- request_module(modname);
+ request_module("vfio-reset:%s", vdev->compat);
vdev->reset = vfio_platform_lookup_reset(vdev->compat,
&vdev->reset_module);
}
--
1.9.1
--
Kees Cook
Chrome OS Security
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-20 0:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20 0:17 [PATCH] vfio: platform: remove needless stack usage Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).