From patchwork Mon Jan 16 13:22:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tulio Magno Quites Machado Filho X-Patchwork-Id: 18917 X-Patchwork-Delegate: azanella@linux.vnet.ibm.com Received: (qmail 41277 invoked by alias); 16 Jan 2017 13:23:35 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 40085 invoked by uid 89); 16 Jan 2017 13:23:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=HTo:U*uweigand, machado, H*MI:vnet, Machado X-HELO: mx0a-001b2d01.pphosted.com From: "Tulio Magno Quites Machado Filho" To: libc-alpha@sourceware.org, uweigand@de.ibm.com, schwab@linux-m68k.org Cc: siddhesh@sourceware.org Subject: [PATCH 2.25] powerpc: Fix adapt_count update in __lll_unlock_elision Date: Mon, 16 Jan 2017 11:22:04 -0200 In-Reply-To: <87a8axa6rt.fsf@linux-m68k.org> References: <87a8axa6rt.fsf@linux-m68k.org> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17011613-0028-0000-0000-0000018717D0 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17011613-0029-0000-0000-000014856735 Message-Id: <1484572924-6897-1-git-send-email-tuliom@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-01-16_11:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1701160203 Thanks for catching this. --- 8< --- Commit e9a96ea1aca4ebaa7c86e8b83b766f118d689d0f had an error that prevents adapt_count from being updated in __lll_unlock_elision. 2017-01-16 Tulio Magno Quites Machado Filho * sysdeps/unix/sysv/linux/powerpc/elision-unlock.c (__lll_unlock_elision): Fix adapt_count decrement. --- sysdeps/unix/sysv/linux/powerpc/elision-unlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c index 759c146..e3fe58e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c @@ -35,7 +35,7 @@ __lll_unlock_elision (int *lock, short *adapt_count, int pshared) the mutex destruction requirements. */ short __tmp = atomic_load_relaxed (adapt_count); if (__tmp > 0) - atomic_store_relaxed (adapt_count, __tmp--); + atomic_store_relaxed (adapt_count, __tmp - 1); lll_unlock ((*lock), pshared); }