diff --git a/u_kdrive-UnregisterFd-Fix-off-by-one.patch b/U_kdrive-UnregisterFd-Fix-off-by-one.patch similarity index 100% rename from u_kdrive-UnregisterFd-Fix-off-by-one.patch rename to U_kdrive-UnregisterFd-Fix-off-by-one.patch diff --git a/u_busfault_sigaction-Only-initialize-pointer-when-matched.patch b/u_busfault_sigaction-Only-initialize-pointer-when-matched.patch new file mode 100644 index 0000000..09a961e --- /dev/null +++ b/u_busfault_sigaction-Only-initialize-pointer-when-matched.patch @@ -0,0 +1,42 @@ +From: Egbert Eich +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#961439 +Signed-off-by: Egbert Eich + +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 +--- + 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; + } + } diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 2b550a4..ed69fc7 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jan 11 21:48:00 UTC 2016 - eich@suse.com + +- u_busfault_sigaction-Only-initialize-pointer-when-matched.patch + Only initialize pointer when matched (boo#961439). +- u_kdrive-UnregisterFd-Fix-off-by-one.patch -> + U_kdrive-UnregisterFd-Fix-off-by-one.patch + ------------------------------------------------------------------- Sun Jan 10 18:59:29 UTC 2016 - eich@suse.com diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 492db15..47ee016 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -181,7 +181,8 @@ Patch117: xorg-x11-server-byte-order.patch Patch160: u_vesa-Add-VBEDPMSGetCapabilities-VBEDPMSGet.patch Patch204: U_systemd-logind-do-not-rely-on-directed-signals.patch -Patch205: u_kdrive-UnregisterFd-Fix-off-by-one.patch +Patch205: U_kdrive-UnregisterFd-Fix-off-by-one.patch +Patch206: u_busfault_sigaction-Only-initialize-pointer-when-matched.patch Patch1000: n_xserver-optimus-autoconfig-hack.patch @@ -288,6 +289,7 @@ cp %{SOURCE90} . %patch204 -p1 %patch205 -p1 +%patch206 -p1 %patch1000 -p1