Paul E. McKenney [Tue, 19 Aug 2008 00:51:08 +0000 (17:51 -0700)]
rcu: fix locking cleanup fallout
Given that the rcp->lock is now acquired from call_rcu(), which can be
invoked from irq-disable regions, all acquisitions need to disable irqs.
The following patch fixes this.
Although I don't have any reason to believe that this is the cause of
Yinghai's oops, it does need to be fixed.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Paul E. McKenney [Sun, 17 Aug 2008 19:50:36 +0000 (12:50 -0700)]
rcu: remove redundant ACCESS_ONCE definition from rcupreempt.c
Remove the redundant definition of ACCESS_ONCE() from rcupreempt.c in
favor of the one in compiler.h. Also merge the comment header from
rcupreempt.c's definition into that in compiler.h.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Paul E. McKenney [Sun, 17 Aug 2008 14:37:15 +0000 (07:37 -0700)]
rcu: fix classic RCU locking cleanup lockdep problem
On Fri, Aug 15, 2008 at 04:24:30PM +0200, Ingo Molnar wrote:
>
> Paul,
>
> one of your two recent RCU patches caused this lockdep splat in -tip
> testing:
>
> ------------------->
> Brought up 2 CPUs
> Total of 2 processors activated (6850.87 BogoMIPS).
> PM: Adding info for No Bus:platform
> khelper used greatest stack depth: 3124 bytes left
>
> =================================
> [ INFO: inconsistent lock state ]
> 2.6.27-rc3-tip #1
> ---------------------------------
> inconsistent {softirq-on-W} -> {in-softirq-W} usage.
> ksoftirqd/0/4 [HC0[0]:SC1[1]:HE1:SE0] takes:
> (&rcu_ctrlblk.lock){-+..}, at: [<c016d91c>] __rcu_process_callbacks+0x1ac/0x1f0
> {softirq-on-W} state was registered at:
> [<c01528e4>] __lock_acquire+0x3f4/0x5b0
> [<c0152b29>] lock_acquire+0x89/0xc0
> [<c076142b>] _spin_lock+0x3b/0x70
> [<c016d649>] rcu_init_percpu_data+0x29/0x80
> [<c075e43f>] rcu_cpu_notify+0xaf/0xd0
> [<c076458d>] notifier_call_chain+0x2d/0x60
> [<c0145ede>] __raw_notifier_call_chain+0x1e/0x30
> [<c075db29>] _cpu_up+0x79/0x110
> [<c075dc0d>] cpu_up+0x4d/0x70
> [<c0a769e1>] kernel_init+0xb1/0x200
> [<c01048a3>] kernel_thread_helper+0x7/0x10
> [<ffffffff>] 0xffffffff
> irq event stamp: 14
> hardirqs last enabled at (14): [<c01534db>] trace_hardirqs_on+0xb/0x10
> hardirqs last disabled at (13): [<c014dbeb>] trace_hardirqs_off+0xb/0x10
> softirqs last enabled at (0): [<c012b186>] copy_process+0x276/0x1190
> softirqs last disabled at (11): [<c0105c0a>] call_on_stack+0x1a/0x30
>
> other info that might help us debug this:
> no locks held by ksoftirqd/0/4.
>
> stack backtrace:
> Pid: 4, comm: ksoftirqd/0 Not tainted 2.6.27-rc3-tip #1
> [<c01504dc>] print_usage_bug+0x16c/0x1b0
> [<c0152455>] mark_lock+0xa75/0xb10
> [<c0108b75>] ? sched_clock+0x15/0x30
> [<c015289d>] __lock_acquire+0x3ad/0x5b0
> [<c0152b29>] lock_acquire+0x89/0xc0
> [<c016d91c>] ? __rcu_process_callbacks+0x1ac/0x1f0
> [<c076142b>] _spin_lock+0x3b/0x70
> [<c016d91c>] ? __rcu_process_callbacks+0x1ac/0x1f0
> [<c016d91c>] __rcu_process_callbacks+0x1ac/0x1f0
> [<c016d986>] rcu_process_callbacks+0x26/0x50
> [<c0132305>] __do_softirq+0x95/0x120
> [<c0132270>] ? __do_softirq+0x0/0x120
> [<c0105c0a>] call_on_stack+0x1a/0x30
> [<c0132426>] ? ksoftirqd+0x96/0x110
> [<c0132390>] ? ksoftirqd+0x0/0x110
> [<c01411f7>] ? kthread+0x47/0x80
> [<c01411b0>] ? kthread+0x0/0x80
> [<c01048a3>] ? kernel_thread_helper+0x7/0x10
> =======================
> calling init_cpufreq_transition_notifier_list+0x0/0x20
> initcall init_cpufreq_transition_notifier_list+0x0/0x20 returned 0 after 0 msecs
> calling net_ns_init+0x0/0x190
> net_namespace: 676 bytes
> initcall net_ns_init+0x0/0x190 returned 0 after 0 msecs
> calling cpufreq_tsc+0x0/0x20
> initcall cpufreq_tsc+0x0/0x20 returned 0 after 0 msecs
> calling reboot_init+0x0/0x20
> initcall reboot_init+0x0/0x20 returned 0 after 0 msecs
> calling print_banner+0x0/0x10
> Booting paravirtualized kernel on bare hardware
>
> <-----------------------
>
> my guess is on:
>
> commit 1f7b94cd3d564901f9e04a8bc5832ae7bfd690a0
> Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Date: Tue Aug 5 09:21:44 2008 -0700
>
> rcu: classic RCU locking and memory-barrier cleanups
>
> Ingo
Fixes a problem detected by lockdep in which rcu->lock was acquired
both in irq context and in process context, but without disabling from
process context.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Wed, 30 Jul 2008 18:20:54 +0000 (14:20 -0400)]
rcu: just rename call_rcu_bh instead of making it a macro
Seems that I found a box that has a config that passes call_rcu_bh as a
function pointer (see net/sctp/sm_make_chunk.c), so declaring the
call_rcu_bh has a macro function isn't good enough.
This patch makes it just another name of call_rcu for rcupreempt.
Signed-off-by: Steven Rostedt <srostedt@redhat.org> Reviewed-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
rcu: classic RCU locking and memory-barrier cleanups
This patch simplifies the locking and memory-barrier usage in the Classic
RCU grace-period-detection mechanism, incorporating Lai Jiangshan's
feedback from the earlier version (http://lkml.org/lkml/2008/8/1/400
and http://lkml.org/lkml/2008/8/3/43). Passed 10 hours of
rcutorture concurrent with CPUs being put online and taken offline on
a 128-hardware-thread Power machine. My apologies to whoever in the
Eastern Hemisphere was planning to use this machine over the Western
Hemisphere night, but it was sitting idle and...
So this is ready for tip/core/rcu.
This patch is in preparation for moving to a hierarchical
algorithm to allow the very large SMP machines -- requested by some
people at OLS, and there seem to have been a few recent patches in the
4096-CPU direction as well. The general idea is to move to a much more
conservative concurrency design, then apply a hierarchy to reduce
contention on the global lock by a few orders of magnitude (larger
machines would see greater reductions). The reason for taking a
conservative approach is that this code isn't on any fast path.
Prototype in progress.
This patch is against the linux-tip git tree (tip/core/rcu). If you
wish to test this against 2.6.26, use the following set of patches:
Paul E. McKenney [Wed, 13 Aug 2008 00:25:03 +0000 (17:25 -0700)]
rcu: prevent console flood when one CPU sees another AWOL via RCU
One small change needed to keep from flooding the console when one
CPU notices that another is AWOL. Unless I am missing something subtle.
Otherwise the cleanups look good!
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Paul E. McKenney [Mon, 11 Aug 2008 01:35:38 +0000 (18:35 -0700)]
rcu, debug: detect stalled grace periods
this is a diagnostic patch for Classic RCU.
The approach is to record a timestamp at the beginning
of the grace period (in rcu_start_batch()), then have
rcu_check_callbacks() complain if:
1. it is running on a CPU that has holding up grace periods for
a long time (say one second). This will identify the culprit
assuming that the culprit has not disabled hardware irqs,
instruction execution, or some such.
2. it is running on a CPU that is not holding up grace periods,
but grace periods have been held up for an even longer time
(say two seconds).
It is enabled via the default-off CONFIG_DEBUG_RCU_STALL kernel parameter.
Rather than exponential backoff, it backs off to once per 30 seconds.
My feeling upon thinking on it was that if you have stalled RCU grace
periods for that long, a few extra printk() messages are probably the
least of your worries...
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Cc: David Witbrodt <dawitbro@sbcglobal.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Linus Torvalds [Fri, 8 Aug 2008 23:19:49 +0000 (16:19 -0700)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ][2/2] preregister support for powernow-k8
[CPUFREQ][1/2] whitespace fix for powernow-k8
[CPUFREQ] Update MAINTAINERS to reflect new mailing list.
[CPUFREQ] Fix warning in elanfreq
[CPUFREQ] Fix -Wshadow warning in conservative governor.
[CPUFREQ] Remove EXPERIMENTAL annotation from VIA C7 powersaver kconfig.
Linus Torvalds [Fri, 8 Aug 2008 23:18:34 +0000 (16:18 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
[CIFS] list entry can not return null
turn cifs_setattr into a multiplexor that calls the correct function
move file time and dos attribute setting logic into new function
spin off cifs_setattr with unix extensions to its own function
[CIFS] Code cleanup in old sessionsetup code
[CIFS] cifs_mkdir and cifs_create should respect the setgid bit on parent dir
Rename CIFSSMBSetFileTimes to CIFSSMBSetFileInfo and add PID arg
change CIFSSMBSetTimes to CIFSSMBSetPathInfo
[CIFS] fix trailing whitespace
bundle up Unix SET_PATH_INFO args into a struct and change name
Fix missing braces in cifs_revalidate()
remove locking around tcpSesAllocCount atomic variable
[CIFS] properly account for new user= field in SPNEGO upcall string allocation
[CIFS] remove level of indentation from decode_negTokenInit
[CIFS] cifs send2 not retrying enough in some cases on full socket
[CIFS] oid should also be checked against class in cifs asn
Mark Langsdorf [Thu, 31 Jul 2008 17:39:12 +0000 (12:39 -0500)]
[CPUFREQ][2/2] preregister support for powernow-k8
This patch provides support for the _PSD ACPI object in the Powernow-k8
driver. Although it looks like an invasive patch, most of it is
simply the consequence of turning the static acpi_performance_data
structure into a pointer.
AMD has tested it on several machines over the past few days without issue.
[trivial checkpatch warnings fixed up by davej]
[X86_POWERNOW_K8_ACPI=n buildfix from Randy Dunlap]
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com> Tested-by: Frank Arnold <frank.arnold@amd.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Dave Jones <davej@redhat.com>
Linus Torvalds [Fri, 8 Aug 2008 18:38:42 +0000 (11:38 -0700)]
Merge branch 'for-linus-merged' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus-merged' of master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 5177/1: arm/mach-sa1100/Makefile: remove CONFIG_SA1100_USB
[ARM] 5166/1: magician: add MAINTAINERS entry
[ARM] fix pnx4008 build errors
[ARM] Fix SMP booting with non-zero PHYS_OFFSET
[ARM] 5185/1: Fix spi num_chipselect for lubbock
[ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach
[ARM] Add support for arch/arm/mach-*/include and arch/arm/plat-*/include
[ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead
[ARM] Eliminate useless includes of asm/mach-types.h
[ARM] Fix circular include dependency with IRQ headers
avr32: Use <mach/foo.h> instead of <asm/arch/foo.h>
avr32: Introduce arch/avr32/mach-*/include/mach
avr32: Move include/asm-avr32 to arch/avr32/include/asm
[ARM] sa1100_wdt: use reset_status to remember watchdog reset status
[ARM] pxa: introduce reset_status and clear_reset_status for driver's usage
[ARM] pxa: introduce reset.h for reset specific header information
Adrian Bunk [Fri, 8 Aug 2008 16:26:42 +0000 (19:26 +0300)]
[NFSD] uninline nfsd4_op_name()
There doesn't seem to be a compelling reason why nfsd4_op_name() is
marked as "inline":
It's only used in a dprintk(), and as long as it has only one caller
non-ancient gcc versions anyway inline it automatically.
This patch fixes the following compile error with gcc 3.4:
...
CC fs/nfsd/nfs4proc.o
nfs4proc.c: In function `nfsd4_proc_compound':
nfs4proc.c:854: sorry, unimplemented: inlining failed in call to
nfs4proc.c:897: sorry, unimplemented: called from here
make[3]: *** [fs/nfsd/nfs4proc.o] Error 1
Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org>
[ Also made it "const char *" - Linus] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (99 commits)
pkt_sched: Fix actions referencing
bnx2x: fix logical op
tcp: (whitespace only) fix confusing indentation
pkt_sched: Fix qdisc config when link is down.
[Bluetooth] Add full quirk implementation for btusb driver
[Bluetooth] Removal of unnecessary ignore module parameter
[Bluetooth] Add parameters to control BNEP header compression
ath9k: Revamp wireless mode usage
ath9k: More unused macros
ath9k: Remove a few unused macros and fix indentation
ath9k: Use mac80211's band macros and remove enum hal_freq_band
ath9k: Remove redundant data structure ath9k_txq_info
ath9k: Cleanup data structures related to HW capabilities
ath9k: work around gcc ICEs
ath9k: Add new Atheros IEEE 802.11n driver
ath5k: remove Atheros 11n devices from supported list
list.h: add list_cut_position()
list.h: Add list_splice_tail() and list_splice_tail_init()
p54: swap short slot time dcf values
rt2x00: Block all unsupported modes
...
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Fix end-of-stack checking in save_stack_trace().
sparc: don't use asm/of_device.h
sparc64: Use kernel/uid16.c helpers instead of own copy.
of/sparc: remove include of linux/of_platform.h from asm/of_platform.h
sparc: i8042-sparcio.h: fix warning
Junio C Hamano [Fri, 8 Aug 2008 01:45:08 +0000 (18:45 -0700)]
powerpc: Do not ignore arch/powerpc/include
Back when .gitignore file was added to arch/powerpc/ in 06f2138 ([POWERPC]
Add files build to .gitignore, 2006-11-26), there indeed was nothing
tracked in the ignored hierarchy and ignoring everything made sense. But
we have very many tracked files there these days, and having a higher
level .gitignore that ignores everything is asking for future troubles..
This should have been part of b8b572e (powerpc: Move include files to
arch/powerpc/include/asm, 2008-08-01).
Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This patch removes the commented out line for the not available
CONFIG_SA1100_USB option.
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Philipp Zabel [Wed, 9 Jul 2008 20:27:15 +0000 (21:27 +0100)]
[ARM] 5166/1: magician: add MAINTAINERS entry
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Fri, 8 Aug 2008 14:13:27 +0000 (15:13 +0100)]
[ARM] fix pnx4008 build errors
include/linux/i2c-pnx.h was missed when moving the include files.
Fix it now; it doesn't really need to include mach/i2c.h at all.
Successfully build tested with pnx4008_defconfig, which had
failed in linux-next.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Linus Torvalds [Fri, 8 Aug 2008 01:14:07 +0000 (18:14 -0700)]
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/mad: Test ib_create_send_mad() return with IS_ERR(), not == NULL
IB/mlx4: Allow 4K messages for UD QPs
mlx4_core: Add ethernet fields to CQE struct
IB/ipath: Fix printk format warnings
RDMA/cxgb3: Fix deadlock initializing iw_cxgb3 device
RDMA/cxgb3: Fix up MW access rights
RDMA/cxgb3: Fix QP capabilities
RDMA/cma: Remove padding arrays by using struct sockaddr_storage
IB/ipath: Use unsigned long for irq flags
IPoIB/cm: Set correct SG list in ipoib_cm_init_rx_wr()
Linus Torvalds [Fri, 8 Aug 2008 01:13:30 +0000 (18:13 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
xen-blkfront.c: make blkif_ioctl() static
bio: make use of bvec_nr_vecs
cciss: fix bug if scsi tape support is disabled
cciss: add support for multi lun tape devices
cciss: change the way we notify scsi midlayer of tape drives
cciss: fix negative logical drive count in procfs
cciss: remove redundant code
cciss: make rebuild_lun_table behave better
cciss: return -EFAULT if copy_from_user() fails
Linus Torvalds [Fri, 8 Aug 2008 01:12:41 +0000 (18:12 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: ASoC: fix SNDCTL_DSP_SYNC support in Freescale 8610 sound drivers
This driver was declared obsolete over 2 years ago, the alternative
console driver for legacy iSeries (hvc_iseries) was made the default
over 1 year ago and this driver has been build broken for over 3
months, so remove it.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 8 Aug 2008 01:06:19 +0000 (18:06 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (23 commits)
V4L/DVB (8617): uvcvideo: don't use stack-based buffers for USB transfers.
V4L/DVB (8616): uvcvideo: Add support for two Bison Electronics webcams
V4L/DVB (8611): Add suspend/resume to pxa_camera driver
V4L/DVB (8610): Add suspend/resume capabilities to soc_camera.
V4L/DVB (8609): media: Clean up platform_driver_unregister() bogosity.
V4L/DVB (8607): cxusb: fix OOPS and broken tuning regression on FusionHDTV Dual Digital 4
V4L/DVB (8605): gspca: Fix of gspca_zc3xx oops - 2.6.27-rc1
V4L/DVB (8604): gspca: Fix of "scheduling while atomic" crash.
V4L/DVB (8602): gspca: Fix small bugs, simplify and cleanup ov519.
V4L/DVB (8582): set mts_firmware for em2882 based Pinnacle Hybrid Pro
V4L/DVB (8574): gspca: Bad bytesperlines of pixelformat in spca505/506/508 and vc023x.
V4L/DVB (8573): gspca: Bad scan of frame in spca505/506/508.
V4L/DVB (8572): gspca: Webcam 0c45:6143 in documentation.
V4L/DVB (8571): gspca: Don't use CONFIG_VIDEO_ADV_DEBUG as a compile option.
V4L/DVB (8569): gspca: Set back the old values of Sonix sn9c120 and cleanup source.
V4L/DVB (8567): gspca: hflip and vflip controls added for ov519 - ov7670 plus init cleanup.
V4L/DVB (8564): fix vino driver build error
V4L/DVB (8563): fix drivers/media/video/arv.c compilation
V4L/DVB (8562): DVB_DRX397XD: remove FW_LOADER select
V4L/DVB (8558): media/video/Kconfig: fix a typo
...
Linus Torvalds [Fri, 8 Aug 2008 01:05:39 +0000 (18:05 -0700)]
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
hwmon: (it87) Support for 16-bit fan reading in it8705 >= rev 0x03
hwmon: (it87) Support for 16-bit fan reading in it8712 >= rev 0x07
hwmon: (hwmon-vid) Add 6-bit vid codes for AMD NPT 0Fh cpus
hwmon: (hwmon-vid) Trivial format multi-line comments per CodingStyle
hwmon: ad7414 driver
hwmon: (thmc50) Add support for critical temperature limits
hwmon: (adm9240) Remove EXPERIMENTAL dependency
hwmon: (w83627hf) Drop reset module parameter
hwmon: (w83627hf) Add pwm_enable sysfs interface
hwmon: (w83791d) Use fan divisor bits from vbat register
hwmon: (f71882fg) Delete needless forward declarations
hwmon: (dme1737) Add support for the SMSC SCH5027
hwmon: (dme1737) Skip detection if forced
hwmon: (dme1737) Cleanups
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
kbuild: a better way to generate cscope database change
Kconfig: Extend "menuconfig" for modules to simplify Kconfig file
bugfix for scripts/patch-kernel in 2.6 sublevel stepping
kbuild: fix O=.. build with arm
Roland McGrath [Thu, 7 Aug 2008 23:55:03 +0000 (16:55 -0700)]
tracehook: fix CLONE_PTRACE
In the change in commit 09a05394fe2448a4139b014936330af23fa7ec83, I
overlooked two nits in the logic and this broke using CLONE_PTRACE
when PTRACE_O_TRACE* are not being used.
A parent that is itself traced at all but not using PTRACE_O_TRACE*,
using CLONE_PTRACE would have its new child fail to be traced.
A parent that is not itself traced at all that uses CLONE_PTRACE
(which should be a no-op in this case) would confuse the bookkeeping
and lead to a crash at exit time.
This restores the missing checks and fixes both failure modes.
Reported-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Roland McGrath <roland@redhat.com>
Since we have a two level page table, pmd_offset() is a no-op, so
this just has a casting effect from a pgd to a pmd - the address
argument is unused. So this can't work.
Julien Brunel [Thu, 7 Aug 2008 21:11:56 +0000 (14:11 -0700)]
IB/mad: Test ib_create_send_mad() return with IS_ERR(), not == NULL
In case of error, the function ib_create_send_mad() returns an ERR
pointer, but never returns a NULL pointer. So testing the return
value for error should be done with IS_ERR, not by comparing with
NULL.
A simplified version of the semantic patch that makes this change is
as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@correct_null_test@
expression x,E;
statement S1, S2;
@@
x = ib_create_send_mad(...)
<... when != x = E
if (
(
- x@p2 != NULL
+ ! IS_ERR ( x )
|
- x@p2 == NULL
+ IS_ERR( x )
)
)
S1
else S2
...>
? x = E;
// </smpl>
Signed-off-by: Julien Brunel <brunel@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Current code limits the max message size to 2K for UD QPs, while MTU
might be as big as 4K. This patch sets the maximum message size to
4K, which is needed for UD to work correctly on fabrics with a 4K MTU.
Signed-off-by: Alex Naslednikov <xalex@mellanox.co.il> Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Marcel Holtmann [Thu, 7 Aug 2008 20:26:54 +0000 (22:26 +0200)]
[Bluetooth] Add parameters to control BNEP header compression
The Bluetooth qualification for PAN demands testing with BNEP header
compression disabled. This is actually pretty stupid and the Linux
implementation outsmarts the test system since it compresses whenever
possible. So to pass qualification two need parameters have been added
to control the compression of source and destination headers.
Sujith [Thu, 7 Aug 2008 05:23:10 +0000 (10:53 +0530)]
ath9k: Remove redundant data structure ath9k_txq_info
Use ath9k_tx_queue_info which contains the same elements,
and merge get/set functions of tx queue properties.
Also, fix whitespace damage in struct ath_softc.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Adrian Bunk [Tue, 5 Aug 2008 19:06:51 +0000 (22:06 +0300)]
ath9k: work around gcc ICEs
This patch works around an internal compiler error (gcc bug #37014) in
all gcc 4.2 compilers and the gcc 4.3 series up to at least 4.3.1
on at least powerpc and mips.
Many thanks to Andrew Pinski for analyzing the gcc bug.
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
list.h: Add list_splice_tail() and list_splice_tail_init()
If you are using linked lists for queues list_splice() will not do what
you would expect even if you use the elements passed reversed. We need
to handle these differently. We add list_splice_tail() and
list_splice_tail_init().
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Wed, 6 Aug 2008 14:18:31 +0000 (16:18 +0200)]
rt2x00: Block all unsupported modes
It was possible for unsupported operating modes
to be accepted by the add_interface callback function.
This patch will block those modes until proper support
has been implemented for them.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Currently a mesh node will not forward a multicast frame if it is not subscribed
to the specific multicast address. This patch addresses the issue and fixes mesh
multicast forwarding.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Now we deal with mesh forwarding before the 802.11->802.3 conversion, thus
eliminating a few unnecessary steps. The next hop lookup is called from
ieee80211_master_start_xmit() instead of subif_start_xmit(). Until the next hop
is found, RA in the frame will be all zeroes for frames originating from the
device. For forwarded frames, RA will contain the TA of the received frame,
which will be necessary to send a path error if a next hop is not found.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 5 Aug 2008 16:23:16 +0000 (11:23 -0500)]
p54: Fix for TX sequence number problem
Following "mac80211: fix TX sequence numbers", if a packet
has the IEEE80211_TX_CTL_ASSIGN_SEQ assigned, a sequence number must be
supplied, either by hardware or software. AFAIK, no such hardware exists
for the p54, thus it must be done in software. With this patch, a connection
qith p54usb is stable, whereas the interface went off-line in 2-3 hours
without this change. Note that this code will have to be reworked for proper
sequence numbers on beacons. In addition, the sequence number has been placed
in the hardware state, not the vif state.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Mon, 4 Aug 2008 08:00:44 +0000 (16:00 +0800)]
iwlwifi: cleanup iwl_tx_skb
This patch cleans up iwl_tx_skb function.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Change num_chipselect for lubbock ssp master to reflect requirement
of spi subsystem that all buses have at least 1 chip select.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Acked-by: Eric Miao <eric.miao@marvell.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Robert Olsson [Thu, 7 Aug 2008 09:23:01 +0000 (02:23 -0700)]
pktgen: multiqueue etc.
Sofar far pktgen have had a restriction to only use one device per kernel
thread. With the new multiqueue architecture this is no longer adequate.
The patch below is an effort to remove this by in pktgen configuration
adding a tag to the device name a la eth0@0 etc. The tag is used for
usual device config just as before. Also a new flag is introduced to mirror
queue_map with sending threads smp_processor_id() QUEUE_MAP_CPU.
An example: We use 4 CPU's to send to one 10g interface (eth0)
and we use the new tagging to send a mix of packet sizes, 64, 576 and
1500 bytes. Also we use TX queues according to smp_processor_id()
Russell King [Mon, 4 Aug 2008 09:41:28 +0000 (10:41 +0100)]
[ARM] Remove asm/hardware.h, use asm/arch/hardware.h instead
Remove includes of asm/hardware.h in addition to asm/arch/hardware.h.
Then, since asm/hardware.h only exists to include asm/arch/hardware.h,
update everything to directly include asm/arch/hardware.h and remove
asm/hardware.h.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Joe Eykholt [Thu, 3 Jul 2008 01:22:01 +0000 (18:22 -0700)]
net/core: Allow certain receives on inactive slave.
Allow a packet_type that specifies the exact device to receive
even on an inactive bonding slave devices. This is important for some
L2 protocols such as LLDP and FCoE. This can eventually be used
for the bonding special cases as well.
Signed-off-by: Joe Eykholt <jre@nuovasystems.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Moni Shoua [Thu, 3 Jul 2008 01:21:59 +0000 (18:21 -0700)]
bonding: Don't destroy bonding master when removing slave via sysfs
It is wrong to destroy a bonding master from a context that uses the sysfs
of that bond. When last IPoIB slave is unenslaved from by writing to a
sysfs file (for bond0 this would be /sys/class/net/bond0/bonding/slaves)
the driver tries to destroy the bond. This is wrong and can lead to a
lockup or a crash. This fix lets the bonding master stay and relies on
the user to destroy the bonding master if necessary (i.e. before module
ib_ipoib is unloaded)
This patch affects only bonds of IPoIB slaves. Ethernet slaves stay
unaffected.
Signed-off-by: Moni Shoua <monis@voltaire.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Jay Vosburgh [Thu, 3 Jul 2008 01:21:58 +0000 (18:21 -0700)]
bonding: refactor mii monitor
Refactor mii monitor. As with the previous ARP monitor refactor,
the motivation for this is to handle locking rationally (in this case,
removing conditional locking) and generally clean up the code.
This patch breaks up the monolithic mii monitor into two phases:
an inspection phase, followed by an optional commit phase. The commit phase
is the only portion that requires RTNL or makes changes to state, and is
only called when inspection finds something to change.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Gui Jianfeng [Thu, 7 Aug 2008 06:50:04 +0000 (23:50 -0700)]
tcp: Fix kernel panic when calling tcp_v(4/6)_md5_do_lookup
If the following packet flow happen, kernel will panic.
MathineA MathineB
SYN
---------------------->
SYN+ACK
<----------------------
ACK(bad seq)
---------------------->
When a bad seq ACK is received, tcp_v4_md5_do_lookup(skb->sk, ip_hdr(skb)->daddr))
is finally called by tcp_v4_reqsk_send_ack(), but the first parameter(skb->sk) is
NULL at that moment, so kernel panic happens.
This patch fixes this bug.
Wang Chen [Tue, 22 Jul 2008 05:13:12 +0000 (13:13 +0800)]
[netdrvr] Drivers should not set IFF_* flag themselves
Some hardware set promisc when they are requested to set IFF_ALLMULTI flag.
It's ok, but if drivers set IFF_PROMISC flag when they set promisc,
it will broken upper layer handle for promisc and allmulti.
In addition, drivers can use their own hardware programming to make it.
So do not allow drivers to set IFF_* flags.
This is a general driver fix, so I didn't split it to pieces and send
to specific driver maintainers.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
dm9000: Support MAC address setting through platform data.
The dm9000 driver reads the chip's MAC address from the attached EEPROM. When
no EEPROM is present, or when the MAC address is invalid, it falls back to
reading the address from the chip.
This patch lets platform code set the desired MAC address through platform
data.
Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Fix possible bug where end of receive buffer could be overwritten.
The allocation needs to allow for the reserved space. This would only happen
if device received packet greater than Ethernet standard MTU.
Change this driver to use netdev_alloc_skb rather than setting skb->dev
directly. For the initial allocation it doesn't need to be GFP_ATOMIC.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Introduce the speed_hi field to ethtool_cmd, using the reserved space,
to expand the speed field to 2^32 Megabits/second.
Making this field expansion now gives us plenty of time to fix up the
user-space pieces that use SIOCETHTOOL before hardware faster than 64
Gb/s is available.
Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Ben Collins [Wed, 30 Jul 2008 19:39:02 +0000 (12:39 -0700)]
pegasus: add blacklist support to fix Belkin bluetooth dongle.
Reference: https://launchpad.net/bugs/140511
The Belkin bluetooth dongle unfortunately shares the vendor and device id
with the network adapter which causes lockups whenever the bluetooth
dongle is inserted.
Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Ben Collins <ben.collins@canonical.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>