sfrench/cifs-2.6.git
14 years agokbuild, modpost: fix "unexpected non-allocatable" warning with SUSE gcc
Sam Ravnborg [Sun, 3 May 2009 20:17:37 +0000 (22:17 +0200)]
kbuild, modpost: fix "unexpected non-allocatable" warning with SUSE gcc

Jean reported that he saw one warning for each module like the one below:
WARNING: arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.o (.comment.SUSE.OPTs): unexpected non-allocatable section.

The warning appeared with the improved version of the
check of the flags in the sections.

That check already ignored sections named ".comment" - but SUSE store
additional info in the comment section and has named it in a SUSE
specific way. Therefore modpost failed to ignore the section.

The fix is to extend the pattern so we ignore all sections
that start with the name ".comment.".

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reported-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Jean Delvare <khali@linux-fr.org>
14 years agokbuild, modpost: fix unexpected non-allocatable section when cross compiling
Anders Kaseorg [Sun, 3 May 2009 20:02:55 +0000 (22:02 +0200)]
kbuild, modpost: fix unexpected non-allocatable section when cross compiling

The missing TO_NATIVE(sechdrs[i].sh_flags) was causing many
unexpected non-allocatable section warnings when cross-compiling
for an architecture with a different endianness.

Fix endianness of all the fields in the ELF header and
section headers, not just some of them so we are not
hit by this anohter time.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reported-by: Sean MacLennan <smaclennan@pikatech.com>
Tested-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Sat, 2 May 2009 23:52:50 +0000 (16:52 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: fix getbmap vs mmap deadlock
  xfs: a couple getbmap cleanups
  xfs: add more checks to superblock validation
  xfs_file_last_byte() needs to acquire ilock

14 years agoMove dtc and libfdt sources from arch/powerpc/boot to scripts/dtc
David Gibson [Thu, 30 Apr 2009 05:25:53 +0000 (15:25 +1000)]
Move dtc and libfdt sources from arch/powerpc/boot to scripts/dtc

The powerpc kernel always requires an Open Firmware like device tree
to supply device information.  On systems without OF, this comes from
a flattened device tree blob.  This blob is usually generated by dtc,
a tool which compiles a text description of the device tree into the
flattened format used by the kernel.  Sometimes, the bootwrapper makes
small changes to the pre-compiled device tree blob (e.g. filling in
the size of RAM).  To do this it uses the libfdt library.

Because these are only used on powerpc, the code for both these tools
is included under arch/powerpc/boot (these were imported and are
periodically updated from the upstream dtc tree).

However, the microblaze architecture, currently being prepared for
merging to mainline also uses dtc to produce device tree blobs.  A few
other archs have also mentioned some interest in using dtc.
Therefore, this patch moves dtc and libfdt from arch/powerpc into
scripts, where it can be used by any architecture.

The vast bulk of this patch is a literal move, the rest is adjusting
the various Makefiles to use dtc and libfdt correctly from their new
locations.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
Linus Torvalds [Sat, 2 May 2009 23:50:46 +0000 (16:50 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jlbec/configfs

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/configfs:
  configfs: Fix Trivial Warning in fs/configfs/symlink.c

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sat, 2 May 2009 23:48:32 +0000 (16:48 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bart/ide-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide-cd: fix REQ_QUIET tests in cdrom_decode_status

Fix up trivial conflicts in include/linux/blkdev.h

14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sat, 2 May 2009 23:40:20 +0000 (16:40 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm: (45 commits)
  [ARM] 5489/1: ARM errata: Data written to the L2 cache can be overwritten with stale data
  [ARM] 5490/1: ARM errata: Processor deadlock when a false hazard is created
  [ARM] 5487/1: ARM errata: Stale prediction on replaced interworking branch
  [ARM] 5488/1: ARM errata: Invalidation of the Instruction Cache operation can fail
  davinci: DM644x: NAND: update partitioning
  davinci: update DM644x support in preparation for more SoCs
  davinci: DM644x: rename board file
  davinci: update pin-multiplexing support
  davinci: serial: generalize for more SoCs
  davinci: DM355 IRQ Definitions
  davinci: DM646x: add interrupt number and priorities
  davinci: PSC: Clear bits in MDCTL reg before setting new bits
  davinci: gpio bugfixes
  davinci: add EDMA driver
  davinci: timers: use clk_get_rate()
  [ARM] pxa/littleton: add missing da9034 touchscreen support
  [ARM] pxa/zylonite: configure GPIO18/19 correctly, used by 2 GPIO expanders
  [ARM] pxa/zylonite: fix the issue of unused SDATA_IN_1 pin get AC97 not working
  [ARM] pxa: make ads7846 on corgi and spitz to sync on HSYNC
  [ARM] pxa: remove unused CPU_FREQ_PXA Kconfig symbol
  ...

14 years agoMerge branch 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 2 May 2009 23:38:30 +0000 (16:38 -0700)]
Merge branch 'x86-mce-for-linus' of git://git./linux/kernel/git/x86/linux-2.6-tip

* 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
  x86, mce: fix boot logging logic
  x86, mce: make polling timer interval per CPU

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Sat, 2 May 2009 23:36:34 +0000 (16:36 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (53 commits)
  [SCSI] libosd: OSD2r05: on-the-wire changes for latest OSD2 revision 5.
  [SCSI] libosd: OSD2r05: OSD_CRYPTO_KEYID_SIZE will grow 20 => 32 bytes
  [SCSI] libosd: OSD2r05: Prepare for rev5 attribute list changes
  [SCSI] libosd: fix potential ERR_PTR dereference in osd_initiator.c
  [SCSI] mpt2sas : bump driver version to 01.100.02.00
  [SCSI] mpt2sas: fix hotplug event processing
  [SCSI] mpt2sas : release diagnotic buffers prior host reset
  [SCSI] mpt2sas : Broadcast Primative AEN bug fix
  [SCSI] mpt2sas : Identify Dell series-7 adapters at driver load time
  [SCSI] mpt2sas : driver name needs to be in the MPT2IOCINFO ioctl
  [SCSI] mpt2sas : running out of message frames
  [SCSI] mpt2sas : fix oops when firmware sends large sense buffer size
  [SCSI] mpt2sas : the sanity check in base_interrupt needs to be on dword boundary
  [SCSI] mpt2sas : unique ioctl magic number
  [SCSI] fix sign extension with 1.5TB usb-storage LBD=y
  [SCSI] ipr: Fix sleeping function called with interrupts disabled
  [SCSI] fcoe: fip: add multicast filter to receive FIP advertisements.
  [SCSI] libfc: Fix compilation warnings with allmodconfig
  [SCSI] fcoe: fix spelling typos and bad comments
  [SCSI] fcoe: don't export functions that are internal to fcoe
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sat, 2 May 2009 23:35:45 +0000 (16:35 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: document the multi-touch (MT) protocol
  Input: add detailed multi-touch finger data report protocol
  Input: allow certain EV_ABS events to bypass all filtering
  Input: bcm5974 - add documentation for the driver
  Input: bcm5974 - augment debug information
  Input: bcm5974 - Add support for the Macbook 5 (Unibody)
  Input: bcm5974 - add quad-finger tapping
  Input: bcm5974 - prepare for a new trackpad header type
  Input: appletouch - fix DMA to/from stack buffer
  Input: wacom - fix TabletPC touch bug
  Input: lifebook - add DMI entry for Fujitsu B-2130
  Input: ALPS - add signature for Toshiba Satellite Pro M10
  Input: elantech - make sure touchpad is really in absolute mode
  Input: elantech - provide a workaround for jumpy cursor on firmware 2.34
  Input: ucb1400 - use disable_irq_nosync() in irq handler
  Input: tsc2007 - use disable_irq_nosync() in irq handler
  Input: sa1111ps2 - use disable_irq_nosync() in irq handlers
  Input: omap-keypad - use disable_irq_nosync() in irq handler

14 years agoSUNRPC: Fix the problem of EADDRNOTAVAIL syslog floods on reconnect
Trond Myklebust [Tue, 21 Apr 2009 21:18:20 +0000 (17:18 -0400)]
SUNRPC: Fix the problem of EADDRNOTAVAIL syslog floods on reconnect

See http://bugzilla.kernel.org/show_bug.cgi?id=13034

If the port gets into a TIME_WAIT state, then we cannot reconnect without
binding to a new port.

Tested-by: Petr Vandrovec <petr@vandrovec.name>
Tested-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild...
Linus Torvalds [Sat, 2 May 2009 23:33:56 +0000 (16:33 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/sam/kbuild-fixes

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild, modpost: Check the section flags, to catch missing "ax"/"aw"
  kbuild: fix comment in modpost.c
  kbuild: fix scripts/setlocalversion with git
  kbuild: fix Module.markers permission error under cygwin
  docs: also clean index.html
  kbuild: remove a tag file before it is regenerated
  kbuild: "make prepare" should be "make modules_prepare"
  kbuild: clean Module.markers and modules.order for out-of-tree modules
  avr32: drop unused CLEAN_FILES

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
Linus Torvalds [Sat, 2 May 2009 23:30:47 +0000 (16:30 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jlbec/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
  ocfs2: Change repository in MAINTAINERS.
  ocfs2: Fix a missing credit when deleting from indexed directories.
  ocfs2/trivial: Remove unused variable in ocfs2_rename.
  ocfs2: Add missing iput() during error handling in ocfs2_dentry_attach_lock()
  ocfs2: Fix some printk() warnings.
  ocfs2: Fix 2 warning during ocfs2 make.
  ocfs2: Reserve 1 more cluster in expanding_inline_dir for indexed dir.

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Sat, 2 May 2009 23:29:47 +0000 (16:29 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: fix oops in hid_check_keys_pressed()
  HID: fix possible deadlock in usbhid_close()
  HID: Fix the support for apple mini aluminium keyboard
  HID: Add support for the G25 force feedback wheel in native mode
  HID: hidraw -- fix missing unlocks in unlocked_ioctl

14 years agoMerge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev
Linus Torvalds [Sat, 2 May 2009 23:28:58 +0000 (16:28 -0700)]
Merge branch 'for-linus' of git://linux-m32r.org/git/takata/linux-2.6_dev

* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
  m32r: use __stringify() macro in assembler.h
  m32r: build fix for __stringify macro

14 years agoibft: fix the display of a few fields in the NIC attribute structure in sysfs
Ashutosh Naik [Thu, 30 Apr 2009 22:08:58 +0000 (15:08 -0700)]
ibft: fix the display of a few fields in the NIC attribute structure in sysfs

Fix the display of a few fields in the iBFT NIC attribute structure in
sysfs.

Ensure that, if the DHCP IP address and the subnet mask for the interface
is present in the iBFT NIC structure, the corresponding entries are
created in sysfs tree for the device.  This would hence create the
additional entries in the tree based on the iBFT table and would not
delete any existing entries.

Signed-off-by: Ashutosh Naik <ashutosh.naik@gmail.com>
Cc: Vishnu V <vishnu@chelsio.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: prevent divide error for small values of vm_dirty_bytes
Andrea Righi [Thu, 30 Apr 2009 22:08:57 +0000 (15:08 -0700)]
mm: prevent divide error for small values of vm_dirty_bytes

Avoid setting less than two pages for vm_dirty_bytes: this is necessary to
avoid potential division by 0 (like the following) in get_dirty_limits().

[   49.951610] divide error: 0000 [#1] PREEMPT SMP
[   49.952195] last sysfs file: /sys/devices/pci0000:00/0000:00:01.1/host0/target0:0:0/0:0:0:0/block/sda/uevent
[   49.952195] CPU 1
[   49.952195] Modules linked in: pcspkr
[   49.952195] Pid: 3064, comm: dd Not tainted 2.6.30-rc3 #1
[   49.952195] RIP: 0010:[<ffffffff802d39a9>]  [<ffffffff802d39a9>] get_dirty_limits+0xe9/0x2c0
[   49.952195] RSP: 0018:ffff88001de03a98  EFLAGS: 00010202
[   49.952195] RAX: 00000000000000c0 RBX: ffff88001de03b80 RCX: 28f5c28f5c28f5c3
[   49.952195] RDX: 0000000000000000 RSI: 00000000000000c0 RDI: 0000000000000000
[   49.952195] RBP: ffff88001de03ae8 R08: 0000000000000000 R09: 0000000000000000
[   49.952195] R10: ffff88001ddda9a0 R11: 0000000000000001 R12: 0000000000000001
[   49.952195] R13: ffff88001fbc8218 R14: ffff88001de03b70 R15: ffff88001de03b78
[   49.952195] FS:  00007fe9a435b6f0(0000) GS:ffff8800025d9000(0000) knlGS:0000000000000000
[   49.952195] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   49.952195] CR2: 00007fe9a39ab000 CR3: 000000001de38000 CR4: 00000000000006e0
[   49.952195] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   49.952195] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   49.952195] Process dd (pid: 3064, threadinfo ffff88001de02000, task ffff88001ddda250)
[   49.952195] Stack:
[   49.952195]  ffff88001fa0de00 ffff88001f2dbd70 ffff88001f9fe800 000080b900000000
[   49.952195]  00000000000000c0 ffff8800027a6100 0000000000000400 ffff88001fbc8218
[   49.952195]  0000000000000000 0000000000000600 ffff88001de03bb8 ffffffff802d3ed7
[   49.952195] Call Trace:
[   49.952195]  [<ffffffff802d3ed7>] balance_dirty_pages_ratelimited_nr+0x1d7/0x3f0
[   49.952195]  [<ffffffff80368f8e>] ? ext3_writeback_write_end+0x9e/0x120
[   49.952195]  [<ffffffff802cc7df>] generic_file_buffered_write+0x12f/0x330
[   49.952195]  [<ffffffff802cce8d>] __generic_file_aio_write_nolock+0x26d/0x460
[   49.952195]  [<ffffffff802cda32>] ? generic_file_aio_write+0x52/0xd0
[   49.952195]  [<ffffffff802cda49>] generic_file_aio_write+0x69/0xd0
[   49.952195]  [<ffffffff80365fa6>] ext3_file_write+0x26/0xc0
[   49.952195]  [<ffffffff803034d1>] do_sync_write+0xf1/0x140
[   49.952195]  [<ffffffff80290d1a>] ? get_lock_stats+0x2a/0x60
[   49.952195]  [<ffffffff80280730>] ? autoremove_wake_function+0x0/0x40
[   49.952195]  [<ffffffff8030411b>] vfs_write+0xcb/0x190
[   49.952195]  [<ffffffff803042d0>] sys_write+0x50/0x90
[   49.952195]  [<ffffffff8022ff6b>] system_call_fastpath+0x16/0x1b
[   49.952195] Code: 00 00 00 2b 05 09 1c 17 01 48 89 c6 49 0f af f4 48 c1 ee 02 48 89 f0 48 f7 e1 48 89 d6 31 d2 48 c1 ee 02 48 0f af 75 d0 48 89 f0 <48> f7 f7 41 8b 95 ac 01 00 00 48 89 c7 49 0f af d4 48 c1 ea 02
[   49.952195] RIP  [<ffffffff802d39a9>] get_dirty_limits+0xe9/0x2c0
[   49.952195]  RSP <ffff88001de03a98>
[   50.096523] ---[ end trace 008d7aa02f244d7b ]---

Signed-off-by: Andrea Righi <righi.andrea@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agovmscan: avoid multiplication overflow in shrink_zone()
Andrew Morton [Thu, 30 Apr 2009 22:08:55 +0000 (15:08 -0700)]
vmscan: avoid multiplication overflow in shrink_zone()

Local variable `scan' can overflow on zones which are larger than

(2G * 4k) / 100 = 80GB.

Making it 64-bit on 64-bit will fix that up.

Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoptrace: s/parent/real_parent/ in binfmt_elf_fdpic.c
Oleg Nesterov [Thu, 30 Apr 2009 22:08:54 +0000 (15:08 -0700)]
ptrace: s/parent/real_parent/ in binfmt_elf_fdpic.c

->real_parent is the parent. ->parent may be the tracer.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agokernel-doc: restrict syntax for private: and public:
Randy Dunlap [Thu, 30 Apr 2009 22:08:53 +0000 (15:08 -0700)]
kernel-doc: restrict syntax for private: and public:

scripts/kernel-doc can (incorrectly) delete struct members that are
surrounded by /* ...  */ <struct members> /* ...  */ if there is a /*
private: */ comment in there somewhere also.

Fix that by making the "/* private:" only allow whitespace between /* and
"private:", not anything/everything in the world.

This fixes some erroneous kernel-doc warnings that popped up while
processing include/linux/usb/composite.h.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: fix Committed_AS underflow on large NR_CPUS environment
KOSAKI Motohiro [Thu, 30 Apr 2009 22:08:51 +0000 (15:08 -0700)]
mm: fix Committed_AS underflow on large NR_CPUS environment

The Committed_AS field can underflow in certain situations:

>         # while true; do cat /proc/meminfo  | grep _AS; sleep 1; done | uniq -c
>               1 Committed_AS: 18446744073709323392 kB
>              11 Committed_AS: 18446744073709455488 kB
>               6 Committed_AS:    35136 kB
>               5 Committed_AS: 18446744073709454400 kB
>               7 Committed_AS:    35904 kB
>               3 Committed_AS: 18446744073709453248 kB
>               2 Committed_AS:    34752 kB
>               9 Committed_AS: 18446744073709453248 kB
>               8 Committed_AS:    34752 kB
>               3 Committed_AS: 18446744073709320960 kB
>               7 Committed_AS: 18446744073709454080 kB
>               3 Committed_AS: 18446744073709320960 kB
>               5 Committed_AS: 18446744073709454080 kB
>               6 Committed_AS: 18446744073709320960 kB

Because NR_CPUS can be greater than 1000 and meminfo_proc_show() does
not check for underflow.

But NR_CPUS proportional isn't good calculation.  In general,
possibility of lock contention is proportional to the number of online
cpus, not theorical maximum cpus (NR_CPUS).

The current kernel has generic percpu-counter stuff.  using it is right
way.  it makes code simplify and percpu_counter_read_positive() don't
make underflow issue.

Reported-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Eric B Munson <ebmunson@us.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: <stable@kernel.org> [All kernel versions]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoof: make of_(un)register_platform_driver common code
Grant Likely [Thu, 30 Apr 2009 22:08:50 +0000 (15:08 -0700)]
of: make of_(un)register_platform_driver common code

Some drivers using of_register_platform_driver() wrapper break on sparc
because the wrapper isn't in the header file.  This patch moves it from
Microblaze and PowerPC implementations and makes it common code.

Fixes this sparc64 allmodconfig build error (at least):

drivers/leds/leds-gpio.c: In function `gpio_led_init':
drivers/leds/leds-gpio.c:295: error: implicit declaration of function `of_register_platform_driver'
drivers/leds/leds-gpio.c: In function `gpio_led_exit':
drivers/leds/leds-gpio.c:311: error: implicit declaration of function `of_unregister_platform_driver'

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoalpha: binfmt_aout fix
Ivan Kokshaysky [Thu, 30 Apr 2009 22:08:49 +0000 (15:08 -0700)]
alpha: binfmt_aout fix

This fixes the problem introduced by commit 3bfacef412 (get rid of
special-casing the /sbin/loader on alpha): osf/1 ecoff binary segfaults
when binfmt_aout built as module.  That happens because aout binary
handler gets on the top of the binfmt list due to late registration, and
kernel attempts to execute the binary without preparatory work that must
be done by binfmt_loader.

Fixed by changing the registration order of the default binfmt handlers
using list_add_tail() and introducing insert_binfmt() function which
places new handler on the top of the binfmt list.  This might be generally
useful for installing arch-specific frontends for default handlers or just
for overriding them.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Richard Henderson <rth@twiddle.net
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoalpha: futex implementation
Ivan Kokshaysky [Thu, 30 Apr 2009 22:08:48 +0000 (15:08 -0700)]
alpha: futex implementation

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Richard Henderson <rth@twiddle.net
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoalpha: exception table sorting
Ivan Kokshaysky [Thu, 30 Apr 2009 22:08:47 +0000 (15:08 -0700)]
alpha: exception table sorting

Exception fixups for sections other than .text (like one in futex_init())
break the natural ordering of fixup entries, so sorting is required.

Without that the result of the exception table search depends on phase of
the moon.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Richard Henderson <rth@twiddle.net
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoalpha: titan and marvel build fixes
Ivan Kokshaysky [Thu, 30 Apr 2009 22:08:45 +0000 (15:08 -0700)]
alpha: titan and marvel build fixes

These platforms got broken after u64 => 'long long' conversion.

Apparently that change was compile-tested with 'make allmodconfig', but it
doesn't include systems that depend on !ALPHA_LEGACY_START_ADDRESS.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Richard Henderson <rth@twiddle.net
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agovgacon: return the upper half of 512 character fonts
Stefan Bader [Thu, 30 Apr 2009 22:08:44 +0000 (15:08 -0700)]
vgacon: return the upper half of 512 character fonts

Uwe Geuder noted that he gets random bitmaps on a text console if he tried
to type extended characters (like the e acute).  For him everything above
unicode 0xa0 was corrupted.

After some digging there seems to be a little culprit in vgacon since the
beginning of ages (well git).  The function vgacon_font_get will store the
number of characters correctly in font->charcount but then calls to
vgacon_do_font_op(..., 0, 0).  Which means only the lower 256 characters
are actually stored to the fontdata.  The rest is left untouched.  So the
next time that saved data is used, the garbled font appears.  This happens
on every switch between text consoles.

Addresses https://bugs.launchpad.net/ubuntu/+source/linux/+bug/355057

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Tested-by: Uwe Geuder <ubuntuLp-ugeuder@sneakemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomemcg: fix mem_cgroup_shrink_usage()
Daisuke Nishimura [Thu, 30 Apr 2009 22:08:19 +0000 (15:08 -0700)]
memcg: fix mem_cgroup_shrink_usage()

Current mem_cgroup_shrink_usage() has two problems.

1. It doesn't call mem_cgroup_out_of_memory and doesn't update
   last_oom_jiffies, so pagefault_out_of_memory invokes global OOM.

2. Considering hierarchy, shrinking has to be done from the
   mem_over_limit, not from the memcg which the page would be charged to.

mem_cgroup_try_charge_swapin() does all of these things properly, so we
use it and call cancel_charge_swapin when it succeeded.

The name of "shrink_usage" is not appropriate for this behavior, so we
change it too.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.cn>
Cc: Paul Menage <menage@google.com>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agopagemap: require aligned-length, non-null reads of /proc/pid/pagemap
Vitaly Mayatskikh [Thu, 30 Apr 2009 22:08:18 +0000 (15:08 -0700)]
pagemap: require aligned-length, non-null reads of /proc/pid/pagemap

The intention of commit aae8679b0ebcaa92f99c1c3cb0cd651594a43915
("pagemap: fix bug in add_to_pagemap, require aligned-length reads of
/proc/pid/pagemap") was to force reads of /proc/pid/pagemap to be a
multiple of 8 bytes, but now it allows to read 0 bytes, which actually
puts some data to user's buffer.  According to POSIX, if count is zero,
read() should return zero and has no other results.

Signed-off-by: Vitaly Mayatskikh <v.mayatskih@gmail.com>
Cc: Thomas Tuttle <ttuttle@google.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: close page_mkwrite races
Nick Piggin [Thu, 30 Apr 2009 22:08:16 +0000 (15:08 -0700)]
mm: close page_mkwrite races

Change page_mkwrite to allow implementations to return with the page
locked, and also change it's callers (in page fault paths) to hold the
lock until the page is marked dirty.  This allows the filesystem to have
full control of page dirtying events coming from the VM.

Rather than simply hold the page locked over the page_mkwrite call, we
call page_mkwrite with the page unlocked and allow callers to return with
it locked, so filesystems can avoid LOR conditions with page lock.

The problem with the current scheme is this: a filesystem that wants to
associate some metadata with a page as long as the page is dirty, will
perform this manipulation in its ->page_mkwrite.  It currently then must
return with the page unlocked and may not hold any other locks (according
to existing page_mkwrite convention).

In this window, the VM could write out the page, clearing page-dirty.  The
filesystem has no good way to detect that a dirty pte is about to be
attached, so it will happily write out the page, at which point, the
filesystem may manipulate the metadata to reflect that the page is no
longer dirty.

It is not always possible to perform the required metadata manipulation in
->set_page_dirty, because that function cannot block or fail.  The
filesystem may need to allocate some data structure, for example.

And the VM cannot mark the pte dirty before page_mkwrite, because
page_mkwrite is allowed to fail, so we must not allow any window where the
page could be written to if page_mkwrite does fail.

This solution of holding the page locked over the 3 critical operations
(page_mkwrite, setting the pte dirty, and finally setting the page dirty)
closes out races nicely, preventing page cleaning for writeout being
initiated in that window.  This provides the filesystem with a strong
synchronisation against the VM here.

- Sage needs this race closed for ceph filesystem.
- Trond for NFS (http://bugzilla.kernel.org/show_bug.cgi?id=12913).
- I need it for fsblock.
- I suspect other filesystems may need it too (eg. btrfs).
- I have converted buffer.c to the new locking. Even simple block allocation
  under dirty pages might be susceptible to i_size changing under partial page
  at the end of file (we also have a buffer.c-side problem here, but it cannot
  be fixed properly without this patch).
- Other filesystems (eg. NFS, maybe btrfs) will need to change their
  page_mkwrite functions themselves.

[ This also moves page_mkwrite another step closer to fault, which should
  eventually allow page_mkwrite to be moved into ->fault, and thus avoiding a
  filesystem calldown and page lock/unlock cycle in __do_fault. ]

[akpm@linux-foundation.org: fix derefs of NULL ->mapping]
Cc: Sage Weil <sage@newdream.net>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoatomic: fix atomic_long_cmpxchg/xchg for 64 bit architectures
Heiko Carstens [Thu, 30 Apr 2009 22:08:14 +0000 (15:08 -0700)]
atomic: fix atomic_long_cmpxchg/xchg for 64 bit architectures

On a linux-next allyesconfig build:

kernel/trace/ring_buffer.c:1726:
warning: passing argument 1 of 'atomic_cmpxchg' from incompatible pointer type
linux-next/arch/s390/include/asm/atomic.h:112:
note: expected 'struct atomic_t *' but argument is of type 'struct atomic64_t *'

atomic_long_cmpxchg and atomic_long_xchg are incorrectly defined for 64
bit architectures.  They should be mapped to the atomic64_* variants.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoCRISv10: fix serial driver proc-usage
Jesper Nilsson [Thu, 30 Apr 2009 22:08:13 +0000 (15:08 -0700)]
CRISv10: fix serial driver proc-usage

drivers/serial/crisv10.c:4428: error: unknown field 'read_proc' specified in initializer

Commit 0f043a81ebe84be3576667f04fdda481609e3816 ("proc tty: remove struct
tty_operations::read_proc") removes the read_proc entry from struct
tty_operations.

Rework the proc handling in the CRISv10 serial driver to use proc_fops
instead.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMAINTAINERS: add ptrace entry
Christoph Hellwig [Thu, 30 Apr 2009 22:08:12 +0000 (15:08 -0700)]
MAINTAINERS: add ptrace entry

Add Roland and Oleg as formal ptrace maintainers, they've been doing the
job for a while.

Includes the file patterns requested by Joe.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomemcg: fix try_get_mem_cgroup_from_swapcache()
Daisuke Nishimura [Thu, 30 Apr 2009 22:08:11 +0000 (15:08 -0700)]
memcg: fix try_get_mem_cgroup_from_swapcache()

This is a bugfix for commit 3c776e64660028236313f0e54f3a9945764422df
("memcg: charge swapcache to proper memcg").

Used bit of swapcache is solid under page lock, but considering
move_account, pc->mem_cgroup is not.

We need lock_page_cgroup() anyway.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMAINTAINERS: Florian has moved
Florian Fainelli [Thu, 30 Apr 2009 22:08:10 +0000 (15:08 -0700)]
MAINTAINERS: Florian has moved

I will finish school soon, so replace my student address with this one.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: fix incorrect return in autofs4_mount_busy()
Ian Kent [Thu, 30 Apr 2009 22:08:09 +0000 (15:08 -0700)]
autofs4: fix incorrect return in autofs4_mount_busy()

Fix an obvious incorrect return status in autofs4_mount_busy().

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: fix pageref leak in do_swap_page()
Johannes Weiner [Thu, 30 Apr 2009 22:08:08 +0000 (15:08 -0700)]
mm: fix pageref leak in do_swap_page()

By the time the memory cgroup code is notified about a swapin we
already hold a reference on the fault page.

If the cgroup callback fails make sure to unlock AND release the page
reference which was taken by lookup_swap_cach(), or we leak the reference.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoacpica: validate package element more carefully in acpi_rs_get_pci_routing_table_length
Robert Moore [Sat, 2 May 2009 18:48:37 +0000 (11:48 -0700)]
acpica: validate package element more carefully in acpi_rs_get_pci_routing_table_length

acpi_rs_get_pci_routing_table_length is not performing sufficient
validation on the package returned from _PRT.  It assumes a package of
packages and fails/faults if this is not the case.

We should validate each subpackage when extracted from the parent
package, and not accept objects of the wrong type, since that will just
cause the scanning to fail (likely with a kernel oops).

This can only happen with a serious BIOS bug, and is accompanied by a
warning something like this:

  ACPI Warning (nspredef-0949): \_SB_.PCI0.PEG4._PRT: Return Package type mismatch at index 0 - found Integer, expected Package [20090320]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agom32r: use __stringify() macro in assembler.h
Hirokazu Takata [Sat, 2 May 2009 13:08:33 +0000 (22:08 +0900)]
m32r: use __stringify() macro in assembler.h

Replace #x with __stringify(x).
Also, #ifndef __STR is removed and undefine __STR macro at the beginning.

The __STR() macro is still remained, because the assembler.h might be
included from assembly codes as well as C codes.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
14 years agom32r: build fix for __stringify macro
Hirokazu Takata [Sat, 2 May 2009 11:29:00 +0000 (20:29 +0900)]
m32r: build fix for __stringify macro

This patch fixes the following build error of 2.6.30-rc3-git2:

      AS      arch/m32r/kernel/head.o
    In file included from /include/linux/init.h:7,
                     from /arch/m32r/kernel/head.S:11:
    /include/linux/stringify.h:9: error: syntax error in macro parameter list
    /include/linux/stringify.h:10: error: syntax error in macro parameter list

This build error was caused at __HEAD macro in arch/m32r/kernel/head.S,
which uses __stringify() macro.

Remove -traditional option from EXTRA_AFLAGS for the m32r,
because the __stringify() macro depends on the gcc's variadic macro
extension function, due to commit:

    Make __stringify support variable argument macros too
    commit: 8f7c2c37319a81ef4c2bfdec67b1ccd5744d97e4

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
14 years agoHID: fix oops in hid_check_keys_pressed()
Jiri Kosina [Fri, 1 May 2009 22:02:57 +0000 (00:02 +0200)]
HID: fix oops in hid_check_keys_pressed()

If the device is not claimed by hid-input (i.e devices driver by userspace
hiddev/hidraw-based drivers, or completely detached from HID
and driver by libusb), we must not check the hid->inptus, as it
is not guaranteed to be initialized, as this is performed only for devices
handled by hid-input.

Reported-by: Guillaume Chazarain <guichaz@gmail.com>
Tested-by: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agokbuild, modpost: Check the section flags, to catch missing "ax"/"aw"
Anders Kaseorg [Thu, 23 Apr 2009 20:49:33 +0000 (16:49 -0400)]
kbuild, modpost: Check the section flags, to catch missing "ax"/"aw"

When you put
  .section ".foo"
in an assembly file instead of
  .section "foo", "ax"
, one of the possible symptoms is that modpost will see an
ld-generated section name ".foo.1" in section_rel() or section_rela().
But this heuristic has two problems: it will miss a bad section that
has no relocations, and it will incorrectly flag many gcc-generated
sections as bad when compiling with -ffunction-sections
-fdata-sections.

On mips it fixes a lot of bogus warnings with gcc 4.4.0 lije this one:
WARNING: crypto/cryptd.o (.text.T.349): unexpected section name.

So instead of checking whether the section name matches a particular
pattern, we directly check for a missing SHF_ALLOC in the section
flags.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: fix comment in modpost.c
Sam Ravnborg [Sun, 26 Apr 2009 09:17:42 +0000 (11:17 +0200)]
kbuild: fix comment in modpost.c

There is some confusion on naming of the head section.
Correct naming is .head.text.

Fix comment so we use correct naming.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: fix scripts/setlocalversion with git
Nico Schottelius [Sat, 25 Apr 2009 07:48:39 +0000 (09:48 +0200)]
kbuild: fix scripts/setlocalversion with git

When using trees like wireless-testing, which have untagged tags,
scripts/setlocalversion does not display any git indication for
localversion.

This patch fixes it: If git is available, but no usable tag is found,
it uses -g${head}. It skips the detection of unanottated tags via
git name-rev.

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: fix Module.markers permission error under cygwin
Cedric Hombourger [Sat, 25 Apr 2009 07:38:21 +0000 (09:38 +0200)]
kbuild: fix Module.markers permission error under cygwin

While building the kernel, we end-up calling modpost with -K and -M
options for the same file (Modules.markers).  This is resulting in
modpost's main function calling read_markers() and then write_markers() on
the same file.

We then have read_markers() mmap'ing the file, and writer_markers()
opening that same file for writing.

The issue is that read_markers() exits without munmap'ing the file and is
as a matter holding a reference on Modules.markers.  When write_markers()
is opening that very same file for writing, we still have a reference on
it and cygwin (Windows?) is then making fopen() fail with EPERM.

Calling release_file() before exiting read_markers() clears that reference
(and memory leak) and fopen() then succeeds.

Tested on both cygwin (1.3.22) and Linux.  Also ran modpost within
valgrind on Linux to make sure that the munmap'ed file was not accessed
after read_markers()

Signed-off-by: Cedric Hombourger <chombourger@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agodocs: also clean index.html
Randy Dunlap [Sat, 18 Apr 2009 01:28:55 +0000 (18:28 -0700)]
docs: also clean index.html

Missed index.html in "make cleandocs", so add it.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: remove a tag file before it is regenerated
Matt Kraai [Wed, 22 Apr 2009 03:38:23 +0000 (20:38 -0700)]
kbuild: remove a tag file before it is regenerated

If a tag file is not removed before it is regenerated, the newly
generated data is appended to the old, which preserves stale data and
makes the tag file grow over time.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: "make prepare" should be "make modules_prepare"
Robert P. J. Day [Fri, 24 Apr 2009 16:35:23 +0000 (12:35 -0400)]
kbuild: "make prepare" should be "make modules_prepare"

Correct the Makefile help text to read "make modules_prepare".

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agokbuild: clean Module.markers and modules.order for out-of-tree modules
Frédéric Brière [Sun, 19 Apr 2009 16:58:40 +0000 (12:58 -0400)]
kbuild: clean Module.markers and modules.order for out-of-tree modules

Signed-off-by: Frédéric Brière <fbriere@fbriere.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
14 years agoavr32: drop unused CLEAN_FILES
Sam Ravnborg [Mon, 20 Apr 2009 18:02:16 +0000 (20:02 +0200)]
avr32: drop unused CLEAN_FILES

Left over from before we used arch/avr32/include

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
14 years agoocfs2: Change repository in MAINTAINERS.
Joel Becker [Fri, 17 Apr 2009 22:58:50 +0000 (15:58 -0700)]
ocfs2: Change repository in MAINTAINERS.

The ocfs2.git repository is moving to my kernel.org account.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
14 years agoocfs2: Fix a missing credit when deleting from indexed directories.
Joel Becker [Thu, 30 Apr 2009 00:55:08 +0000 (17:55 -0700)]
ocfs2: Fix a missing credit when deleting from indexed directories.

The ocfs2 directory index updates two blocks when we remove an entry -
the dx root and the dx leaf.  OCFS2_DELETE_INODE_CREDITS was only
accounting for the dx leaf.  This shows up when ocfs2_delete_inode()
runs out of credits in jbd2_journal_dirty_metadata() at
"J_ASSERT_JH(jh, handle->h_buffer_credits > 0);".

The test that caught this was running dirop_file_racer from the
ocfs2-test suite with a 250-character filename PREFIX.  Run on a 512B
blocksize, it forces the orphan dir index to grow large enough to
trigger.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 years ago[ARM] 5489/1: ARM errata: Data written to the L2 cache can be overwritten with stale...
Catalin Marinas [Thu, 30 Apr 2009 16:06:20 +0000 (17:06 +0100)]
[ARM] 5489/1: ARM errata: Data written to the L2 cache can be overwritten with stale data

This patch is a workaround for the 460075 Cortex-A8 (r2p0) erratum. It
configures the L2 cache auxiliary control register so that the Write
Allocate mode for the L2 cache is disabled.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years ago[ARM] 5490/1: ARM errata: Processor deadlock when a false hazard is created
Catalin Marinas [Thu, 30 Apr 2009 16:06:15 +0000 (17:06 +0100)]
[ARM] 5490/1: ARM errata: Processor deadlock when a false hazard is created

This patch adds a workaround for the 458693 Cortex-A8 (r2p0)
erratum. It sets the corresponding bits in the auxiliary control
register so that the PLD instruction becomes a NOP.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years ago[ARM] 5487/1: ARM errata: Stale prediction on replaced interworking branch
Catalin Marinas [Thu, 30 Apr 2009 16:06:09 +0000 (17:06 +0100)]
[ARM] 5487/1: ARM errata: Stale prediction on replaced interworking branch

This patch adds the workaround for the 430973 Cortex-A8 (r1p0..r1p2)
erratum. The BTAC/BTB is now flushed at every context switch.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years ago[ARM] 5488/1: ARM errata: Invalidation of the Instruction Cache operation can fail
Catalin Marinas [Thu, 30 Apr 2009 16:06:03 +0000 (17:06 +0100)]
[ARM] 5488/1: ARM errata: Invalidation of the Instruction Cache operation can fail

This patch implements the recommended workaround for erratum 411920
(ARM1136, ARM1156, ARM1176).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoInput: document the multi-touch (MT) protocol
Henrik Rydberg [Tue, 28 Apr 2009 14:49:21 +0000 (07:49 -0700)]
Input: document the multi-touch (MT) protocol

This patchs adds documentation for the multi-touch protocol to
Documentation/input/.

[randy.dunlap@oracle.com: grammar fixes]
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoide-cd: fix REQ_QUIET tests in cdrom_decode_status
Borislav Petkov [Thu, 30 Apr 2009 16:24:34 +0000 (18:24 +0200)]
ide-cd: fix REQ_QUIET tests in cdrom_decode_status

Original patch (dfa4411cc3a690011cab90e9a536938795366cf9) was buggy.
This is a more proper fix which introduces blk_rq_quiet() macro
alleviating the need for dumb, too short caching variables.

Thanks to Helge Deller and Bart for debugging this.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Reported-and-tested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
14 years agoxfs: fix getbmap vs mmap deadlock
Christoph Hellwig [Tue, 24 Feb 2009 13:39:02 +0000 (08:39 -0500)]
xfs: fix getbmap vs mmap deadlock

xfs_getbmap (or rather the formatters called by it) copy out the getbmap
structures under the ilock, which can deadlock against mmap.  This has
been reported via bugzilla a while ago (#717) and has recently also
shown up via lockdep.

So allocate a temporary buffer to format the kernel getbmap structures
into and then copy them out after dropping the locks.

A little problem with this is that we limit the number of extents we
can copy out by the maximum allocation size, but I see no real way
around that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
14 years agoxfs: a couple getbmap cleanups
Christoph Hellwig [Wed, 29 Apr 2009 14:50:48 +0000 (10:50 -0400)]
xfs: a couple getbmap cleanups

 - reshuffle various conditionals for data vs attr fork to make the code
   more readable
 - do fine-grainded goto-based error handling
 - exit early from conditionals instead of keeping a long else branch around
 - allow kmem_alloc to fail

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
14 years agoxfs: add more checks to superblock validation
Olaf Weber [Fri, 17 Apr 2009 21:12:45 +0000 (16:12 -0500)]
xfs: add more checks to superblock validation

There had been reports where xfs filesystem was randomly
corrupted with fsfuzzer, and xfs failed to handle it
gracefully. This patch fixes couple of reported problem
by providing additional checks in the superblock
validation routine.

Signed-off-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
14 years agoxfs_file_last_byte() needs to acquire ilock
Lachlan McIlroy [Fri, 24 Apr 2009 02:18:00 +0000 (22:18 -0400)]
xfs_file_last_byte() needs to acquire ilock

We had some systems crash with this stack:

[<a00000010000cb20>] ia64_leave_kernel+0x0/0x280
[<a00000021291ca00>] xfs_bmbt_get_startoff+0x0/0x20 [xfs]
[<a0000002129080b0>] xfs_bmap_last_offset+0x210/0x280 [xfs]
[<a00000021295b010>] xfs_file_last_byte+0x70/0x1a0 [xfs]
[<a00000021295b200>] xfs_itruncate_start+0xc0/0x1a0 [xfs]
[<a0000002129935f0>] xfs_inactive_free_eofblocks+0x290/0x460 [xfs]
[<a000000212998fb0>] xfs_release+0x1b0/0x240 [xfs]
[<a0000002129ad930>] xfs_file_release+0x70/0xa0 [xfs]
[<a000000100162ea0>] __fput+0x1a0/0x420
[<a000000100163160>] fput+0x40/0x60

The problem here is that xfs_file_last_byte() does not acquire the
inode lock and can therefore race with another thread that is modifying
the extext list.  While xfs_bmap_last_offset() is trying to lookup
what was the last extent some extents were merged and the extent list
shrunk so the index we lookup is now beyond the end of the extent list
and potentially in a freed buffer.

Signed-off-by: Lachlan McIlroy <lmcilroy@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
14 years agoLinux 2.6.30-rc4 v2.6.30-rc4
Linus Torvalds [Thu, 30 Apr 2009 04:48:16 +0000 (21:48 -0700)]
Linux 2.6.30-rc4

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs...
Linus Torvalds [Thu, 30 Apr 2009 04:25:53 +0000 (21:25 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ecryptfs/ecryptfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
  eCryptfs: Fix min function comparison warning
  ecryptfs: fix printk format warning

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Thu, 30 Apr 2009 04:25:39 +0000 (21:25 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  V4L/DVB (11652): au0828: fix kernel oops regression on USB disconnect.
  V4L/DVB (11626): cx23885: Two fixes for DViCO FusionHDTV DVB-T Dual Express
  V4L/DVB (11612): mx3_camera: Fix compilation with CONFIG_PM
  V4L/DVB (11570): patch: s2255drv: fix race condition on set mode
  V4L/DVB (11568): cx18: Fix the handling of i2c bus registration error
  V4L/DVB (11561a): move media after i2c
  V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free
  V4L/DVB (11515): drivers/media/video/saa5249.c: fix use-after-free and leak
  V4L/DVB (11494a): cx231xx Kconfig fixes
  V4L/DVB (11494): cx18: Send correct input routing value to external audio multiplexers

14 years agoV4L/DVB (11652): au0828: fix kernel oops regression on USB disconnect.
Devin Heitmueller [Tue, 28 Apr 2009 16:14:07 +0000 (13:14 -0300)]
V4L/DVB (11652): au0828: fix kernel oops regression on USB disconnect.

A regression was introduced in hg changeset 33810c734a0d, which resulted in
a kernel panic whenever the device was disconnected from USB.  The call to
4l2_device_register() was overwriting the pointer for usb_set_intfdata(), so
when au0828_usb_disconnect() was called, the usb_get_intfdata() returned a
pointer to the v4l2_device instead of the au0828_dev structure.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (11626): cx23885: Two fixes for DViCO FusionHDTV DVB-T Dual Express
Christopher Pascoe [Mon, 27 Apr 2009 14:27:04 +0000 (11:27 -0300)]
V4L/DVB (11626): cx23885: Two fixes for DViCO FusionHDTV DVB-T Dual Express

Two fixes for DViCO FusionHDTV DVB-T Dual Express:

 * Reset correct tuner when reinitializing xc3028.
 * Disable the I2C gate control to avoid locking up the I2C bus.

Tested-by: John Knops <jknops@australiaonline.net.au>
Reviewed-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Christopher Pascoe <linuxdvb@itee.uq.edu.au>
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (11612): mx3_camera: Fix compilation with CONFIG_PM
Sascha Hauer [Fri, 24 Apr 2009 15:58:24 +0000 (12:58 -0300)]
V4L/DVB (11612): mx3_camera: Fix compilation with CONFIG_PM

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (11570): patch: s2255drv: fix race condition on set mode
Dean Anderson [Mon, 20 Apr 2009 22:07:44 +0000 (19:07 -0300)]
V4L/DVB (11570): patch: s2255drv: fix race condition on set mode

set_modeready flag must be set before command sent to USB in
s2255_write_config.

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (11568): cx18: Fix the handling of i2c bus registration error
Jean Delvare [Fri, 17 Apr 2009 13:56:51 +0000 (10:56 -0300)]
V4L/DVB (11568): cx18: Fix the handling of i2c bus registration error

* Return actual error values as returned by the i2c subsystem, rather
  than 0 or 1.
* If the registration of the second bus fails, unregister the first one
  before exiting, otherwise we are leaking resources.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (11561a): move media after i2c
Guennadi Liakhovetski [Tue, 21 Apr 2009 07:22:38 +0000 (04:22 -0300)]
V4L/DVB (11561a): move media after i2c

Currently drivers/media drivers are linked very early - directly after
base, block, misc, and mfd and before ata, scsi, ide, input, firewire,
usb, and i2c. This breaks static build of video4linux drivers, that use
generic CPU i2c adapter drivers and the v4l2-subdev subsystem, because
during video4linux probing the v4l2-subdev core requires a struct
i2c_adapter context, which cannot be satisfied before the i2c subsystem is
initialised. Moving drivers/media after drivers/i2c fixes this problem.

The best way to trigger action is by submitting a patch:-) So, let's see
what comes out of it - on the one hand I don't see any reason why media
has to be linked this early, and nobody was able to give me one yesterday
as this problem has been discussed on linux-media, OTOH, maybe indeed it
would be better to move i2c the whole way up above media, but that'd be
much bigger of a change, I think.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free
Dan Carpenter [Tue, 14 Apr 2009 22:51:30 +0000 (19:51 -0300)]
V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free

I lowered the kfree(t) down a couple lines and removed the superflous
"t->vdev = NULL;"

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (11515): drivers/media/video/saa5249.c: fix use-after-free and leak
Dan Carpenter [Tue, 14 Apr 2009 22:50:33 +0000 (19:50 -0300)]
V4L/DVB (11515): drivers/media/video/saa5249.c: fix use-after-free and leak

I moved the kfree() down a couple lines.  t->vdev is going to be in freed
memory so there is no point setting it to NULL.  I added a kfree(t) on a

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (11494a): cx231xx Kconfig fixes
Mauro Carvalho Chehab [Tue, 14 Apr 2009 16:56:58 +0000 (13:56 -0300)]
V4L/DVB (11494a): cx231xx Kconfig fixes

selecting ALSA module breaks if !SND. Just remove select.

While here, let's fix the whitespacing at the Kconfig.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (11494): cx18: Send correct input routing value to external audio multiplexers
Andy Walls [Tue, 14 Apr 2009 00:43:31 +0000 (21:43 -0300)]
V4L/DVB (11494): cx18: Send correct input routing value to external audio multiplexers

A late v4l2_subdev framework change accidentally sent the audio input
routing value to the external multiplexer, instead of the muxer input routing
value to the external multiplexer.  This change corrects that error.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoocfs2/trivial: Remove unused variable in ocfs2_rename.
Tao Ma [Tue, 28 Apr 2009 17:20:55 +0000 (01:20 +0800)]
ocfs2/trivial: Remove unused variable in ocfs2_rename.

With indexed dir enabled, now we use ocfs2_dir_lookup_result to
wrap all the bh used for dir. So remove the 2 unused variables.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 years agoHID: fix possible deadlock in usbhid_close()
Oliver Neukum [Wed, 29 Apr 2009 15:12:12 +0000 (17:12 +0200)]
HID: fix possible deadlock in usbhid_close()

This patch switches usbhid_close() from flush_scheduled_work() to canceling
the outstanding work. This fixes a possible deadlock due to work taking
the mutex usbhid_close() holds. Lockdep reported the problem.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
--
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 29 Apr 2009 14:55:45 +0000 (07:55 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits)
  e100: do not go D3 in shutdown unless system is powering off
  netfilter: revised locking for x_tables
  Bluetooth: Fix connection establishment with low security requirement
  Bluetooth: Add different pairing timeout for Legacy Pairing
  Bluetooth: Ensure that HCI sysfs add/del is preempt safe
  net: Avoid extra wakeups of threads blocked in wait_for_packet()
  net: Fix typo in net_device_ops description.
  ipv4: Limit size of route cache hash table
  Add reference to CAPI 2.0 standard
  Documentation/isdn/INTERFACE.CAPI
  update Documentation/isdn/00-INDEX
  ixgbe: Fix WoL functionality for 82599 KX4 devices
  veth: prevent oops caused by netdev destructor
  xfrm: wrong hash value for temporary SA
  forcedeth: tx timeout fix
  net: Fix LL_MAX_HEADER for CONFIG_TR_MODULE
  mlx4_en: Handle page allocation failure during receive
  mlx4_en: Fix cleanup flow on cq activation
  vlan: update vlan carrier state for admin up/down
  netfilter: xt_recent: fix stack overread in compat code
  ...

14 years agoHID: Fix the support for apple mini aluminium keyboard
Ulrich Dangel [Tue, 28 Apr 2009 14:23:51 +0000 (16:23 +0200)]
HID: Fix the support for apple mini aluminium keyboard

Quirks for the apple mini keyboard was recently added but keyboard
was recognized as a powerbook keyboard. Adjusted boundary to the lowest
product id for the apple mini keyboard to get the right translation.

Signed-off-by: Ulrich Dangel <uli@spamt.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agoe100: do not go D3 in shutdown unless system is powering off
Thadeu Lima de Souza Cascardo [Wed, 29 Apr 2009 05:42:39 +0000 (22:42 -0700)]
e100: do not go D3 in shutdown unless system is powering off

After experimenting with kexec with the last merges after 2.6.29, I've
had some problems when probing e100.  It would not read the eeprom.  After
some bisects, I realized this has been like that since forever (at least
2.6.18).  The problem is that shutdown is doing the same thing that
suspend does and puts the device in D3 state.  I couldn't find a way to
get the device back to a sane state in the probe function.  So, based on
some similar patches from Rafael J. Wysocki for e1000, e1000e, and ixgbe,
I wrote this one for e100.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Wed, 29 Apr 2009 05:40:49 +0000 (22:40 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6

14 years agonetfilter: revised locking for x_tables
Stephen Hemminger [Wed, 29 Apr 2009 05:36:33 +0000 (22:36 -0700)]
netfilter: revised locking for x_tables

The x_tables are organized with a table structure and a per-cpu copies
of the counters and rules. On older kernels there was a reader/writer
lock per table which was a performance bottleneck. In 2.6.30-rc, this
was converted to use RCU and the counters/rules which solved the performance
problems for do_table but made replacing rules much slower because of
the necessary RCU grace period.

This version uses a per-cpu set of spinlocks and counters to allow to
table processing to proceed without the cache thrashing of a global
reader lock and keeps the same performance for table updates.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt...
Linus Torvalds [Wed, 29 Apr 2009 00:21:20 +0000 (17:21 -0700)]
Merge branch 'drm-intel-next' of git://git./linux/kernel/git/anholt/drm-intel

* 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
  drm/i915: fix up error path leak in i915_cmdbuffer
  drm/i915: fix unpaired i915 device mutex on entervt failure.
  drm/i915: add support for G41 chipset
  drm/i915: Enable ASLE if present
  drm/i915: Unregister ACPI video driver when exiting
  drm/i915: Register ACPI video even when not modesetting
  drm/i915: fix transition to I915_TILING_NONE
  drm/i915: Don't let an oops get triggered from irq_emit without dma init.
  drm/i915: allow tiled front buffers on 965+

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Wed, 29 Apr 2009 00:21:07 +0000 (17:21 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (21 commits)
  RDMA/nes: Update iw_nes version
  RDMA/nes: Fix error path in nes_accept()
  RDMA/nes: Fix hang issues for large cluster dynamic connections
  RDMA/nes: Increase rexmit timeout interval
  RDMA/nes: Check for sequence number wrap-around
  RDMA/nes: Do not set apbvt entry for loopback
  RDMA/nes: Fix unused variable compile warning when INFINIBAND_NES_DEBUG=n
  RDMA/nes: Fix fw_ver in /sys
  RDMA/nes: Set trace length to 1 inch for SFP_D
  RDMA/nes: Enable repause timer for port 1
  RDMA/nes: Correct CDR loop filter setting for port 1
  RDMA/nes: Modify thermo mitigation to flip SerDes1 ref clk to internal
  RDMA/nes: Fix resource issues in nes_create_cq() and nes_destroy_cq()
  RDMA/nes: Remove root_256()'s unused pbl_count_256 parameter
  mlx4_core: Fix memory leak in mlx4_enable_msi_x()
  IB/mthca: Fix timeout for INIT_HCA and a few other commands
  RDMA/cxgb3: Don't zero QP attrs when moving to IDLE
  RDMA/nes: Fix bugs in nes_reg_phys_mr()
  RDMA/nes: Fix compiler warning at nes_verbs.c:1955
  IPoIB: Disable NAPI while CQ is being drained
  ...

14 years agom68k: arch/m68k/kernel/sun3-head.S needs <linux/init.h>
Geert Uytterhoeven [Tue, 28 Apr 2009 19:20:11 +0000 (21:20 +0200)]
m68k: arch/m68k/kernel/sun3-head.S needs <linux/init.h>

Fix this:

  arch/m68k/kernel/sun3-head.S: Assembler messages:
  arch/m68k/kernel/sun3-head.S:32: Error: Unknown operator -- statement `__head' ignored

Introduced by commit 6f335cab0431d5df4995bcd4fd952d4c746d5a86 ("m68k:
convert to use __HEAD and HEAD_TEXT macros."), which started using
__HEAD without adding the appropriate include.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Tue, 28 Apr 2009 23:06:48 +0000 (16:06 -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:
  bio: fix memcpy corruption in bio_copy_user_iov()
  hd: fix locking
  mg_disk: fix CONFIG_LBD=y warning
  mg_disk: fix locking

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
Linus Torvalds [Tue, 28 Apr 2009 23:06:33 +0000 (16:06 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
  regulator: Fix default constraints for fixed voltage regulators
  regulator/bq24022: fix bug in is_enabled function
  regulator/virtual: fix strings compare predicates
  regulator core: fix double-free in regulator_register() error path
  drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
  unreachable code in drms_uA_update()
  regulator: fix header file missing kernel-doc

14 years agoMerge branches 'cxgb3', 'ipoib', 'mthca', 'mlx4' and 'nes' into for-linus
Roland Dreier [Tue, 28 Apr 2009 23:01:31 +0000 (16:01 -0700)]
Merge branches 'cxgb3', 'ipoib', 'mthca', 'mlx4' and 'nes' into for-linus

14 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Tue, 28 Apr 2009 22:55:32 +0000 (15:55 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc/ps3: Fix build error on UP
  powerpc/cell: Select PCI for IBM_CELL_BLADE AND CELLEB
  powerpc: ppc32 needs elf_read_implies_exec()
  powerpc/86xx: Add device_type entry to soc for ppc9a
  powerpc/44x: Correct memory size calculation for denali-based boards
  maintainers: Fix PowerPC 4xx git tree
  powerpc: fix for long standing bug noticed by gcc 4.4.0
  Revert "powerpc: Add support for early tlbilx opcode"

14 years agopowerpc: Revert switch to TEXT_TEXT in linker script
Tim Abbott [Tue, 28 Apr 2009 15:47:15 +0000 (11:47 -0400)]
powerpc: Revert switch to TEXT_TEXT in linker script

Commit edada399 broke the build on 64-bit powerpc because it moved the
__ftr_alt_* sections of a file away from the .text section, causing
link failures due to relative conditional branch targets being too far
away from the branch instructions.  This happens on pretty much all
64-bit powerpc configs.

This change reverts commit edada399 while preserving the update from
the *.refok sections to .ref.text that has happened since.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Requested-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Russell King [Tue, 28 Apr 2009 20:41:01 +0000 (21:41 +0100)]
Merge branch 'fix' of git://git./linux/kernel/git/ycmiao/pxa-linux-2.6

14 years agobio: fix memcpy corruption in bio_copy_user_iov()
FUJITA Tomonori [Tue, 28 Apr 2009 18:24:29 +0000 (20:24 +0200)]
bio: fix memcpy corruption in bio_copy_user_iov()

st driver uses blk_rq_map_user() in order to just build a request out
of page frames. In this case, map_data->offset is a non zero value and
iov[0].iov_base is NULL. We need to increase nr_pages for that.

Cc: stable@kernel.org
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agohd: fix locking
Tejun Heo [Tue, 28 Apr 2009 03:38:33 +0000 (12:38 +0900)]
hd: fix locking

hd dance around local irq and HD_IRQ enable without achieving much.
It ends up transferring data from irq handler with both local irq and
HD_IRQ disabled.  The only place it actually does something is while
transferring the first block of a request which it does with HD_IRQ
disabled but local irq enabled.

Unfortunately, the dancing is horribly broken from locking POV.  IRQ
and timeout handlers access block queue without grabbing the queue
lock and running the driver in SMP configuration crashes the whole
machine pretty quickly.

Remove meaningless irq enable/disable dancing and add proper locking
in issue, irq and timeout paths.

Signed-off-by: Tejun Heo <tj@kernel.org>
14 years agomg_disk: fix CONFIG_LBD=y warning
Bartlomiej Zolnierkiewicz [Tue, 28 Apr 2009 03:38:33 +0000 (12:38 +0900)]
mg_disk: fix CONFIG_LBD=y warning

drivers/block/mg_disk.c: In function ‘mg_dump_status’:
drivers/block/mg_disk.c:265: warning: format ‘%ld’ expects type ‘long int’, but
argument 2 has type ‘sector_t’

[ Impact: kill build warning ]

Cc: unsik Kim <donari75@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
14 years agomg_disk: fix locking
Tejun Heo [Tue, 28 Apr 2009 03:38:32 +0000 (12:38 +0900)]
mg_disk: fix locking

IRQ and timeout handlers call functions which expect locked queue lock
without locking it.  Fix it.

While at it, convert 0s used as null pointer constant to NULLs.

[ Impact: fix locking, cleanup ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: unsik Kim <donari75@gmail.com>
14 years agoregulator: Fix default constraints for fixed voltage regulators
Mark Brown [Tue, 28 Apr 2009 10:09:38 +0000 (11:09 +0100)]
regulator: Fix default constraints for fixed voltage regulators

Default voltage constraints were being provided for fixed voltage
regulator where board constraints were not provided but these constraints
used INT_MIN as the default minimum voltage which is not a valid value
since it is less than zero. Use 1uV instead.

Also set the default values we set in the constraints themselves since
otherwise the max_uV constraint we determine will not be stored in the
actual constraint strucutre and will therefore not be used.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator/bq24022: fix bug in is_enabled function
Philipp Zabel [Tue, 28 Apr 2009 11:34:14 +0000 (13:34 +0200)]
regulator/bq24022: fix bug in is_enabled function

This seems to be fallout from last October's regulator core rework.
It got noticed only because of recent regulator framework changes.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator/virtual: fix strings compare predicates
Mike Rapoport [Sun, 26 Apr 2009 08:49:30 +0000 (11:49 +0300)]
regulator/virtual: fix strings compare predicates

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator core: fix double-free in regulator_register() error path
Paul Walmsley [Sat, 25 Apr 2009 11:28:36 +0000 (05:28 -0600)]
regulator core: fix double-free in regulator_register() error path

During regulator registration, any error after device_register() will
cause a double-free on the struct regulator_dev 'rdev'.  The bug is in
drivers/regulator/core.c:regulator_register():

...
scrub:
device_unregister(&rdev->dev);
clean:
kfree(rdev);                           <---
rdev = ERR_PTR(ret);
goto out;
...

device_unregister() calls regulator_dev_release() which frees rdev.  The
subsequent kfree corrupts memory and causes some OMAP3 systems to oops on
boot in regulator_get().

Applies against 2.6.30-rc3.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agodrivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
Diego Liziero [Tue, 14 Apr 2009 01:04:47 +0000 (03:04 +0200)]
drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT

When regulator_desc->type is something different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
the if should probably return ERR_PTR(-EINVAL)

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

@@ expression E; constant C; @@
(
- !E == C
+ E != C
)

Signed-off-by: Diego Liziero <diegoliz@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>