Skip to contentSkip to conversation

compile-error agg-tx.c: error: implicit declaration of function ‘kfree_rcu’

DISCUSSION Andreas Hartmann 4 participants 6 messages May 5, 2011 – May 9, 2011 mac80211

lore
Share & tools
lore
#0 lore raw

Hello,

since May, there is a compile error in compat-wireless (against kernel 2.6.34):

compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c: In function ‘___ieee80211_stop_tx_ba_session’:
compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:158: error: implicit declaration of function ‘kfree_rcu’ compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:158: error:
‘rcu_head’ undeclared (first use in this function) compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:158: error: (Each undeclared identifier is reported only once compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:158: error: for each function it appears in.) compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c: In function ‘ieee80211_tx_ba_session_handle_start’:
compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:317: error:
‘rcu_head’ undeclared (first use in this function) compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c: In function ‘ieee80211_stop_tx_ba_cb’:
compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:696: error:
‘rcu_head’ undeclared (first use in this function)

See https://patchwork.kernel.org/patch/745352/

Regards,
Andreas

#1 lore raw
Quoted 26 lines · Andreas Hartmann

Hello,

since May, there is a compile error in compat-wireless (against kernel 2.6.34):

compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c: In function ‘___ieee80211_stop_tx_ba_session’:
compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:158: error: implicit declaration of function ‘kfree_rcu’ compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:158: error:
‘rcu_head’ undeclared (first use in this function) compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:158: error: (Each undeclared identifier is reported only once compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:158: error: for each function it appears in.) compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c: In function ‘ieee80211_tx_ba_session_handle_start’:
compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:317: error:
‘rcu_head’ undeclared (first use in this function) compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c: In function ‘ieee80211_stop_tx_ba_cb’:
compat-wireless-2011-05-04-p/net/mac80211/agg-tx.c:696: error:
‘rcu_head’ undeclared (first use in this function)

Quoted 1 line

See https://patchwork.kernel.org/patch/745352/

this patch seems to be applied in compat-wireless-2011-05-05 but I am still getting the same compilation errors in 2.6.32-25. any other fixes

thanks,
shafi

Quoted 9 lines

Regards,
Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#2 lore raw

On Fri, May 06, 2011 at 10:35:08AM +0530, thus spake Mohammed Shafi:

Quoted 6 lines
Quoted 4 lines · Andreas Hartmann

Hello,

since May, there is a compile error in compat-wireless (against kernel 2.6.34):

I, as it appears with many others, have the same kind of trouble compiling the latests compat-wireless snapshots on some kernels (2.6.38 for me).

Obviously the kfree_rcu machinery should go into some compat/ source file. In the meantime, I personnaly reverted these changes (see attached patch) and it works just fine.

Signature · 1 line
/* This is not a comment */
net/mac80211/agg-tx.c +11 -3
index 53defaf..63d852c 100644
@@ -136,6 +136,14 @@ void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u1
 	ieee80211_tx_skb(sdata, skb);
 }
 
+static void kfree_tid_tx(struct rcu_head *rcu_head)
+{
+	struct tid_ampdu_tx *tid_tx =
+	    container_of(rcu_head, struct tid_ampdu_tx, rcu_head);
+
+	kfree(tid_tx);
+}
+
 int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
 				    enum ieee80211_back_parties initiator,
 				    bool tx)
@@ -155,7 +163,7 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
 		/* not even started yet! */
 		rcu_assign_pointer(sta->ampdu_mlme.tid_tx[tid], NULL);
 		spin_unlock_bh(&sta->lock);
-		kfree_rcu(tid_tx, rcu_head);
+		call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
 		return 0;
 	}
 
@@ -314,7 +322,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
 		spin_unlock_bh(&sta->lock);
 
 		ieee80211_wake_queue_agg(local, tid);
-		kfree_rcu(tid_tx, rcu_head);
+		call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
 		return;
 	}
 
@@ -693,7 +701,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid)
 
 	ieee80211_agg_splice_finish(local, tid);
 
-	kfree_rcu(tid_tx, rcu_head);
+	call_rcu(&tid_tx->rcu_head, kfree_tid_tx);
 
  unlock_sta:
 	spin_unlock_bh(&sta->lock);
