* [PATCH] iwlwifi: add missing rcu_read_lock
@ 2010-06-07 19:20 Johannes Berg
2010-06-07 21:31 ` Miles Lane
2010-06-07 21:34 ` reinette chatre
0 siblings, 2 replies; 5+ messages in thread
From: Johannes Berg @ 2010-06-07 19:20 UTC (permalink / raw)
To: John Linville; +Cc: Reinette Chatre, Wey-Yi W Guy, Miles Lane, linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
Using ieee80211_find_sta() needs to be under
RCU read lock, which iwlwifi currently misses,
so fix it.
Cc: stable@kernel.org
Reported-by: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 2 ++
1 file changed, 2 insertions(+)
--- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-agn-tx.c 2010-06-07 21:17:56.000000000 +0200
+++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-agn-tx.c 2010-06-07 21:18:04.000000000 +0200
@@ -1146,6 +1146,7 @@ static void iwlagn_tx_status(struct iwl_
struct ieee80211_sta *sta;
struct iwl_station_priv *sta_priv;
+ rcu_read_lock();
sta = ieee80211_find_sta(priv->vif, hdr->addr1);
if (sta) {
sta_priv = (void *)sta->drv_priv;
@@ -1154,6 +1155,7 @@ static void iwlagn_tx_status(struct iwl_
atomic_dec_return(&sta_priv->pending_frames) == 0)
ieee80211_sta_block_awake(priv->hw, sta, false);
}
+ rcu_read_unlock();
ieee80211_tx_status_irqsafe(priv->hw, skb);
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iwlwifi: add missing rcu_read_lock
2010-06-07 19:20 [PATCH] iwlwifi: add missing rcu_read_lock Johannes Berg
@ 2010-06-07 21:31 ` Miles Lane
2010-06-08 7:25 ` Johannes Berg
2010-06-07 21:34 ` reinette chatre
1 sibling, 1 reply; 5+ messages in thread
From: Miles Lane @ 2010-06-07 21:31 UTC (permalink / raw)
To: Johannes Berg
Cc: John Linville, Reinette Chatre, Wey-Yi W Guy, linux-wireless
On Mon, Jun 7, 2010 at 3:20 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Using ieee80211_find_sta() needs to be under
> RCU read lock, which iwlwifi currently misses,
> so fix it.
>
> Cc: stable@kernel.org
> Reported-by: Miles Lane <miles.lane@gmail.com>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-agn-tx.c 2010-06-07 21:17:56.000000000 +0200
> +++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-agn-tx.c 2010-06-07 21:18:04.000000000 +0200
> @@ -1146,6 +1146,7 @@ static void iwlagn_tx_status(struct iwl_
> struct ieee80211_sta *sta;
> struct iwl_station_priv *sta_priv;
>
> + rcu_read_lock();
> sta = ieee80211_find_sta(priv->vif, hdr->addr1);
> if (sta) {
> sta_priv = (void *)sta->drv_priv;
> @@ -1154,6 +1155,7 @@ static void iwlagn_tx_status(struct iwl_
> atomic_dec_return(&sta_priv->pending_frames) == 0)
> ieee80211_sta_block_awake(priv->hw, sta, false);
> }
> + rcu_read_unlock();
>
> ieee80211_tx_status_irqsafe(priv->hw, skb);
> }
>
>
>
Unclean patch application - is this to be expected?
patching file drivers/net/wireless/iwlwifi/iwl-agn-tx.c
Hunk #1 succeeded at 1125 (offset -21 lines).
Hunk #2 succeeded at 1134 (offset -21 lines).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iwlwifi: add missing rcu_read_lock
2010-06-07 19:20 [PATCH] iwlwifi: add missing rcu_read_lock Johannes Berg
2010-06-07 21:31 ` Miles Lane
@ 2010-06-07 21:34 ` reinette chatre
2010-06-07 22:28 ` Miles Lane
1 sibling, 1 reply; 5+ messages in thread
From: reinette chatre @ 2010-06-07 21:34 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Guy, Wey-Yi W, Miles Lane, linux-wireless
On Mon, 2010-06-07 at 12:20 -0700, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Using ieee80211_find_sta() needs to be under
> RCU read lock, which iwlwifi currently misses,
> so fix it.
>
> Cc: stable@kernel.org
> Reported-by: Miles Lane <miles.lane@gmail.com>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Reinette
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iwlwifi: add missing rcu_read_lock
2010-06-07 21:34 ` reinette chatre
@ 2010-06-07 22:28 ` Miles Lane
0 siblings, 0 replies; 5+ messages in thread
From: Miles Lane @ 2010-06-07 22:28 UTC (permalink / raw)
To: reinette chatre
Cc: Johannes Berg, John Linville, Guy, Wey-Yi W, linux-wireless
Tested. Looks good.
On Mon, Jun 7, 2010 at 5:34 PM, reinette chatre
<reinette.chatre@intel.com> wrote:
> On Mon, 2010-06-07 at 12:20 -0700, Johannes Berg wrote:
>> From: Johannes Berg <johannes.berg@intel.com>
>>
>> Using ieee80211_find_sta() needs to be under
>> RCU read lock, which iwlwifi currently misses,
>> so fix it.
>>
>> Cc: stable@kernel.org
>> Reported-by: Miles Lane <miles.lane@gmail.com>
>> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>
> Acked-by: Reinette Chatre <reinette.chatre@intel.com>
>
> Reinette
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] iwlwifi: add missing rcu_read_lock
2010-06-07 21:31 ` Miles Lane
@ 2010-06-08 7:25 ` Johannes Berg
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2010-06-08 7:25 UTC (permalink / raw)
To: Miles Lane; +Cc: John Linville, Reinette Chatre, Wey-Yi W Guy, linux-wireless
On Mon, 2010-06-07 at 17:31 -0400, Miles Lane wrote:
> > --- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-agn-tx.c 2010-06-07 21:17:56.000000000 +0200
> > +++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-agn-tx.c 2010-06-07 21:18:04.000000000 +0200
> > @@ -1146,6 +1146,7 @@ static void iwlagn_tx_status(struct iwl_
> > struct ieee80211_sta *sta;
> > struct iwl_station_priv *sta_priv;
> >
> > + rcu_read_lock();
> > sta = ieee80211_find_sta(priv->vif, hdr->addr1);
> > if (sta) {
> > sta_priv = (void *)sta->drv_priv;
> > @@ -1154,6 +1155,7 @@ static void iwlagn_tx_status(struct iwl_
> > atomic_dec_return(&sta_priv->pending_frames) == 0)
> > ieee80211_sta_block_awake(priv->hw, sta, false);
> > }
> > + rcu_read_unlock();
> >
> > ieee80211_tx_status_irqsafe(priv->hw, skb);
> > }
> >
> >
> >
>
> Unclean patch application - is this to be expected?
>
> patching file drivers/net/wireless/iwlwifi/iwl-agn-tx.c
> Hunk #1 succeeded at 1125 (offset -21 lines).
> Hunk #2 succeeded at 1134 (offset -21 lines).
Didn't pay much attention what tree I generated it against since I knew
this code hasn't changed in a while ... so the offset looks perfectly
fine. Fuzz I'd have been surprised about :)
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-08 7:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-07 19:20 [PATCH] iwlwifi: add missing rcu_read_lock Johannes Berg
2010-06-07 21:31 ` Miles Lane
2010-06-08 7:25 ` Johannes Berg
2010-06-07 21:34 ` reinette chatre
2010-06-07 22:28 ` Miles Lane
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.