lkml.org 
[lkml]   [2014]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net-next] r8152: use mutex for hw settings
Date
 David Miller [mailto:davem@davemloft.net] 
> Sent: Thursday, October 09, 2014 3:45 AM
[..]
> I think a much simpler fix is to take rtnl_lock() in the workqueue
> function and suspend/resume ops.
>
> Every other place you are adding the mutex already holds the RTNL
> mutex.

If I use the rtnl_lock(), I get a dead lock when enabling autosuspend.

Case 1:
autosuspend before calling open.
rtnl_lock()
call open
try to autoresume and rtl8152_resume is called.
dead lock occurs.

Case 2:
autosuspend occurs.
rtnl_lock()
call close
try to autoresume and rtl8152_resume is called.
dead lock occurs.

Best Regards,
Hayes


\
 
 \ /
  Last update: 2014-10-09 10:41    [W:0.068 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site