net/mac80211/work.c +9 -1
index d2e7f0e..a94b312 100644
@@ -65,9 +65,17 @@ static void run_again(struct ieee80211_local *local,
 		mod_timer(&local->work_timer, timeout);
 }
 
+static void work_free_rcu(struct rcu_head *head)
+{
+	struct ieee80211_work *wk =
+		container_of(head, struct ieee80211_work, rcu_head);
+
+	kfree(wk);
+}
+
 void free_work(struct ieee80211_work *wk)
 {
-	kfree_rcu(wk, rcu_head);
+	call_rcu(&wk->rcu_head, work_free_rcu);
 }
 
 static int ieee80211_compatible_rates(const u8 *supp_rates, int supp_rates_len,
#3 lore raw
Quoted 8 lines · Ignacy Gawedzki

On Fri, May 06, 2011 at 10:35:08AM +0530, thus spake Mohammed Shafi:

Quoted 6 lines
Quoted 4 lines · Andreas Hartmann

Hello,

since May, there is a compile error in compat-wireless (against kernel 2.6.34):

Quoted 6 lines

I, as it appears with many others, have the same kind of trouble compiling the latests compat-wireless snapshots on some kernels (2.6.38 for me).

Obviously the kfree_rcu machinery should go into some compat/ source file.  In the meantime, I personnaly reverted these changes (see attached patch) and it works just fine.

I blindly used your patch and now the compat-wireless is compiling for me. thanks a lot.

with regards,
shafi

Quoted 4 lines

--
/* This is not a comment */

#4 lore raw

Hi,

Quoted 11 lines · Mohammed Shafi
Quoted 10 lines · Ignacy Gawedzki

On Fri, May 06, 2011 at 10:35:08AM +0530, thus spake Mohammed Shafi:

Quoted 6 lines
Quoted 4 lines · Andreas Hartmann

Hello,

since May, there is a compile error in compat-wireless (against kernel 2.6.34):

I, as it appears with many others, have the same kind of trouble compiling the latests compat-wireless snapshots on some kernels (2.6.38 for me).

I'm having this problem as well with a 2.6.24 kernel.

The file /include/linux/rcupdate.h , and maybe other files too, need to be included in the compat-wireless package
as the function kfree_rcu is actually introduced in a patch for the current linux-next tree.

I guess they'll be fixing that soon, in the meantime try copying the missing
file(s) manually.

Quoted 20 lines
Quoted 4 lines

Obviously the kfree_rcu machinery should go into some compat/ source file.  In the meantime, I personnaly reverted these changes (see attached patch) and it works just fine.

I blindly used your patch and now the compat-wireless is compiling for me. thanks a lot.

with regards,
shafi

Quoted 4 lines

--
/* This is not a comment */

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Juan Carlos Garza
#5 lore raw
Quoted 17 lines · Juan Carlos Garza

Hi,

Quoted 11 lines · Mohammed Shafi
Quoted 10 lines · Ignacy Gawedzki

On Fri, May 06, 2011 at 10:35:08AM +0530, thus spake Mohammed Shafi:

Quoted 6 lines
Quoted 4 lines · Andreas Hartmann

Hello,

since May, there is a compile error in compat-wireless (against kernel 2.6.34):

I, as it appears with many others, have the same kind of trouble compiling the latests compat-wireless snapshots on some kernels (2.6.38 for me).

I'm having this problem as well with a 2.6.24 kernel.

Quoted 7 lines

The file /include/linux/rcupdate.h , and maybe other files too, need to be included in the compat-wireless package
as the function kfree_rcu is actually introduced in a patch for the current linux-next tree.

I guess they'll be fixing that soon, in the meantime try copying the missing file(s) manually.

Oh ok thanks!

Quoted 25 lines
Quoted 13 lines
Quoted 5 lines

Obviously the kfree_rcu machinery should go into some compat/ source file.  In the meantime, I personnaly reverted these changes (see attached patch) and it works just fine.

I blindly used your patch and now the compat-wireless is compiling for me. thanks a lot.

with regards,
shafi

Quoted 1 line
Quoted 8 lines
Quoted 3 lines

--
/* This is not a comment */

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Juan Carlos Garza