summaryrefslogtreecommitdiff
path: root/include/linux/if_shaper.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2005-06-02 16:36:00 -0700
committerDavid S. Miller <davem@davemloft.net>2005-06-02 16:36:00 -0700
commitb597ef4712c05c962640a655386a7f06cc1a1fbc (patch)
treeaf2a1822d63cf447dd6e9b58808ea22341c85955 /include/linux/if_shaper.h
parent4fef0304eeaa4156db5625e3578f92ed94645a43 (diff)
[NET]: Fix locking in shaper driver.
o use a semaphore instead of an opencoded and racy lock o move locking out of shaper_kick and into the callers - most just released the lock before calling shaper_kick o remove in_interrupt() tests. from ->close we can always block, from ->hard_start_xmit and timer context never Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_shaper.h')
-rw-r--r--include/linux/if_shaper.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/if_shaper.h b/include/linux/if_shaper.h
index 0485b256d043..004e6f09a6e2 100644
--- a/include/linux/if_shaper.h
+++ b/include/linux/if_shaper.h
@@ -23,7 +23,7 @@ struct shaper
__u32 shapeclock;
unsigned long recovery; /* Time we can next clock a packet out on
an empty queue */
- unsigned long locked;
+ struct semaphore sem;
struct net_device_stats stats;
struct net_device *dev;
int (*hard_start_xmit) (struct sk_buff *skb,
@@ -38,7 +38,6 @@ struct shaper
int (*hard_header_cache)(struct neighbour *neigh, struct hh_cache *hh);
void (*header_cache_update)(struct hh_cache *hh, struct net_device *dev, unsigned char * haddr);
struct net_device_stats* (*get_stats)(struct net_device *dev);
- wait_queue_head_t wait_queue;
struct timer_list timer;
};