Merely removing down_read(&mm->mmap_sem) from task_vsize() is too
half-assed to let stand. The following patch removes the vma iteration
as well as the down_read(&mm->mmap_sem) from both task_mem() and
task_statm() and callers for the CONFIG_MMU=y case in favor of
accounting the various stats reported at the times of vma creation,
destruction, and modification. Unlike the 2.4.x patches of the same
name, this has no per-pte-modification overhead whatsoever.
This patch quashes end user complaints of top(1) being slow as well as
kernel hacker complaints of per-pte accounting overhead simultaneously.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
task_vsize() doesn't need mm->mmap_sem for the CONFIG_MMU case; the
semaphore doesn't prevent mm->total_vm from going stale or getting
inconsistent with other numbers regardless. Also, KSTK_EIP() and
KSTK_ESP() don't want or need protection from mm->mmap_sem either. So this
pushes mm->mmap_sem to task_vsize() in the CONFIG_MMU=n task_vsize().
Also, hoist the prototype of task_vsize() into proc_fs.h
The net result of this is a small speedup of procps for CONFIG_MMU.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Hansen [Fri, 27 Aug 2004 03:35:51 +0000 (20:35 -0700)]
[PATCH] include asm/page.h for virt_to_page()
asm/page.h seems to be the accepted place to declare virt_to_page() on a vast
majority of architectures. This patch makes sure that a few files which use
that function also directly include the header.
Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Hansen [Fri, 27 Aug 2004 03:35:39 +0000 (20:35 -0700)]
[PATCH] don't align virt_to_page() args
__pa() is always be consistent inside of a single page. The next thing
virt_to_page() does after that is shift down the address, killing the bits
that __change_page_attr() just masked off.
Remove the superfluous masking.
Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Hansen [Fri, 27 Aug 2004 03:35:26 +0000 (20:35 -0700)]
[PATCH] vmalloc_fault() cleanup
Store the physical pgd address in a different variable than the virtual
address.
There's no real reason to only use 1 variable here, other than saving a
line of code. But, the types really are different and we might as well
just spell that out explicitly.
Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Hansen [Fri, 27 Aug 2004 03:35:14 +0000 (20:35 -0700)]
[PATCH] call virt_to_page() with void*, not UL
I'm sure there's a good reason for these functions to take virtual addresses
as unsigned longs, so suppress the warnings and cast them to the proper types
before calling the virt/phys conversion functions
A perfectly acceptable alternative would be to go and change free_pages() to
stop taking unsigned longs for virtual addresses, but this has a much smaller
impact.
Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Dave Hansen [Fri, 27 Aug 2004 03:34:51 +0000 (20:34 -0700)]
[PATCH] reduce casting in sysenter.c
Ran across this because it's another place where an unsigned long is passed
directly to __pa(). Making the "page" variable a void* seems a bit more
natural than an unsigned long and reduces the net number of casts by 1.
Without it, we probably need another (void *) cast in the __pa() call.
For more explanation as to why this was probably done originally, see this
post: http://marc.theaimsgroup.com/?l=linux-mm&m=109155379124628&w=2
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Pierre Ossman [Fri, 27 Aug 2004 03:34:40 +0000 (20:34 -0700)]
[PATCH] Split timer resources
The kernel currently allocates the range 0x40-0x5f for timer calls. This
causes conflicts with other hardware using these ports (In my case a
Winbond W83L519D SD/MMC card reader). This patch splits the resource into
the ports actually needed.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
John Levon [Fri, 27 Aug 2004 03:34:28 +0000 (20:34 -0700)]
[PATCH] improve OProfile on many-way systems
Anton prompted me to get this patch merged. It changes the core buffer
sync algorithm of OProfile to avoid global locks wherever possible. Anton
tested an earlier version of this patch with some success. I've lightly
tested this applied against 2.6.8.1-mm3 on my two-way machine.
The changes also have the happy side-effect of losing less samples after
munmap operations, and removing the blind spot of tasks exiting inside the
kernel.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Fri, 27 Aug 2004 03:34:16 +0000 (20:34 -0700)]
[PATCH] copy_mount_options size fix
davem says that copy_mount_options is failing in obscure ways if the
architecture's copy_from_user() doesn't return an exact count of the number of
uncopied bytes.
Fixing that up in each architecture is a pain - it involves falling back to
byte-at-a-time copies.
It's simple to open-code this in namespace.c. If we find other places in the
kernel which care about this we can promote this to a global function.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Roland McGrath [Fri, 27 Aug 2004 03:34:04 +0000 (20:34 -0700)]
[PATCH] fix MT reparenting when thread group leader dies
When the initial thread in a multi-threaded program dies (the thread group
leader), its child processes are wrongly orphaned, and thereafter when
other threads die their child processes are also orphaned even though live
threads remain in the parent process that can call wait. I have a small
(under 100 lines), POSIX-compliant test program that demonstrates this
using -lpthread (NPTL) if anyone is interested in seeing it.
The bug is that forget_original_parent moves children to the dead parent's
group leader if it's alive, but if not it orphans them. I've changed it so
it instead reparents children to any other live thread in the dead parent's
group (not even preferring the group leader). Children go to init only if
there are no live threads in the parent's group at all. These are the
correct semantics for fork children of POSIX threads.
The second part of the change is to do the CLONE_PARENT behavior always for
CLONE_THREAD, i.e. make sure that each new thread's parent link points to
the real parent of the process and never another thread in its own group.
Without this, when the group leader dies leaving a sole live thread in the
group, forget_original_parent will try to reparent that thread to itself
because it's a child of the dying group leader. Rather handling this case
specially to reparent to the group leader's parent instead, it's more
efficient just to make sure that noone ever has a parent link to inside his
own thread group. Now the reparenting work never needs to be done for
threads created in the same group when their creator thread dies. The only
change from losing the who-created-whom information is when you look at
"PPid:" in /proc/PID/task/TID/status. For purposes of all direct system
calls, it was already as if CLONE_THREAD threads had the parent of the
group leader. (POSIX provides no way to keep track of which thread created
which other thread with pthread_create.)
Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rusty Russell [Fri, 27 Aug 2004 03:33:53 +0000 (20:33 -0700)]
[PATCH] mostly remove module_parm()
MODULE_PARM() was marked obsolete. Remove it from everything except
drivers/ and arch/.
Naturally, such a widespread change may introduce bugs for some of the
non-trivial cases, and where in doubt I used "0" as permissions arg (ie.
won't appear in sysfs). Individual authors should think about whether that
would be useful.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Mahoney [Fri, 27 Aug 2004 03:33:41 +0000 (20:33 -0700)]
[PATCH] dnotify + autofs may create signal/restart syscall loop
I saw a recent bug report that showed when a process set up a dnotify against
the autofs root and then attempted an access(2) call inside the autofs
namespace on a mount that would fail, it would create a signal/restart loop.
The cause is that the autofs code checks to see if any signals are pending
after it waits on a response from the autofs daemon. If it finds any, it
assumes that autofs_wait was interrupted, and that it should return
-ERESTARTNOINTR. The problem with this is that a signal_pending(current)
check will return true if *any* signals were received, not just if a signal
that interrupted the wait was received. autofs_wait explicitly blocks all
signals except for SIGKILL, SIGQUIT, and SIGINT before calling
interruptible_sleep_on.
The effect is that if a dnotify is set against the autofs root, when the
autofs daemon creates the directory, a dnotify event will be sent to the
originating process. Since the code in autofs_root_lookup doesn't check to
see what signals are actually pending, it bails early, telling the caller to
try again. The loop goes on forever until interrupted via one of the actual
interrupting signals.
The following patch makes both autofs_root_lookup and autofs4_root_lookup
verify that one of its defined "shutdown" signals are pending before bailing
out early. Any other signal should be delivered later, as expected. It
doesn't matter if the signal occured outside of the sleep in autofs_wait. The
calling process will either go away or try again.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ingo Molnar [Fri, 27 Aug 2004 03:33:18 +0000 (20:33 -0700)]
[PATCH] Add a few might_sleep() checks
Add a whole bunch more might_sleep() checks. We also enable might_sleep()
checking in copy_*_user(). This was non-trivial because of the "copy_*_user()
in atomic regions" trick would generate false positives. Fix that up by
adding a new __copy_*_user_inatomic(), which avoids the might_sleep() check.
Only i386 is supported in this patch.
With: Arjan van de Ven <arjanv@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Anton Blanchard [Fri, 27 Aug 2004 03:32:41 +0000 (20:32 -0700)]
[PATCH] reduce size of struct inode on 64bit
Reduce the size of struct inode on 64bit architectures by reducing padding.
This assumes spinlocks are 32bit or less which is the case on most
architectures.
This reduces inode structs by 24 bytes on ppc64, and on ext2 increases the
number of inodes in a 4kB slab from 5 to 6.
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Convert prof_buffer to an array of atomic_t instead of sometimes atomic_t,
sometimes unsigned int. Also, bootmem rounds up internally, so blow away some
crap code there.
Signed-off-by: William Irwin <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] consolidate hit count increments in profile_tick()
With prof_cpu_mask and profile_pc() in hand, the core is now able to perform
all the profile accounting work on behalf of arches. Consolidate the profile
accounting and convert all arches to call the core function.
Signed-off-by: William Irwin <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The program counter calculation from pt_regs is the only portion of profile
accounting that differs across various architectures. This is usually
instruction_pointer(regs), but to handle the few arches where it isn't,
introduce profile_pc().
Signed-off-by: William Irwin <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Handling of prof_cpu_mask is grossly inconsistent. Some arches have it as a
cpumask_t, others unsigned long, and even within arches it's treated
inconsistently. This makes it cpumask_t across the board, and consolidates
the handling in kernel/profile.c
Signed-off-by: William Irwin <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Arjan van de Ven [Fri, 27 Aug 2004 03:30:55 +0000 (20:30 -0700)]
[PATCH] schedule profileing
From: William Lee Irwin III <wli@holomorphy.com>
The patch (from Ingo) below is quite interesting, it allows the use of
readprofile not for statistical tine sampling, but for seeing where calls to
schedule() come from, so it can give some insight to the "where do my context
switches come from" question.
Boot with `profile=schedul2' to activate this feature.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rusty Russell [Fri, 27 Aug 2004 03:30:43 +0000 (20:30 -0700)]
[PATCH] Hotplug CPU vs TASK_ZOMBIEs: The Sequel to Hotplug CPU vs TASK_DEAD
release_task can sleep. Sleeping allows a CPU to go down underneath you.
release_task removes you from the tasklist, so you don't get migrated off the
CPU: BUG() in sched.c.
In last week's episode, our dashing hero (Ingo Molnar) solved this for
self-reaping tasks by grabbing the hotplug cpu lock to prevent this.
However, in an unexpected twist, the problem remains for tasks whose
parents call release_task on them: the zombies are off the task list, and
lurk on the dead CPU.
Fortunately, the comedic sidekick (Rusty Russell) has an answer: let's make
the hotplug callback walk the runqueue of the dead CPU as well, taking care
of the zombies.
1) Restore exit.c to its former form. The comment is incorrect: sched.c
checks PF_DEAD, not the state, to decide to do the final
put_task_struct(), and it does it for all tasks, self-reaping or no.
2) Implement migrate_dead_tasks() in the sched.c hotplug CPU callback.
3) Rename migrate_all_tasks() to migrate_live_tasks().
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Fri, 27 Aug 2004 03:30:20 +0000 (20:30 -0700)]
[PATCH] md: fix problems with checksum handling in MD superblocks.
md currently uses csum_partial to calculate checksums for superblocks.
However this function is not consistent across all architectures. Some
(i386) to a 32bit csum. Some (alpha) do a 16 bit csum. This makes it hard
for userspace to keep up.
So we provide a generic routine (that does exactly what the i386
csum_partial does) and:
- When setting the csum, use csum_partial so that old kernels will still
recognise the superblock
- When checking the csum, allow either csum_partial or the new generic
code to provide the right csum. This allows user-space to just use the
common code and always work.
Also modify the csum for version-1 superblock (which currently aren't being
used) to always user a predictable checksum algorithm.
Thanks to Mike Tran <mhtran@us.ibm.com> for noticing this.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jesse Barnes [Fri, 27 Aug 2004 03:30:08 +0000 (20:30 -0700)]
[PATCH] fix sysrq support in sn_console.c
In porting the sn_console driver to the serial core, we lost sysrq support.
This patch fixes it and removes a few unncessary #ifdefs. Can you please
send it on to Linus asap? sysrq is a *really* nice thing to have.
Jesse Barnes [Fri, 27 Aug 2004 03:29:57 +0000 (20:29 -0700)]
[PATCH] fix show_mem on discontig machines
Dave Hansen recently did some bootmem and paging init cleanups, but I
missed this little bit when I tested his original patches. We need to
initialize pgdat->node_mem_map correctly since a) we're using vmem_map, and
b) the core won't do it for us since we have a valid node_start_pfn I
believe.
Neil Brown [Fri, 27 Aug 2004 03:29:45 +0000 (20:29 -0700)]
[PATCH] Use fixed size buffer instead of kmalloc for m_class in ip_map
This avoids lots of bothersome memory management and is generally
cleaner.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Sam Ravnborg [Thu, 26 Aug 2004 23:20:43 +0000 (01:20 +0200)]
kbuild: use *.lds infrastructure in arch/i386/kernel
Rusty decided to preprocess a *.lds.S file in parallele with the new *.lds infrastructure
being added to kbuild. Fix that up.
Also added the file to targets so we do not see recompile each time the kernel is build.
David Brownell [Thu, 26 Aug 2004 09:04:56 +0000 (02:04 -0700)]
[PATCH] USB: gadgetfs minor updates
Gadgetfs updates:
- Resolve a problem that came from a change in the API to AIO:
kiocb->private type and size changed, but the name remained
the same ... so GCC wouldn't report pending memory-corruption.
- Probe the controller at runtime, eliminatingting config-specific
defines which need to be updated for each new controller. Rip
out the old #defines.
- Use newish APIs to let VBUS current be used to recharge
batteries (or whatever).
- Use no_llseek() ... endpoints are pure data streams.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Oliver Neukum [Thu, 26 Aug 2004 08:56:59 +0000 (01:56 -0700)]
[PATCH] USB: cdc acm patch
Fix tty layer sleep/locking problem (again) ... when this is
called through the network stack (PPP) sleeping isn't allowed.
There's some bugtraq ID for this.
From: Oliver Neukum <oliver@neukum.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
This patch gets rid of the tcp_default_win_scale sysctl and instead
computes the optimum maximum window scale. It just means one less
thing to have to tune. I also moved the code out of the inline because
it gets called three places and isn't in the critical path.
As a side effect, it will cause a smaller window scale for many people
since the default tcp_rmem fits in a win_scale of 2. This is allows for
finer grain windows (good), but may mask some of the problems with bad
implementations we have already seen (bad).
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>
[PATCH] ppc32: Improve workaround for 74xx CPUs with broken BTIC
The previous workaround didn't enable the BTIC bit on CPUs where it is
broken. However, it seems some firmwares will unconditionally set it,
so this new patch will actually _clear_ it on CPUs where it is broken.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The trackpad on recent Apple laptops tend to emmit spurrious 'right
clicks' apparently. This patch from Alex Clausen fixes it, please
apply. The trackpad cannot normally emit a right click, so just filter
those out.
Signed-off-by: Alexander Clausen <alex@skip86.com> Signed-off-by: Michael Schmitz <schmitz@opal.biophys.uni-duesseldorf.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Thu, 26 Aug 2004 01:13:08 +0000 (18:13 -0700)]
[PATCH] missing include of config.h in asm-alpha/page.h
That was a nasty one - missing include of config.h in a file that has
non-trivial ifdefs. With some configs it ended up with very odd conflicts
(we get included early, take the wrong branch of ifdef, then get another
file included, it pulls in config.h and picks the right branch of its
ifdef; surprise, surprise, they conflict).
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Wed, 25 Aug 2004 14:31:10 +0000 (07:31 -0700)]
Revert I2C keywest class fixup
Benh says: "Please revert that for now, I need to figure out what they
were exactly trying to do and will come up with something if it makes
sense but the patch as-is doesn't"
David Mosberger [Wed, 25 Aug 2004 11:06:16 +0000 (04:06 -0700)]
[PATCH] signal-race-fix: ia64
It looks fine to me, except that I decided to play chicken as far as the
give_sigsegv update of sa_handler is concerned.
Arun, I hope I got the ia32 emulation parts right, but you may want to
double-check.
The patch seems to work fine as far as I have tested. I'm seeing some
oddity in context-switch overhead and pipe latency as reported by LMbench,
but I suspect that's due to another change that happened somewhere between
2.6.5-rc1 and Linus' bk tree as of this morning.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Wed, 25 Aug 2004 11:01:29 +0000 (04:01 -0700)]
[PATCH] signal-race-fixes: x86-64 support
Add the signal race changes to x86-64 to make it compile again.
Didn't merge the more pointless changes from i386.
Also remove the special SA_ONESHOT handling, doesn't seem to be needed
anymore.
From: Mikael Pettersson <mikpe@csd.uu.se>
The signal-race-fixes patch in 2.6.8-rc2-mm1 appears to have broken
x86-64's ia32 emulation.
When forcing a SIGSEGV the old code updated "*ka", where ka was a pointer
to current's k_sigaction for SIGSEGV. Now "ka_copy" points to a copy of
that structure, so assigning "*ka_copy" doesn't do what we want. Instead do
the assignment via current->... just like the normal signal delivery code
does.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The signal-race-fixes patch in 2.6.8-rc2-mm1 appears to be a bit broken on
s390.
When forcing a SIGSEGV the old code updated "*ka", where ka was a pointer
to current's k_sigaction for SIGSEGV. Now "ka_copy" points to a copy of
that structure, so assigning "*ka_copy" doesn't do what we want. Instead do
the assignment via current->... just like i386 and x86_64 do.
Furthermore, the SA_ONESHOT handling wasn't deleted. That is now handled
by generic code in the kernel.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Wed, 25 Aug 2004 11:00:58 +0000 (04:00 -0700)]
[PATCH] signal handling race fix
The problem:
In arch/i386/signal.c, in the do_signal() function, it calls
get_signal_to_deliver() which returns the signal number to deliver (along
with siginfo). get_signal_to_deliver() grabs and releases the lock, so
the signal handler lock is not held in do_signal(). Then the do_signal()
calls handle_signal(), which uses the signal number to extract the
sa_handler, etc.
Since no lock is held, it seems like another thread with the same
signal handler set can come in and call sigaction(), it can change
sa_handler between the call to get_signal_to_deliver() and fetching the
value of sa_handler. If the sigaction() call set it to SIG_IGN, SIG_DFL,
or some other fundamental change, that bad things can happen.
The patch:
You have to get the sigaction information that will be delivered while
holding sighand->siglock in get_signal_to_deliver().
In 2.4, it can be fixed per-arch and requires no change to the
arch-independent code because the arch fetches the signal with
dequeue_signal() and does all the checking.
The test app:
The program below has three threads that share signal handlers. Thread
1 changes the signal handler for a signal from a handler to SIG_IGN and
back. Thread 0 sends signals to thread 3, which just receives them.
What I believe is happening is that thread 1 changes the signal handler
in the process of thread 3 receiving the signal, between the time that
thread 3 fetches the signal info using get_signal_to_deliver() and
actually delivers the signal with handle_signal().
Although the program is obvously an extreme case, it seems like any
time you set the handler value of a signal to SIG_IGN or SIG_DFL, you can
have this happen. Changing signal attributes might also cause problems,
although I am not so sure about that.
(akpm: this test app segv'd on SMP within milliseconds for me)
[BRIDGE]: Fix oops when mangling and brouting and tcpdumping packets
The ebtables brouting chain, traversed through the call
br_should_route_hook(), can alter a packet. The redirect target
does this, f.e., to change the MAC destination.
Bart discovered this and proposed a patch; this is a revised version.
This version cleans up the handle_bridge code in net/core/dev.c as well
as getting rid of extra rcu_read_lock and only does the br_port checking
once.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@redhat.com>