Sourceware Bugzilla – Attachment 6222 Details for
Bug 13690
pthread_mutex_unlock potentially cause invalid access
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
a patch to fix only lll_unlock,lll_robust_unlock call in pthread_mutex_unlock
0001-pthread_mutex_unlock-pass-down-private-as-a-local-va.patch (text/plain), 1.54 KB, created by
Atsushi Nemoto
on 2012-02-16 14:39:24 UTC
(
hide
)
Description:
a patch to fix only lll_unlock,lll_robust_unlock call in pthread_mutex_unlock
Filename:
MIME Type:
Creator:
Atsushi Nemoto
Created:
2012-02-16 14:39:24 UTC
Size:
1.54 KB
patch
obsolete
>From b3596e31a43a88841c71d0bcba6ef9b8b41e8a47 Mon Sep 17 00:00:00 2001 >From: Atsushi Nemoto <anemo@mba.ocn.ne.jp> >Date: Thu, 16 Feb 2012 23:07:28 +0900 >Subject: [PATCH] pthread_mutex_unlock: pass down private as a local variable to lll_unlock > >2012-02-16 Atsushi Nemoto <anemo@mba.ocn.ne.jp> > > [BZ 13690] > * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt) > (__pthread_mutex_unlock_full): pass down private as a copy of > local variable to lll_unlock and lll_robust_unlock. >--- > nptl/pthread_mutex_unlock.c | 7 ++++--- > 1 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c >index f9fe10b..fdb35a4 100644 >--- a/nptl/pthread_mutex_unlock.c >+++ b/nptl/pthread_mutex_unlock.c >@@ -49,7 +49,8 @@ __pthread_mutex_unlock_usercnt (mutex, decr) > --mutex->__data.__nusers; > > /* Unlock. */ >- lll_unlock (mutex->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)); >+ int private = PTHREAD_MUTEX_PSHARED (mutex); >+ lll_unlock (mutex->__data.__lock, private); > return 0; > } > else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1)) >@@ -136,8 +137,8 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr) > --mutex->__data.__nusers; > > /* Unlock. */ >- lll_robust_unlock (mutex->__data.__lock, >- PTHREAD_ROBUST_MUTEX_PSHARED (mutex)); >+ int private = PTHREAD_ROBUST_MUTEX_PSHARED (mutex); >+ lll_robust_unlock (mutex->__data.__lock, private); > > THREAD_SETMEM (THREAD_SELF, robust_head.list_op_pending, NULL); > break; >-- >1.7.0.4 >
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 13690
: 6222 |
7653