dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

72971 Commits

Author SHA1 Message Date
Pavel Emelyanov 154adbc846 [NET]: Remove bogus zero_it argument from sk_alloc
At this point nobody calls the sk_alloc(() with zero_it == 0,
so remove unneeded checks from it.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:38:43 -07:00
Pavel Emelyanov 8fd1d178a3 [NET]: Make the sk_clone() lighter
The sk_prot_alloc() already performs all the stuff needed by the
sk_clone(). Besides, the sk_prot_alloc() requires almost twice
less arguments than the sk_alloc() does, so call the sk_prot_alloc()
saving the stack a bit.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:37:32 -07:00
Pavel Emelyanov 2e4afe7b35 [NET]: Move some core sock setup into sk_prot_alloc
The security_sk_alloc() and the module_get is a part of the
object allocations - move it in the proper place.

Note, that since we do not reset the newly allocated sock
in the sk_alloc() (memset() is removed with the previous
patch) we can safely do this.

Also fix the error path in sk_prot_alloc() - release the security
context if needed.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:36:26 -07:00
Pavel Emelyanov 3f0666ee30 [NET]: Auto-zero the allocated sock object
We have a __GFP_ZERO flag that allocates a zeroed chunk of memory.
Use it in the sk_alloc() and avoid a hand-made memset().

This is a temporary patch that will help us in the nearest future :)

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:34:42 -07:00
Pavel Emelyanov c308c1b20e [NET]: Cleanup the allocation/freeing of the sock object
The sock object is allocated either from the generic cache with
the kmalloc, or from the proc->slab cache.

Move this logic into an isolated set of helpers and make the
sk_alloc/sk_free look a bit nicer.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:33:50 -07:00
Pavel Emelyanov 1e2e6b89f1 [NET]: Move the get_net() from sock_copy()
The sock_copy() is supposed to just clone the socket. In a perfect
world it has to be just memcpy, but we have to handle the security
mark correctly. All the extra setup must be performed in sk_clone() 
call, so move the get_net() into more proper place.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:31:26 -07:00
Pavel Emelyanov f1a6c4da14 [NET]: Move the sock_copy() from the header
The sock_copy() call is not used outside the sock.c file,
so just move it into a sock.c

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:29:45 -07:00
Ilpo Jrvinen 261ab365fa [TCP]: Another TAGBITS -> SACKED_ACKED|LOST conversion
Similar to commit 3eec0047d9, point of this is to avoid
skipping R-bit skbs.

Signed-off-by: Ilpo Jrvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:10:18 -07:00
Ilpo Jrvinen e56d6cd605 [TCP]: Process DSACKs that reside within a SACK block
DSACK inside another SACK block were missed if start_seq of DSACK
was larger than SACK block's because sorting prioritizes full
processing of the SACK block before DSACK. After SACK block
sorting situation is like this:

             SSSSSSSSS
                  D
                        SSSSSS
                               SSSSSSS

Because write_queue is walked in-order, when the first SACK block
has been processed, TCP is already past the skb for which the
DSACK arrived and we haven't taught it to backtrack (nor should
we), so TCP just continues processing by going to the next SACK
block after the DSACK (if any).

Whenever such DSACK is present, do an embedded checking during
the previous SACK block.

If the DSACK is below snd_una, there won't be overlapping SACK
block, and thus no problem in that case. Also if start_seq of
the DSACK is equal to the actual block, it will be processed
first.

Tested this by using netem to duplicate 15% of packets, and
by printing SACK block when found_dup_sack is true and the 
selected skb in the dup_sack = 1 branch (if taken):

  SACK block 0: 4344-5792 (relative to snd_una 2019137317)
  SACK block 1: 4344-5792 (relative to snd_una 2019137317) 

equal start seqnos => next_dup = 0, dup_sack = 1 won't occur...

  SACK block 0: 5792-7240 (relative to snd_una 2019214061)
  SACK block 1: 2896-7240 (relative to snd_una 2019214061)
  DSACK skb match 5792-7240 (relative to snd_una)

...and next_dup = 1 case (after the not shown start_seq sort),
went to dup_sack = 1 branch.

