Bugzilla – Attachment 661373 Details for
Bug 961439
xserver: busfault handler corrupts memory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
fix.
u_busfault_sigaction-Only-initialize-pointer-when-matched.patch (text/plain), 1.43 KB, created by
Egbert Eich
on 2016-01-11 21:46:20 UTC
(
hide
)
Description:
fix.
Filename:
MIME Type:
Creator:
Egbert Eich
Created:
2016-01-11 21:46:20 UTC
Size:
1.43 KB
patch
obsolete
>From: Egbert Eich <eich@suse.de> >Date: Mon Jan 11 21:48:15 2016 +0100 >Subject: [PATCH]busfault_sigaction: Only initialize pointer when matched >Patch-mainline: to be upstreamed > >References: boo# >Signed-off-by: Egbert Eich <eich@suse.com> > >When looping over the registered map ranges, don't use >the variable holding the final result as loop variable - >It would always be initialized, on an empty list or >when we run past the end of the list when no entry was >found. > >Signed-off-by: Egbert Eich <eich@suse.de> >--- > os/busfault.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/os/busfault.c b/os/busfault.c >index d4afa6d..53f02e6 100644 >--- a/os/busfault.c >+++ b/os/busfault.c >@@ -98,13 +98,15 @@ static void > busfault_sigaction(int sig, siginfo_t *info, void *param) > { > void *fault = info->si_addr; >- struct busfault *busfault = NULL; >+ struct busfault *tmp, *busfault = NULL; > void *new_addr; > > /* Locate the faulting address in our list of shared segments > */ >- xorg_list_for_each_entry(busfault, &busfaults, list) { >- if ((char *) busfault->addr <= (char *) fault && (char *) fault < (char *) busfault->addr + busfault->size) { >+ xorg_list_for_each_entry(tmp, &busfaults, list) { >+ if ((char *) tmp->addr <= (char *) fault && >+ (char *) fault < (char *) tmp->addr + tmp->size) { >+ busfault = tmp; > break; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 961439
: 661373