mirror of
https://github.com/proski/madwifi
synced 2024-11-22 14:31:22 +03:00
Convert tracked member of ieee80211_cb to be a flag
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3618 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
d3842998ca
commit
ef47acefdd
@ -408,7 +408,7 @@ struct ieee80211_cb {
|
||||
#define M_UAPSD 0x08 /* frame flagged for u-apsd handling */
|
||||
#define M_RAW 0x10
|
||||
#ifdef IEEE80211_DEBUG_REFCNT
|
||||
int tracked;
|
||||
#define M_SKB_TRACKED 0x20
|
||||
void (*next_destructor)(struct sk_buff *skb);
|
||||
#endif
|
||||
};
|
||||
|
@ -287,7 +287,7 @@ ieee80211_hardstart(struct sk_buff *skb, struct net_device *dev)
|
||||
if (skb1) {
|
||||
memset(SKB_CB(skb1), 0, sizeof(struct ieee80211_cb));
|
||||
#ifdef IEEE80211_DEBUG_REFCNT
|
||||
SKB_CB(skb1)->tracked = 1;
|
||||
M_FLAG_SET(skb1, M_SKB_TRACKED);
|
||||
#endif /* #ifdef IEEE80211_DEBUG_REFCNT */
|
||||
SKB_CB(skb1)->ni = ieee80211_find_txnode(vap->iv_xrvap,
|
||||
eh->ether_dhost);
|
||||
|
@ -280,7 +280,7 @@ static void print_skb_trackchange_message(
|
||||
static struct sk_buff *
|
||||
clean_clone_or_copy(struct sk_buff *skb) {
|
||||
if (skb != NULL)
|
||||
SKB_CB(skb)->tracked = 0;
|
||||
M_FLAG_CLR(skb, M_SKB_TRACKED);
|
||||
return skb;
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ track_skb(struct sk_buff *skb, int users_adjustment,
|
||||
"ERROR: NULL skb received. Skipping.");
|
||||
return NULL;
|
||||
}
|
||||
if (SKB_CB(skb)->tracked) {
|
||||
if (M_FLAG_GET(skb, M_SKB_TRACKED)) {
|
||||
skb_print_message(0 /* show_counter */,
|
||||
skb, func1, line1, func2, line2,
|
||||
"ERROR: Already tracked skb received. Skipping.");
|
||||
@ -310,7 +310,7 @@ track_skb(struct sk_buff *skb, int users_adjustment,
|
||||
}
|
||||
atomic_inc(&skb_total_counter);
|
||||
atomic_inc(&skb_refs_counter);
|
||||
SKB_CB(skb)->tracked = 1;
|
||||
M_FLAG_SET(skb, M_SKB_TRACKED);
|
||||
print_skb_trackchange_message(skb, users_adjustment,
|
||||
func1, line1, func2, line2,
|
||||
" is now ** TRACKED **");
|
||||
@ -335,7 +335,7 @@ untrack_skb(struct sk_buff *skb, int users_adjustment,
|
||||
"ERROR: NULL skb received. No changes made.");
|
||||
return NULL;
|
||||
}
|
||||
if (!SKB_CB(skb)->tracked) {
|
||||
if (!M_FLAG_GET(skb, M_SKB_TRACKED)) {
|
||||
skb_print_message(0 /* show_counter */,
|
||||
skb, func1, line1, func2, line2,
|
||||
"ERROR: Untracked skb received. No changes made.");
|
||||
@ -350,7 +350,7 @@ untrack_skb(struct sk_buff *skb, int users_adjustment,
|
||||
}
|
||||
atomic_dec(&skb_total_counter);
|
||||
atomic_dec(&skb_refs_counter);
|
||||
SKB_CB(skb)->tracked = 0;
|
||||
M_FLAG_CLR(skb, M_SKB_TRACKED);
|
||||
#ifdef IEEE80211_DEBUG_REFCNT_SKBDEST
|
||||
/* Uninstall our debug destructor, restoring any original... */
|
||||
if (skb->destructor == skb_destructor) {
|
||||
@ -383,7 +383,7 @@ unref_skb(struct sk_buff *skb, int type,
|
||||
dump_stack();
|
||||
return;
|
||||
}
|
||||
if (!SKB_CB(skb)->tracked) {
|
||||
if (!M_FLAG_GET(skb, M_SKB_TRACKED)) {
|
||||
skb_print_message(0 /* show_counter */,
|
||||
skb, func1, line1, func2, line2,
|
||||
"ERROR: Untracked skb received. Probable duplicate free error!");
|
||||
@ -463,7 +463,7 @@ ref_skb(struct sk_buff *skb,
|
||||
dump_stack();
|
||||
return NULL;
|
||||
}
|
||||
if (!SKB_CB(skb)->tracked) {
|
||||
if (!M_FLAG_GET(skb, M_SKB_TRACKED)) {
|
||||
skb_print_message(0 /* show_counter */,
|
||||
skb, func1, line1, func2, line2,
|
||||
"ERROR: Untracked skb received. Probable use after free! "
|
||||
|
Loading…
Reference in New Issue
Block a user