linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Jouni Malinen <j@w1.fi>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Fix mesh estab_plinks counting in STA removal case
Date: Tue, 21 Jun 2016 18:29:53 -0400	[thread overview]
Message-ID: <20160621222953.GB7271@localhost> (raw)
In-Reply-To: <20160621222602.GA7271@localhost>

On Tue, Jun 21, 2016 at 06:26:02PM -0400, Bob Copeland wrote:
> Looks further buggy, so perhaps this untested patch would work, i.e.
                                       ^^^^^^^^ (still)

> @@ -370,13 +372,19 @@ u32 mesh_plink_deactivate(struct sta_info *sta)
>  
>  	spin_lock_bh(&sta->mesh->plink_lock);
>  	changed = __mesh_plink_deactivate(sta);
> -	sta->mesh->reason = WLAN_REASON_MESH_PEER_CANCELED;
> -	mesh_plink_frame_tx(sdata, sta, WLAN_SP_MESH_PEERING_CLOSE,
> -			    sta->sta.addr, sta->mesh->llid, sta->mesh->plid,
> -			    sta->mesh->reason);
> +
> +	if (sdata->u.mesh.user_mpm) {

should be !sdata->u.mesh.user_mpm :)

> +		sta->mesh->reason = WLAN_REASON_MESH_PEER_CANCELED;
> +		mesh_plink_frame_tx(sdata, sta, WLAN_SP_MESH_PEERING_CLOSE,
> +				    sta->sta.addr, sta->mesh->llid, sta->mesh->plid,
> +				    sta->mesh->reason);
> +	}
>  	spin_unlock_bh(&sta->mesh->plink_lock);
>  	mesh_path_flush_by_nexthop(sta);
>  
> +	/* make sure no readers can access nexthop sta from here on */
> +	synchronize_net();
> +
>  	return changed;
>  }
>  
> -- 
> 2.9.0
> 

-- 
Bob Copeland %% http://bobcopeland.com/

  reply	other threads:[~2016-06-21 22:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-19 20:51 [PATCH] mac80211: Fix mesh estab_plinks counting in STA removal case Jouni Malinen
2016-06-21 19:09 ` Johannes Berg
2016-06-21 22:26   ` Bob Copeland
2016-06-21 22:29     ` Bob Copeland [this message]
2016-06-28 10:40 ` Johannes Berg

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=20160621222953.GB7271@localhost \
    --to=me@bobcopeland.com \
    --cc=j@w1.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).