FreeBSD Bugzilla – Attachment 155621 Details for
Bug 197309
ggatec broken since r238119 (ioctl(/dev/ggctl): Invalid argument)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ggatec: In g_gatec_create(), don't pass stack garbage to the kernel
ggatec-In-g_gatec_create-don-t-pass-stack-garbage.diff (text/plain), 1.09 KB, created by
Fabian Keil
on 2015-04-15 10:27:25 UTC
(
hide
)
Description:
ggatec: In g_gatec_create(), don't pass stack garbage to the kernel
Filename:
MIME Type:
Creator:
Fabian Keil
Created:
2015-04-15 10:27:25 UTC
Size:
1.09 KB
patch
obsolete
>From 0f0b081bb641bdfedce8cb4f0a9ca5088687f17b Mon Sep 17 00:00:00 2001 >From: Fabian Keil <fk@fabiankeil.de> >Date: Tue, 14 Apr 2015 19:47:57 +0200 >Subject: [PATCH] ggatec: In g_gatec_create(), don't pass stack garbage to the > kernel > >Unbreaks ggatec on i386 after r238119 which added two more >'struct g_gate_ctl_create' fields. > >While the behaviour was technically undefined on other architectures >as well, at least on my amd64 systems the uninitialized bytes the >kernel cares about were always zero so everything worked as expected. > >Reported by ota@j.email.ne.jp in FreeBSD bug #197309. > >Obtained from: ElectroBSD >--- > sbin/ggate/ggatec/ggatec.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/sbin/ggate/ggatec/ggatec.c b/sbin/ggate/ggatec/ggatec.c >index 6f9263c8..ea4f701 100644 >--- a/sbin/ggate/ggatec/ggatec.c >+++ b/sbin/ggate/ggatec/ggatec.c >@@ -447,6 +447,7 @@ g_gatec_create(void) > /* > * Ok, got both sockets, time to create provider. > */ >+ memset(&ggioc, 0, sizeof(ggioc)); > ggioc.gctl_version = G_GATE_VERSION; > ggioc.gctl_mediasize = mediasize; > ggioc.gctl_sectorsize = sectorsize; >-- >2.3.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 197309
:
152537
|
154318
| 155621