Re: [PATCH] Bluetooth: Remove old unused lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

On Mon, Jan 23, 2012 at 7:19 AM, Marcel Holtmann <marcel@xxxxxxxxxxxx> wrote:
> Hi Andrei,
>
>> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>
>> ---
>>  include/net/bluetooth/l2cap.h |    1 -
>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
>> index f6d5134..c21e37a 100644
>> --- a/include/net/bluetooth/l2cap.h
>> +++ b/include/net/bluetooth/l2cap.h
>> @@ -544,7 +544,6 @@ struct l2cap_conn {
>>       struct smp_chan *smp_chan;
>>
>>       struct list_head chan_l;
>> -     struct mutex    chan_lock;
>>  };
>>
>>  #define L2CAP_INFO_CL_MTU_REQ_SENT   0x01
>
> so if this one is not used, how do we protect any changes at all. I am
> kinda nervous now that our L2CAP is broken. Please start looking into
> fixing this and send a patch series that I can review as a whole and see
> how it progresses.

It seems this lock was protecting the list of l2cap_chan before the
changes to use RCU. I'm failing to see why we don't need some sort of
mutual exclusion among writers e.g. if all callers hold some lock that
already exclude the others. IMO we might need to have a lock/unlock of
conn->chan_lock around list_add_rcu and list_del_rcu calls but Padovan
might clarify this better as he did the changes.

Regards,

-- 
Ulisses Furquim
ProFUSION embedded systems
http://profusion.mobi
Mobile: +55 19 9250 0942
Skype: ulissesffs
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux