lkml.org 
[lkml]   [1999]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch] 2.3.8+ UP masq
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.048 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site