On Fri, 18 Aug 2017 16:21:46 +
Bart Van Assche wrote:
> Sorry Waiman but personally I thoroughly detest loops around mutex_trylock()
> or
> mutex_timed_lock() because such loops are usually used to paper over a problem
> instead of fixing the root cause.
100% agree.
-- Steve
On 08/18/2017 12:21 PM, Bart Van Assche wrote:
> On Fri, 2017-08-18 at 09:55 -0400, Waiman Long wrote:
>> On 08/17/2017 05:30 PM, Steven Rostedt wrote:
>>> On Thu, 17 Aug 2017 17:10:07 -0400
>>> Steven Rostedt wrote:
Instead of playing games with taking the lock, the only way this race
i
On Fri, 2017-08-18 at 09:55 -0400, Waiman Long wrote:
> On 08/17/2017 05:30 PM, Steven Rostedt wrote:
> > On Thu, 17 Aug 2017 17:10:07 -0400
> > Steven Rostedt wrote:
> > > Instead of playing games with taking the lock, the only way this race
> > > is hit, is if the partition is being deleted and
On 08/17/2017 05:30 PM, Steven Rostedt wrote:
> On Thu, 17 Aug 2017 17:10:07 -0400
> Steven Rostedt wrote:
>
>
>> Instead of playing games with taking the lock, the only way this race
>> is hit, is if the partition is being deleted and the sysfs attribute is
>> being read at the same time, correct
On 08/17/2017 07:23 PM, Steven Rostedt wrote:
> On Thu, 17 Aug 2017 18:18:18 -0400
> Steven Rostedt wrote:
>
>> On Thu, 17 Aug 2017 18:13:20 -0400
>> Steven Rostedt wrote:
>>
>>> On Thu, 17 Aug 2017 17:27:22 -0400
>>> Waiman Long wrote:
>>>
>>>
It is actually what the patch is trying to
On Thu, 17 Aug 2017 18:18:18 -0400
Steven Rostedt wrote:
> On Thu, 17 Aug 2017 18:13:20 -0400
> Steven Rostedt wrote:
>
> > On Thu, 17 Aug 2017 17:27:22 -0400
> > Waiman Long wrote:
> >
> >
> > > It is actually what the patch is trying to do by checking for the
> > > deletion flag in the m
On Thu, 17 Aug 2017 18:13:20 -0400
Steven Rostedt wrote:
> On Thu, 17 Aug 2017 17:27:22 -0400
> Waiman Long wrote:
>
>
> > It is actually what the patch is trying to do by checking for the
> > deletion flag in the mutex_trylock loop. Please note that mutex does not
> > guarantee FIFO ordering
On Thu, 17 Aug 2017 17:27:22 -0400
Waiman Long wrote:
> It is actually what the patch is trying to do by checking for the
> deletion flag in the mutex_trylock loop. Please note that mutex does not
> guarantee FIFO ordering of lock acquisition. As a result, cpu1 may call
> mutex_lock() and wait f
On Thu, 17 Aug 2017 17:10:07 -0400
Steven Rostedt wrote:
> Instead of playing games with taking the lock, the only way this race
> is hit, is if the partition is being deleted and the sysfs attribute is
> being read at the same time, correct? In that case, just return
> -ENODEV, and be done with
On 08/17/2017 05:10 PM, Steven Rostedt wrote:
> On Thu, 17 Aug 2017 12:24:39 -0400
> Waiman Long wrote:
>
+ * sysfs file and then acquiring the bd_mutex. Deleting a block device
+ * requires acquiring the bd_mutex and then waiting for all the sysfs
+ * references to be gone. This ca
On Thu, 17 Aug 2017 12:24:39 -0400
Waiman Long wrote:
> >> + * sysfs file and then acquiring the bd_mutex. Deleting a block device
> >> + * requires acquiring the bd_mutex and then waiting for all the sysfs
> >> + * references to be gone. This can lead to deadlock if both operations
> >> + * happ
On Thu, 17 Aug 2017 20:41:10 +
Bart Van Assche wrote:
> On Thu, 2017-08-17 at 16:30 -0400, Steven Rostedt wrote:
> > On Thu, 17 Aug 2017 12:24:39 -0400
> > Waiman Long wrote:
> >
> > > On 08/17/2017 09:34 AM, Steven Rostedt wrote:
> > > > On Wed, 16 Aug 2017 16:40:40 -0400
> > > > Waima
On Thu, 2017-08-17 at 16:30 -0400, Steven Rostedt wrote:
> On Thu, 17 Aug 2017 12:24:39 -0400
> Waiman Long wrote:
>
> > On 08/17/2017 09:34 AM, Steven Rostedt wrote:
> > > On Wed, 16 Aug 2017 16:40:40 -0400
> > > Waiman Long wrote:
> > >
> > > > The lockdep code had reported the following uns
On Thu, 17 Aug 2017 12:24:39 -0400
Waiman Long wrote:
> On 08/17/2017 09:34 AM, Steven Rostedt wrote:
> > On Wed, 16 Aug 2017 16:40:40 -0400
> > Waiman Long wrote:
> >
> >> The lockdep code had reported the following unsafe locking scenario:
> >>
> >>CPU0CPU1
> >>
On 08/17/2017 09:34 AM, Steven Rostedt wrote:
> On Wed, 16 Aug 2017 16:40:40 -0400
> Waiman Long wrote:
>
>> The lockdep code had reported the following unsafe locking scenario:
>>
>>CPU0CPU1
>>
>> lock(s_active#228);
>>
On Wed, 16 Aug 2017 16:40:40 -0400
Waiman Long wrote:
> The lockdep code had reported the following unsafe locking scenario:
>
>CPU0CPU1
>
> lock(s_active#228);
>lock(&bdev->bd_mutex/1);
>
The lockdep code had reported the following unsafe locking scenario:
CPU0CPU1
lock(s_active#228);
lock(&bdev->bd_mutex/1);
lock(s_active#228);
lock(&bdev->bd_mutex);
*
17 matches
Mail list logo