summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/ip_input.c2
-rw-r--r--sys/sys/mutex.h6
2 files changed, 3 insertions, 5 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index b798092..d1c269c 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -936,9 +936,7 @@ DPRINTF(("ip_input: no SP, packet discarded\n"));/*XXX*/
*(struct sockaddr_in **)(mtag+1) = args.next_hop;
m_tag_prepend(m, mtag);
}
- NET_LOCK_GIANT();
(*inetsw[ip_protox[ip->ip_p]].pr_input)(m, hlen);
- NET_UNLOCK_GIANT();
return;
bad:
m_freem(m);
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index f86679d..d31f3ea 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -354,15 +354,15 @@ do { \
*/
extern int debug_mpsafenet; /* defined in net/netisr.c */
#define NET_LOCK_GIANT() do { \
- if (debug_mpsafenet) \
+ if (!debug_mpsafenet) \
mtx_lock(&Giant); \
} while (0)
#define NET_UNLOCK_GIANT() do { \
- if (debug_mpsafenet) \
+ if (!debug_mpsafenet) \
mtx_unlock(&Giant); \
} while (0)
#define NET_ASSERT_GIANT() do { \
- if (debug_mpsafenet) \
+ if (!debug_mpsafenet) \
mtx_assert(&Giant, MA_OWNED); \
} while (0)
OpenPOWER on IntegriCloud