Re: [PATCH] md linear: Protecting mddev with rcu locks to avoid races in

NeilBrown
2009-06-17T06:50:13Z

On Wed, June 17, 2009 4:35 pm, SandeepKsinha wrote:
>>
>> 2/ mddev->raid_disks should really be dereferenced before 'conf'.
>>  Doing it the way you have done it, the 'raid_disks' value could be
>>  larger than the value supported by the 'conf' so things could
>>  go wrong.
>>
> Agreed. I hope you are referring to the case where a disk is in the
> process of being added to an array. Is that right ?
> Kindly confirm.

Yes, that is correct.

>> 4/ We don't need the rcu protection here as we hold ->reconfig_mutex
>>   both in linear_add and linear_stop, so they cannot race.
>>   Adding a comment to this effect might be a good idea though.
>>
>
> Fine. Shall do this as well.
>
> The new patch will follow soon.
>

Thanks!
NeilBrown