From: Hayes Wang <hayeswang@realtek.com>
To: David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
nic_swsd <nic_swsd@realtek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: RE: [PATCH net-next] r8152: use mutex for hw settings
Date: Thu, 9 Oct 2014 07:59:35 +0000 [thread overview]
Message-ID: <0835B3720019904CB8F7AA43166CEEB2EC397B@RTITMBSTEMP01.realtek.com.tw> (raw)
In-Reply-To: <20141008.154513.1944594723904521723.davem@davemloft.net>
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
next prev parent reply other threads:[~2014-10-09 8:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 5:36 Hayes Wang
2014-10-08 19:45 ` David Miller
2014-10-09 7:59 ` Hayes Wang [this message]
2014-10-09 23:05 ` David Miller
2014-10-09 6:24 ` [PATCH net-next] r8152: add rtnl_lock Hayes Wang
2014-10-09 7:59 ` Hayes Wang
2014-10-09 10:00 ` [PATCH net-next v2 0/3] r8152: use mutex for hw settings Hayes Wang
2014-10-09 10:00 ` [PATCH net-next v2 1/3] r8152: autoresume before setting feature Hayes Wang
2014-10-09 10:00 ` [PATCH net-next v2 2/3] r8152: adjust usb_autopm_xxx Hayes Wang
2014-10-09 10:00 ` [PATCH net-next v2 3/3] r8152: add mutex for hw settings Hayes Wang
2014-10-09 23:06 ` [PATCH net-next v2 0/3] r8152: use " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0835B3720019904CB8F7AA43166CEEB2EC397B@RTITMBSTEMP01.realtek.com.tw \
--to=hayeswang@realtek.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome