From: Michael Buesch <mb@bu3sch.de>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Hin-Tak Leung <hintak.leung@gmail.com>,
herton Ronaldo Krzesinski <herton@mandriva.com.br>,
Pavel Roskin <proski@gnu.org>,
wireless <linux-wireless@vger.kernel.org>
Subject: Re: [RFC/RFT] rtl8187: Protect the config callback from mac80211 with a mutex
Date: Wed, 30 Jul 2008 15:27:26 +0200 [thread overview]
Message-ID: <200807301527.26432.mb@bu3sch.de> (raw)
In-Reply-To: <200807301524.40411.mb@bu3sch.de>
On Wednesday 30 July 2008 15:24:40 Michael Buesch wrote:
> On Wednesday 30 July 2008 08:12:36 Larry Finger wrote:
> > Herton,
> >
> > Does this patch help your problem? I haven't done much testing, but things seem
> > to be better with it here.
> >
> > Larry
> >
> > ==================
> >
> > Some users of the RTL8187B have experienced difficulties since commit
> > 8f87dd7e540d455f8e7f11478133b85edc969c67 that introduced the power
> > management wext hooks. This difficulty has not made much sense until
> > it was realized that it was possible for mac80211 to make a call to the
> > config routine while that routine was already being executed. This patch
> > protects the critical section with a mutex.
> >
> > Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> > ---
> >
> > Index: wireless-testing/drivers/net/wireless/rtl8187.h
> > ===================================================================
> > --- wireless-testing.orig/drivers/net/wireless/rtl8187.h
> > +++ wireless-testing/drivers/net/wireless/rtl8187.h
> > @@ -94,6 +94,7 @@ struct rtl8187_priv {
> > const struct rtl818x_rf_ops *rf;
> > struct ieee80211_vif *vif;
> > int mode;
> > + struct mutex mutex; /* used to lock config callback */
>
> Well, hm.
> Using locks to protect code is a bad idea, most of the time.
> So that comment makes no sense.
>
> What that lock _probably_ does it to protect the configuration
> data in struct rtl8187_priv. So you'd better find out which data
> that is and clarify the comment.
and the mutex name, of course.
/* Mutex to protect the device configuration data,
* which is foobar and bizzbaz */
struct mutex conf_mutex;
--
Greetings Michael.
next prev parent reply other threads:[~2008-07-30 13:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 6:12 [RFC/RFT] rtl8187: Protect the config callback from mac80211 with a mutex Larry Finger
2008-07-30 13:24 ` Michael Buesch
2008-07-30 13:27 ` Michael Buesch [this message]
2008-07-30 14:53 ` Herton Ronaldo Krzesinski
2008-07-30 15:02 ` Michael Buesch
2008-07-30 16:08 ` Herton Ronaldo Krzesinski
2008-07-30 16:16 ` Michael Buesch
2008-07-30 17:13 ` Herton Ronaldo Krzesinski
2008-07-30 17:31 ` Larry Finger
2008-07-30 17:46 ` Michael Buesch
2008-07-30 18:11 ` Herton Ronaldo Krzesinski
2008-07-30 18:41 ` Michael Buesch
2008-07-30 19:26 ` Hin-Tak Leung
2008-07-30 13:27 ` Herton Ronaldo Krzesinski
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=200807301527.26432.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=Larry.Finger@lwfinger.net \
--cc=herton@mandriva.com.br \
--cc=hintak.leung@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=proski@gnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.