* [PATCH 1/2] mac80211: fix unbalanced locking in ieee80211_get_buffered_bc
@ 2008-06-02 15:44 Tomas Winkler
2008-06-02 15:44 ` [PATCH 2/2] mac80211: removing shadowed sband Tomas Winkler
2008-06-02 16:53 ` [PATCH 1/2] mac80211: fix unbalanced locking in ieee80211_get_buffered_bc Johannes Berg
0 siblings, 2 replies; 7+ messages in thread
From: Tomas Winkler @ 2008-06-02 15:44 UTC (permalink / raw)
To: linville, johannes, yi.zhu; +Cc: linux-wireless, Tomas Winkler
This patch fixes unbalanced locking in ieee80211_get_buffered_bc
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
net/mac80211/tx.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 16af308..8a5b24d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2008,8 +2008,10 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
break;
}
- if (WARN_ON(tx.skb != skb))
- return NULL;
+ if (WARN_ON(tx.skb != skb)) {
+ skb = NULL;
+ goto out;
+ }
if (res == TX_DROP) {
I802_DEBUG_INC(local->tx_handlers_drop);
--
1.5.4.1
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] mac80211: removing shadowed sband
2008-06-02 15:44 [PATCH 1/2] mac80211: fix unbalanced locking in ieee80211_get_buffered_bc Tomas Winkler
@ 2008-06-02 15:44 ` Tomas Winkler
2008-06-02 16:54 ` Johannes Berg
2008-06-02 16:53 ` [PATCH 1/2] mac80211: fix unbalanced locking in ieee80211_get_buffered_bc Johannes Berg
1 sibling, 1 reply; 7+ messages in thread
From: Tomas Winkler @ 2008-06-02 15:44 UTC (permalink / raw)
To: linville, johannes, yi.zhu; +Cc: linux-wireless, Tomas Winkler
This patch removes doubly defined sband variable
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
net/mac80211/tx.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8a5b24d..f857d66 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -612,7 +612,6 @@ ieee80211_tx_h_misc(struct ieee80211_tx_data *tx)
if ((info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) ||
(info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)) {
- struct ieee80211_supported_band *sband;
struct ieee80211_rate *rate;
s8 baserate = -1;
int idx;
--
1.5.4.1
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] mac80211: fix unbalanced locking in ieee80211_get_buffered_bc
2008-06-02 15:44 [PATCH 1/2] mac80211: fix unbalanced locking in ieee80211_get_buffered_bc Tomas Winkler
2008-06-02 15:44 ` [PATCH 2/2] mac80211: removing shadowed sband Tomas Winkler
@ 2008-06-02 16:53 ` Johannes Berg
2008-06-02 16:59 ` Tomas Winkler
1 sibling, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2008-06-02 16:53 UTC (permalink / raw)
To: Tomas Winkler; +Cc: linville, yi.zhu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 146 bytes --]
Good catch. However, we'll leak skb in that case, so how about:
if (WARN_ON(tx.skb != skb))
- return NULL;
+ res = TX_DROP;
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] mac80211: removing shadowed sband
2008-06-02 15:44 ` [PATCH 2/2] mac80211: removing shadowed sband Tomas Winkler
@ 2008-06-02 16:54 ` Johannes Berg
2008-06-02 17:04 ` Tomas Winkler
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2008-06-02 16:54 UTC (permalink / raw)
To: Tomas Winkler; +Cc: linville, yi.zhu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 525 bytes --]
On Mon, 2008-06-02 at 18:44 +0300, Tomas Winkler wrote:
> This patch removes doubly defined sband variable
> if ((info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) ||
> (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)) {
> - struct ieee80211_supported_band *sband;
> struct ieee80211_rate *rate;
> s8 baserate = -1;
> int idx;
I guess we can remove the double assignment too since it's the same as
already done. I must have added that when doing the mechanical tx rate
idx changes. :/
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] mac80211: fix unbalanced locking in ieee80211_get_buffered_bc
2008-06-02 16:53 ` [PATCH 1/2] mac80211: fix unbalanced locking in ieee80211_get_buffered_bc Johannes Berg
@ 2008-06-02 16:59 ` Tomas Winkler
0 siblings, 0 replies; 7+ messages in thread
From: Tomas Winkler @ 2008-06-02 16:59 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville, yi.zhu, linux-wireless
On Mon, Jun 2, 2008 at 7:53 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> Good catch. However, we'll leak skb in that case, so how about:
>
> if (WARN_ON(tx.skb != skb))
> - return NULL;
> + res = TX_DROP;
>
Looks better, will send V2.
> johannes
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] mac80211: removing shadowed sband
2008-06-02 16:54 ` Johannes Berg
@ 2008-06-02 17:04 ` Tomas Winkler
2008-06-02 17:08 ` Johannes Berg
0 siblings, 1 reply; 7+ messages in thread
From: Tomas Winkler @ 2008-06-02 17:04 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville, yi.zhu, linux-wireless
On Mon, Jun 2, 2008 at 7:54 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Mon, 2008-06-02 at 18:44 +0300, Tomas Winkler wrote:
>> This patch removes doubly defined sband variable
>
>> if ((info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) ||
>> (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)) {
>> - struct ieee80211_supported_band *sband;
>> struct ieee80211_rate *rate;
>> s8 baserate = -1;
>> int idx;
>
> I guess we can remove the double assignment too since it's the same as
> already done. I must have added that when doing the mechanical tx rate
> idx changes. :/
>
Good point. I also did only mechanical fix for the compiler warning ;)
Tomas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] mac80211: removing shadowed sband
2008-06-02 17:04 ` Tomas Winkler
@ 2008-06-02 17:08 ` Johannes Berg
0 siblings, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2008-06-02 17:08 UTC (permalink / raw)
To: Tomas Winkler; +Cc: linville, yi.zhu, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]
On Mon, 2008-06-02 at 20:04 +0300, Tomas Winkler wrote:
> On Mon, Jun 2, 2008 at 7:54 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> > On Mon, 2008-06-02 at 18:44 +0300, Tomas Winkler wrote:
> >> This patch removes doubly defined sband variable
> >
> >> if ((info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) ||
> >> (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT)) {
> >> - struct ieee80211_supported_band *sband;
> >> struct ieee80211_rate *rate;
> >> s8 baserate = -1;
> >> int idx;
> >
> > I guess we can remove the double assignment too since it's the same as
> > already done. I must have added that when doing the mechanical tx rate
> > idx changes. :/
> >
> Good point. I also did only mechanical fix for the compiler warning ;)
Heh :) Was that sparse, or do you actually get compiler warnings?
Anyhow, here's my Acked-by: Johannes Berg <johannes@sipsolutions.net>,
feel free to add to the patches right away.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-06-02 17:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-02 15:44 [PATCH 1/2] mac80211: fix unbalanced locking in ieee80211_get_buffered_bc Tomas Winkler
2008-06-02 15:44 ` [PATCH 2/2] mac80211: removing shadowed sband Tomas Winkler
2008-06-02 16:54 ` Johannes Berg
2008-06-02 17:04 ` Tomas Winkler
2008-06-02 17:08 ` Johannes Berg
2008-06-02 16:53 ` [PATCH 1/2] mac80211: fix unbalanced locking in ieee80211_get_buffered_bc Johannes Berg
2008-06-02 16:59 ` Tomas Winkler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox