[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4e923bea-0e3b-ba50-c45c-f7b281a29176@redhat.com>
Date: Thu, 28 Mar 2019 16:55:34 -0400
From: Waiman Long <longman@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Will Deacon <will.deacon@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
the arch/x86 maintainers <x86@...nel.org>,
Davidlohr Bueso <dave@...olabs.net>,
Tim Chen <tim.c.chen@...ux.intel.com>
Subject: Re: [PATCH 12/12] locking/rwsem: Make MSbit of count as guard bit to
fail readlock
On 03/28/2019 04:47 PM, Linus Torvalds wrote:
> On Thu, Mar 28, 2019 at 11:12 AM Waiman Long <longman@...hat.com> wrote:
>> With the merging of owner into count for x86-64, there is only 16 bits
>> left for reader count. It is theoretically possible for an application to
>> cause more than 64k readers to acquire a rwsem leading to count overflow.
> Ahh, and here's the thing that makes 16 bits work for readers.
>
> I think this at a minimum needs to be made very clear in the patch
> that actually lowered the reader count bits, but preferably this just
> needs to be done *before* that patch, so that you don't have a point
> in history where rwlocks are simply not reliable.
>
> Linus
Thanks for the suggestion. I will move this patch up in the next version.
Cheers,
Longman
Powered by blists - more mailing lists