[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0835B3720019904CB8F7AA43166CEEB2EC397B@RTITMBSTEMP01.realtek.com.tw>
Date: Thu, 9 Oct 2014 07:59:35 +0000
From: Hayes Wang <hayeswang@...ltek.com>
To: David Miller <davem@...emloft.net>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
nic_swsd <nic_swsd@...ltek.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: RE: [PATCH net-next] r8152: use mutex for hw settings
David Miller [mailto:davem@...emloft.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists