Messages in this thread | | | From | Keith Owens <> | Subject | Re: [patch] 2.3.8+ UP masq | Date | Sun, 27 Jun 1999 19:00:18 +1000 |
| |
On Sun, 27 Jun 1999 01:18:56 -0400, Matthew Harrell <mharrell@sito.saic.com> wrote: >This patch gets rid of numerous undefined lock problems. Since the locks have >now been surrounded in ifdef SMP declarations it made sense to do the same with >all the locks that were used in the code. >[snip] >+#ifdef __SMP__ > spin_lock_irq(&masq_port_lock); >+#endif
Hang on a minute. If those were just spin_lock then OK, ignore for SMP. But they are spin_lock_irq which implies the protected code is entered from irq as well as normal kernel. If so, then the locks are still needed, even on UP.
I tried to trace the call tree down to get_next_mport. AFAICT, it goes get_next_mport <- ip_masq_new <- ip_masq_mod_out_create <- ip_fw_masquerade <- ip_forward. If any of those are called from an irq, then the lock is still required on UP. Otherwise it should be spin_lock().
- 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/
| |