Signed-off-by: Ilpo Jrvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-01 00:09:37 -07:00
Linus Torvalds b1d08ac064 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  Revert "Driver core: remove class_device_*_bin_file"
2007-10-31 13:43:31 -07:00
Linus Torvalds 57eb06e584 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4634/1: DaVinci GPIO header build fix
  [ARM] 4636/1: pxa: add default configuration for zylonite
  [ARM] 4635/1: pxa: Change Eric Miao's email address to eric.miao@marvell.com
  [ARM] Fix assignment instead of condition in arm/mach-omap2/clock.c
  [ARM] nommu: fix breakage caused by f9720205d1
  [ARM] pxa: shut up CLOCK_EVT_MODE_RESUME warning
  [ARM] Fix FIQ issue with ARM926
  [ARM] Fix pxamci regression
  [ARM] Fix netx_defconfig regression
  [ARM] Fix ateb9200_defconfig build regression
  [ARM] Fix an rpc_defconfig regression
  [ARM] Fix omap_h2_1610_defconfig regressions
  [ARM] 4632/1: Fix a typo in include/asm-arm/plat-s3c/regs-nand.h
2007-10-31 13:40:29 -07:00
Greg Kroah-Hartman d919fd433b Revert "Driver core: remove class_device_*_bin_file"
This reverts commit fcd239d3d5.

I messed up, ia64 still uses these files in the current tree, and now
can not build the pci code, which all ia64 boxes seem to require :)

This fixes that mistake.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-31 12:51:29 -07:00
Adrian Bunk 2ed45b07c9 ieee1394: ieee1394_transactions.c: remove dead code
This patch removes dead code spotted by the Intel C Compiler.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-31 19:02:19 +01:00
Kristian Høgsberg 0bd243c4d9 firewire: Fix pci resume to not pass in a __be32 config rom.
The ohci_enable() function shared between pci_probe and pci_resume
takes a host endian config rom, but ohci->config_rom is __be32.  This
sets up the config rom in the wrong endian on little endian machine,
specifically, BusOptions will be initialized to a 0 max receive size.

This patch changes the way we reuse the config rom so that we avoid
this problem.

Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-31 19:02:19 +01:00
Linus Torvalds 5307cc1aa5 Remove broken ptrace() special-case code from file mapping
The kernel has for random historical reasons allowed ptrace() accesses
to access (and insert) pages into the page cache above the size of the
file.

