All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Javier Cardona <javier@cozybit.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	Thomas Pedersen <thomas@cozybit.com>,
	devel@lists.open80211s.org, linux-wireless@vger.kernel.org,
	jlopex@gmail.com
Subject: Re: [PATCH] mac80211: Defer tranmission of mesh path errors
Date: Tue, 30 Aug 2011 20:43:33 +0200	[thread overview]
Message-ID: <1314729813.4011.43.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1314728954-22646-1-git-send-email-javier@cozybit.com> (sfid-20110830_203548_037760_20870237)

On Tue, 2011-08-30 at 11:29 -0700, Javier Cardona wrote:
> Under failure conditions, the mesh stack sends PERR messages to the
> previous sender of the failed frame.  This happens in the tx feedback
> path, in which the transmission queue lock may be taken.  Avoid a
> deadlock by sending the path error via the pending queue.
> 
> Signed-off-by: Javier Cardona <javier@cozybit.com>
> ---
>  net/mac80211/mesh_hwmp.c |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
> index fd4f76a..f760679 100644
> --- a/net/mac80211/mesh_hwmp.c
> +++ b/net/mac80211/mesh_hwmp.c
> @@ -209,6 +209,10 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
>   * @target_sn: SN of the broken destination
>   * @target_rcode: reason code for this PERR
>   * @ra: node this frame is addressed to
> + *
> + * Note: This function may be called from the tx feedback path, possibly with
> + * the transmission queue lock taken.  To avoid a deadlock we don't transmit
> + * the frame directly but add it to the pending queue instead.

I'd change that to say "with driver locks taken that the driver also
acquires in the TX path" or something like that maybe?

But that's not a big thing. Have you tested it? I'm wondering if because
we take a lock here we might run into lock dependencies issues (lockdep
would say) but I don't think so because stop_queue etc. all take the
same lock from an arbitrary driver context already.

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>

johannes


  reply	other threads:[~2011-08-30 18:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25  1:34 [PATCH] ath5k: Invoke irqsafe version of ieee80211_tx_status() to avoid deadlock Thomas Pedersen
2011-08-25  9:48 ` Bob Copeland
2011-08-26 14:22 ` John W. Linville
2011-08-29  2:07   ` Thomas Pedersen
2011-08-29 14:09     ` Bob Copeland
2011-08-29 18:13       ` Thomas Pedersen
2011-08-30 11:50         ` Bob Copeland
2011-08-30 12:18 ` Johannes Berg
2011-08-30 12:21 ` Johannes Berg
2011-08-30 16:22   ` Javier Cardona
2011-08-30 18:29   ` [PATCH] mac80211: Defer tranmission of mesh path errors Javier Cardona
2011-08-30 18:43     ` Johannes Berg [this message]
2011-08-30 21:38       ` Javier Cardona
2011-08-31  1:50         ` Javier Cardona
2011-08-31  5:11           ` Johannes Berg
2011-09-01 17:04             ` Javier Cardona
2011-09-01 17:04               ` [PATCH v2] " Javier Cardona
2011-09-02 10:59                 ` Johannes Berg
2011-09-06 19:10                   ` [PATCH v3] " Javier Cardona

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=1314729813.4011.43.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=devel@lists.open80211s.org \
    --cc=javier@cozybit.com \
    --cc=jlopex@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=thomas@cozybit.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 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.