Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 278331 Details for
Bug 408321
Process control signals cause pthread_cond_timedwait to return ETIMEDOUT
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to fix stack corruption in futex code
futex-stack-signal-fix.patch (text/plain), 2.65 KB, created by
Steven Rostedt
on 2007-12-05 14:24:19 UTC
(
hide
)
Description:
patch to fix stack corruption in futex code
Filename:
MIME Type:
Creator:
Steven Rostedt
Created:
2007-12-05 14:24:19 UTC
Size:
2.65 KB
patch
obsolete
> include/linux/thread_info.h | 15 ++++++++++++++- > kernel/futex.c | 25 +++++++++++++------------ > 2 files changed, 27 insertions(+), 13 deletions(-) > >Index: linux-2.6.21-rt-hack/include/linux/thread_info.h >=================================================================== >--- linux-2.6.21-rt-hack.orig/include/linux/thread_info.h >+++ linux-2.6.21-rt-hack/include/linux/thread_info.h >@@ -7,12 +7,25 @@ > #ifndef _LINUX_THREAD_INFO_H > #define _LINUX_THREAD_INFO_H > >+#include <linux/types.h> >+ > /* > * System call restart block. > */ > struct restart_block { > long (*fn)(struct restart_block *); >- unsigned long arg0, arg1, arg2, arg3; >+ union { >+ struct { >+ unsigned long arg0, arg1, arg2, arg3; >+ }; >+ /* For futex_wait */ >+ struct { >+ u32 *uaddr; >+ u32 val; >+ u32 flags; >+ u64 time; >+ } fu; >+ }; > }; > > extern long do_no_restart_syscall(struct restart_block *parm); >Index: linux-2.6.21-rt-hack/kernel/futex.c >=================================================================== >--- linux-2.6.21-rt-hack.orig/kernel/futex.c >+++ linux-2.6.21-rt-hack/kernel/futex.c >@@ -1414,9 +1414,9 @@ static int fixup_pi_state_owner(u32 __us > > /* > * In case we must use restart_block to restart a futex_wait, >- * we encode in the 'arg3' shared capability >+ * we encode in the 'flags' shared capability > */ >-#define ARG3_SHARED 1 >+#define FLAGS_SHARED 1 > > static long futex_wait_restart(struct restart_block *restart); > >@@ -1630,12 +1630,13 @@ static int futex_wait(u32 __user *uaddr, > struct restart_block *restart; > restart = ¤t_thread_info()->restart_block; > restart->fn = futex_wait_restart; >- restart->arg0 = (unsigned long)uaddr; >- restart->arg1 = (unsigned long)val; >- restart->arg2 = (unsigned long)abs_time; >- restart->arg3 = 0; >+ restart->fu.uaddr = (u32*)uaddr; >+ restart->fu.val = val; >+ restart->fu.time = abs_time->tv64; >+ restart->fu.flags = 0; >+ > if (fshared) >- restart->arg3 |= ARG3_SHARED; >+ restart->fu.flags |= FLAGS_SHARED; > return -ERESTART_RESTARTBLOCK; > } > >@@ -1650,15 +1651,15 @@ static int futex_wait(u32 __user *uaddr, > > static long futex_wait_restart(struct restart_block *restart) > { >- u32 __user *uaddr = (u32 __user *)restart->arg0; >- u32 val = (u32)restart->arg1; >- ktime_t *abs_time = (ktime_t *)restart->arg2; >+ u32 __user *uaddr = (u32 __user *)restart->fu.uaddr; > struct rw_semaphore *fshared = NULL; >+ ktime_t t; > >+ t.tv64 = restart->fu.time; > restart->fn = do_no_restart_syscall; >- if (restart->arg3 & ARG3_SHARED) >+ if (restart->fu.flags & FLAGS_SHARED) > fshared = ¤t->mm->mmap_sem; >- return (long)futex_wait(uaddr, fshared, val, abs_time); >+ return (long)futex_wait(uaddr, fshared, restart->fu.val, &t); > } > >
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 408321
:
275431
| 278331