However, Nick broke that by mistake when doing the new fault handling in
commit 54cb8821de ("mm: merge populate and
nopage into fault (fixes nonlinear)".  The breakage caused a hang with
gdb when trying to access the invalid page.

The ptrace "feature" really isn't worth resurrecting, since it really is
wrong both from a portability _and_ from an internal page cache validity
standpoint.  So this removes those old broken remnants, and fixes the
ptrace() hang in the process.

Noticed and bisected by Duane Griffin, who also supplied a test-case
(quoth Nick: "Well that's probably the best bug report I've ever had,
thanks Duane!").

Cc: Duane Griffin <duaneg@dghda.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-31 09:19:46 -07:00
David Brownell 558de8a74e [ARM] 4634/1: DaVinci GPIO header build fix
This fixes a build problem with GPIOs on DaVinci.  Since it inlines
operations for on-chip GPIOs, it needs some headers to support those
direct register accesses.  Those headers won't be included on other
platforms, since they don't have that optimization.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:52 +00:00
eric miao 1398f679df [ARM] 4636/1: pxa: add default configuration for zylonite
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:48 +00:00
eric miao e9bba8ee6c [ARM] 4635/1: pxa: Change Eric Miao's email address to eric.miao@marvell.com
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:48 +00:00
Roel Kluin 710798c3e1 [ARM] Fix assignment instead of condition in arm/mach-omap2/clock.c
Fix assignment instead of condition

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:43 +00:00
Russell King fd3d72859b [ARM] nommu: fix breakage caused by f9720205d1
Someone forgot to use 'ls include/asm-*/flat.h' or
'grep -r flat_get_addr_from_rp .' to find all architectures which
may be affected by their change.  Fix the fall out.

Noticed-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:42 +00:00
Russell King df43309bd5 [ARM] pxa: shut up CLOCK_EVT_MODE_RESUME warning
Resolve:
  CC      arch/arm/mach-pxa/time.o
arch/arm/mach-pxa/time.c: In function `pxa_osmr0_set_mode':
arch/arm/mach-pxa/time.c:154: warning: enumeration value `CLOCK_EVT_MODE_RESUME' not handled in switch

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:42 +00:00
Russell King 0214f9221a [ARM] Fix FIQ issue with ARM926
Jon Eibertzon writes:
> We have noticed that the I-cache is disabled while waiting for
> interrupt in cpu_arm926_do_idle in arch/arm/mm/proc-arm926.S
> and we are curious to know why, because this causes us a great
> performance hit when executing in FIQ-handlers. Is it assumed
> here that every individual FIQ-handler re-enables the I-cache?

The I-cache disable is an errata workaround, so the solution is to
disable FIQs across the section with the I-cache disabled.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:40 +00:00
Russell King d8cb70d10a [ARM] Fix pxamci regression
Fix:

WARNING: at arch/arm/mach-pxa/clock.c:69 clk_disable()
[<c002d7c8>] (dump_stack+0x0/0x14) from [<c00334f4>] (clk_disable+0x34/0xa0)
[<c00334c0>] (clk_disable+0x0/0xa0) from [<c028a43c>] (pxamci_set_ios+0x74/0xf0)
[<c028a3c8>] (pxamci_set_ios+0x0/0xf0) from [<c0281548>] (mmc_power_off+0x90/0x9c)
[<c02814b8>] (mmc_power_off+0x0/0x9c) from [<c0281a30>] (mmc_start_host+0x18/0x28)
[<c0281a18>] (mmc_start_host+0x0/0x28) from [<c02825a0>] (mmc_add_host+0xe8/0x104)
[<c02824b8>] (mmc_add_host+0x0/0x104) from [<c028a7d0>] (pxamci_probe+0x24c/0x2f4)
[<c028a584>] (pxamci_probe+0x0/0x2f4) from [<c01e5948>] (platform_drv_probe+0x20/0x24)
...

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:39 +00:00
Russell King 5984a2fc7e [ARM] Fix netx_defconfig regression
Fix:

  CC      arch/arm/mach-netx/xc.o
arch/arm/mach-netx/xc.c: In function 'request_xc':
arch/arm/mach-netx/xc.c:192: error: 'struct kobject' has no member named 'name'
arch/arm/mach-netx/xc.c:196: error: 'struct kobject' has no member named 'name'
arch/arm/mach-netx/xc.c:200: error: 'struct kobject' has no member named 'name'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:37 +00:00
Russell King a80770ce4d [ARM] Fix ateb9200_defconfig build regression
Fix:

  CC      drivers/serial/atmel_serial.o
drivers/serial/atmel_serial.c: In function 'atmel_serial_suspend':
drivers/serial/atmel_serial.c:924: error: implicit declaration of function 'at91_suspend_entering_slow_clock'

Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:37 +00:00
Russell King 01c0ad5854 [ARM] Fix an rpc_defconfig regression
Fix:

  CC      drivers/scsi/arm/powertec.o
In file included from drivers/scsi/arm/powertec.c:29:
drivers/scsi/arm/scsi.h: In function 'next_SCp':
drivers/scsi/arm/scsi.h:42: error: 'struct scatterlist' has no member named 'page'
drivers/scsi/arm/scsi.h: In function 'init_SCp':
drivers/scsi/arm/scsi.h:80: error: 'struct scatterlist' has no member named 'page'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:35 +00:00
Russell King b23e79fd87 [ARM] Fix omap_h2_1610_defconfig regressions
Fix:

arch/arm/mach-omap1/built-in.o: In function `h2_init':
board-h2.c:(.init.text+0xbb4): undefined reference to `i2c_register_board_info'

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:34 +00:00
Matt Reimer 914301982f [ARM] 4632/1: Fix a typo in include/asm-arm/plat-s3c/regs-nand.h
Fix a typo in include/asm-arm/plat-s3c/regs-nand.h.

Signed-off-by: Matt Reimer <mreimer@vpop.net>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-10-31 15:21:33 +00:00
David Miller bb374b7b93 [MEDIA] IVTV: exit_ivtv_i2c() cannot be __devexit
It is referenced both from __devinit code (ivtv_probe) and
normal .text (ivtv_process_eeprom), and therefore cannot
be discarded via __devexit.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-31 07:48:21 -07:00
Linus Torvalds dd13810b42 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  [AF_KEY]: suppress a warning for 64k pages.
  [TIPC]: Fix headercheck wrt. tipc_config.h
  [COMPAT]: Fix build on COMPAT platforms when CONFIG_NET is disabled.
  [CONNECTOR]: Fix a spurious kfree_skb() call
  [COMPAT]: Fix new dev_ifname32 returning -EFAULT
  [NET]: Fix incorrect sg_mark_end() calls.
  [IPVS]: Remove /proc/net/ip_vs_lblcr
  [IPV6]: remove duplicate call to proc_net_remove
  [NETNS]: fix net released by rcu callback
  [NET]: Fix free_netdev on register_netdev failure.
  [WAN]: fix drivers/net/wan/lmc/ compilation
2007-10-31 07:46:51 -07:00
Stephen Rothwell 298bb62175 [AF_KEY]: suppress a warning for 64k pages.
On PowerPC allmodconfig build we get this:

net/key/af_key.c:400: warning: comparison is always false due to limited range of data type

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 23:57:05 -07:00
Linus Torvalds a3634d7169 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  add SubmittingPatches to Documentation/ja_JP
  fix typo in SubmittingPatches
  Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y
  sysfs: make sysfs_{get,put}_active() static
  kobject: check for duplicate names in kobject_rename
  Driver core: remove class_device_*_bin_file
2007-10-30 22:23:27 -07:00
Keiichi Kii 710701c8fc add SubmittingPatches to Documentation/ja_JP
This patch adds SubmittingPatches translated into Japanese to 
Documentation/ja_JP directory.

I attach the patch because there is a possibility that MUA 
will change the character encoding sometimes.

Signed-off-by: Keiichi KII <k-keiichi@bx.jp.nec.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-30 21:52:34 -07:00
Keiichi Kii 5ab3bd5785 fix typo in SubmittingPatches
Fix typo.

Signed-off-by: Keiichi Kii <k-keiichi@bx.jp.nec.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-30 21:52:33 -07:00
Kay Sievers 60b8cabd8e Driver Core: fix bug in device_rename() for SYSFS_DEPRECATED=y
This should fix the sysfs warnings that renaming network devices is
causing to show up with CONFIG_SYSFS_DEPRECATED=y

The code just shouldn't run if class devices are real directories, it's
an update for the symlink in the class directory. Nobody noticed that as
long as the creation of sysfs files silently failed, and we both missed
it before the merge, because we don't run SYSFS_DEPRECATED=y.        

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: David Miller <davem@davemloft.net>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-30 21:52:33 -07:00
Adrian Bunk 78e9d3678c sysfs: make sysfs_{get,put}_active() static
sysfs_{get,put}_active() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-30 21:52:33 -07:00
Greg Kroah-Hartman 34358c26a2 kobject: check for duplicate names in kobject_rename
This should catch any duplicate names before we try to tell sysfs to
rename the object.  This happens a lot with older versions of udev and
the network rename scripts.

Cc: David Miller <davem@davemloft.net>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-30 21:52:33 -07:00
Greg Kroah-Hartman fcd239d3d5 Driver core: remove class_device_*_bin_file
These functions are not used by anyone, so remove them from the tree.

The class_device code will be removed soon anyway, so no future users
will ever be possible.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-30 21:52:33 -07:00
David S. Miller 97ef1bb0c8 [TIPC]: Fix headercheck wrt. tipc_config.h
It wants string functions like memcpy() for inline
routines, and these define userland interfaces.

The only clean way to deal with this is to simply
put linux/string.h into unifdef-y and have it
include <string.h> when not-__KERNEL__.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:44:00 -07:00
David S. Miller f3baa4827a [COMPAT]: Fix build on COMPAT platforms when CONFIG_NET is disabled.
Add some missing cond_syscall() entries for this case.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:29:56 -07:00
Michal Januszewski 6cf92e98a4 [CONNECTOR]: Fix a spurious kfree_skb() call
Remove a spurious call to kfree_skb() in the connector rx_skb handler.

This fixes a regression introduced by the '[NET]: make netlink user ->
kernel interface synchronious' patch (cd40b7d398)

Signed-off-by: Michal Januszewski <spock@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:29:47 -07:00
Benjamin Herrenschmidt be48be08a8 [COMPAT]: Fix new dev_ifname32 returning -EFAULT
A stray semicolon slipped in the patch that updated dev_ifname32 to
not be inline, causing it to always return -EFAULT. This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:29:42 -07:00
David S. Miller 51c739d1f4 [NET]: Fix incorrect sg_mark_end() calls.
This fixes scatterlist corruptions added by

	commit 68e3f5dd4d
	[CRYPTO] users: Fix up scatterlist conversion errors

The issue is that the code calls sg_mark_end() which clobbers the
sg_page() pointer of the final scatterlist entry.

The first part fo the fix makes skb_to_sgvec() do __sg_mark_end().

After considering all skb_to_sgvec() call sites the most correct
solution is to call __sg_mark_end() in skb_to_sgvec() since that is
what all of the callers would end up doing anyways.

I suspect this might have fixed some problems in virtio_net which is
the sole non-crypto user of skb_to_sgvec().

Other similar sg_mark_end() cases were converted over to
__sg_mark_end() as well.

Arguably sg_mark_end() is a poorly named function because it doesn't
just "mark", it clears out the page pointer as a side effect, which is
what led to these bugs in the first place.

The one remaining plain sg_mark_end() call is in scsi_alloc_sgtable()
and arguably it could be converted to __sg_mark_end() if only so that
we can delete this confusing interface from linux/scatterlist.h

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:29:29 -07:00
Alexey Dobriyan 07afa04025 [IPVS]: Remove /proc/net/ip_vs_lblcr
It's under CONFIG_IP_VS_LBLCR_DEBUG option which never existed.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:16:27 -07:00
Daniel Lezcano 1675c7b254 [IPV6]: remove duplicate call to proc_net_remove
The file /proc/net/if_inet6 is removed twice.
First time in:
        inet6_exit
             ->addrconf_cleanup
And followed a few lines after by:
        inet6_exit
             -> if6_proc_exit

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:16:24 -07:00
Daniel Lezcano 310928d963 [NETNS]: fix net released by rcu callback
When a network namespace reference is held by a network subsystem,
and when this reference is decremented in a rcu update callback, we
must ensure that there is no more outstanding rcu update before
trying to free the network namespace.

In the normal case, the rcu_barrier is called when the network namespace
is exiting in the cleanup_net function.

But when a network namespace creation fails, and the subsystems are
undone (like the cleanup), the rcu_barrier is missing.

This patch adds the missing rcu_barrier.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:16:21 -07:00
Daniel Lezcano 93ee31f14f [NET]: Fix free_netdev on register_netdev failure.
Point 1:
The unregistering of a network device schedule a netdev_run_todo.
This function calls dev->destructor when it is set and the
destructor calls free_netdev.

Point 2:
In the case of an initialization of a network device the usual code
is:
 * alloc_netdev
 * register_netdev
    -> if this one fails, call free_netdev and exit with error.

Point 3:
In the register_netdevice function at the later state, when the device
is at the registered state, a call to the netdevice_notifiers is made.
If one of the notification falls into an error, a rollback to the
registered state is done using unregister_netdevice.

Conclusion:
When a network device fails to register during initialization because
one network subsystem returned an error during a notification call
chain, the network device is freed twice because of fact 1 and fact 2.
The second free_netdev will be done with an invalid pointer.

Proposed solution:
The following patch move all the code of unregister_netdevice *except*
the call to net_set_todo, to a new function "rollback_registered".

The following functions are changed in this way:
 * register_netdevice: calls rollback_registered when a notification fails
 * unregister_netdevice: calls rollback_register + net_set_todo, the call
                         order to net_set_todo is changed because it is the
                         latest now. Since it justs add an element to a list
                         that should not break anything.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:16:18 -07:00
Adrian Bunk 5c41542bde [WAN]: fix drivers/net/wan/lmc/ compilation
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30 21:16:15 -07:00
Linus Torvalds 53173920da Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/fmr_pool: Stop ib_fmr threads from contributing to load average
  IB/ipath: Fix incorrect use of sizeof on msg buffer (function argument)
  IB/ipath: Limit length checksummed in eeprom
  IB/ipath: Fix a race where s_last is updated without lock held
  IB/mlx4: Lock SQ lock in mlx4_ib_post_send()
  IPoIB/cm: Fix receive QP cleanup
2007-10-30 15:26:56 -07:00
Anton Blanchard 3f776e8a25 IB/fmr_pool: Stop ib_fmr threads from contributing to load average
I noticed my machine was at a constant load average of 1. This was
because ib_create_fmr_pool calls kthread_create but does not
immediately wake the thread up.

Change to using kthread_run so we enter ib_fmr_cleanup_thread(), set
TASK_INTERRUPTIBLE, then go to sleep.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-30 14:57:43 -07:00