Re: [patch] 2.3.8+ UP masq

Matthew Harrell (mharrell@sito.saic.com)
Sun, 27 Jun 1999 09:41:57 -0400


--ReaqsoxgOBHFXBhH
Content-Type: text/plain; charset=us-ascii

: I'm not sure that the #ifdef around the spinlock_t declaration hasn't been
: there all along. What *did* change was that the UP declarations of spin_lock()
: and friends were made to reference the (0-length) spinlock_t, so gcc / egcs
: didn't warn about unused variables. As the masq stuff ifdef'd out the variable
: but not the functions, it started wingeing. Ironically, the spinlock was
: probably ifdef'd to get rid of the warnings in the first place.
:
: Did that make sense? :)

I think. I'll have to read it again to make sure. This would, of course, be
the one time I didn't download the 2.3.8 patch again to check out what had
changed.

So, I guess the correct patch would be something like the following?

Now I guess I'll go see what kind of havoc I can cause when I look at the
thirteen other modules that have undefined symbols in 2.3.9pre5.

-- 
  Matthew Harrell                          Do not meddle in the affairs of cats
  Simulation Technology Division, SAIC      for they are subtle and will piss
  mharrell@sito.saic.com                    on your computer

--ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="masq2.fixes"

--- linux/net/ipv4/ip_masq.c-ori Sun Jun 27 00:28:58 1999 +++ linux/net/ipv4/ip_masq.c Sun Jun 27 09:35:28 1999 @@ -315,9 +315,7 @@ * Will cycle in MASQ_PORT boundaries. */ static __u16 masq_port = PORT_MASQ_BEGIN; -#ifdef __SMP__ static spinlock_t masq_port_lock = SPIN_LOCK_UNLOCKED; -#endif /* * free ports counters (UDP & TCP) --- linux/net/ipv4/ip_masq_mod.c-ori Sun Jun 27 00:30:26 1999 +++ linux/net/ipv4/ip_masq_mod.c Sun Jun 27 09:35:43 1999 @@ -35,9 +35,7 @@ EXPORT_SYMBOL(ip_masq_mod_lkp_link); EXPORT_SYMBOL(ip_masq_mod_lkp_unlink); -#ifdef __SMP__ static spinlock_t masq_mod_lock = SPIN_LOCK_UNLOCKED; -#endif /* * Base pointer for registered protocol modules --- linux/net/ipv4/ip_masq_portfw.c-ori Sun Jun 27 00:50:10 1999 +++ linux/net/ipv4/ip_masq_portfw.c Sun Jun 27 09:35:54 1999 @@ -51,10 +51,7 @@ /* * Lock */ -#ifdef __SMP__ static spinlock_t portfw_lock = SPIN_LOCK_UNLOCKED; -#endif - static struct list_head portfw_list[2]; static __inline__ int portfw_idx(int protocol) { --- linux/net/ipv4/ip_masq_mfw.c-ori Sun Jun 27 00:56:17 1999 +++ linux/net/ipv4/ip_masq_mfw.c Sun Jun 27 09:36:21 1999 @@ -73,17 +73,12 @@ __u32 fwmark; /* key: firewall mark */ struct list_head hosts; /* list of forward-to hosts */ atomic_t nhosts; /* number of "" */ -#ifdef __SMP__ rwlock_t lock; -#endif }; static DECLARE_MUTEX(mfw_sema); -#ifdef __SMP__ static rwlock_t mfw_lock = RW_LOCK_UNLOCKED; -#endif - static struct ip_masq_mfw *ip_masq_mfw_table[IP_MASQ_MFW_HSIZE]; static __inline__ int mfw_hash_val(int fwmark)

--ReaqsoxgOBHFXBhH--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/