diff --git a/[refs] b/[refs] index f4686e43be5b..cb34878aafbd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6756ae4b4e97aba48c042b4aa6b77a18f507d2cb +refs/heads/master: 222fa076652cc1faf56eb7d554c2797ace3c5beb diff --git a/trunk/net/core/pktgen.c b/trunk/net/core/pktgen.c index 04c6d8e23e50..29a969ef2bb2 100644 --- a/trunk/net/core/pktgen.c +++ b/trunk/net/core/pktgen.c @@ -113,6 +113,7 @@ #include #include #include +#include #include #include #include @@ -180,8 +181,8 @@ #define T_REMDEV (1<<4) /* Remove one dev */ /* Locks */ -#define thread_lock() down(&pktgen_sem) -#define thread_unlock() up(&pktgen_sem) +#define thread_lock() mutex_lock(&pktgen_thread_lock) +#define thread_unlock() mutex_unlock(&pktgen_thread_lock) /* If lock -- can be removed after some work */ #define if_lock(t) spin_lock(&(t->if_lock)); @@ -493,7 +494,7 @@ static int pg_delay_d; static int pg_clone_skb_d; static int debug; -static DECLARE_MUTEX(pktgen_sem); +static DEFINE_MUTEX(pktgen_thread_lock); static LIST_HEAD(pktgen_threads); static struct notifier_block pktgen_notifier_block = {