lkml.org 
[lkml]   [2008]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] bluetooth : __rfcomm_dlc_close lock fix
From
From: Dave Young <hidave.darkstar@gmail.com>
Date: Wed, 2 Apr 2008 14:02:43 +0800

> Lockdep warning will be trigged while rfcomm connection closing.
>
> The locks taken in rfcomm_dev_add:
> rfcomm_dev_lock --> d->lock
>
> In __rfcomm_dlc_close:
> d->lock --> rfcomm_dev_lock (in rfcomm_dev_state_change)
>
> There's two way to fix it, one is in rfcomm_dev_add we first locking
> d->lock then the rfcomm_dev_lock
>
> The other (in this patch), remove the locking of d->lock for
> rfcomm_dev_state_change because just locking "d->state = BT_CLOSED;"
> is enough.

Also applied, thanks a lot Dave!


\
 
 \ /
  Last update: 2008-04-02 09:03    [W:0.034 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site