safe/jmp/linux-2.6
14 years ago[IA64] Remove unnecessary semicolons
Joe Perches [Sun, 28 Jun 2009 16:26:07 +0000 (09:26 -0700)]
[IA64] Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
14 years ago[IA64] sprintf should not be used with same source & destination address
Alan Cox [Tue, 30 Jun 2009 21:02:00 +0000 (14:02 -0700)]
[IA64] sprintf should not be used with same source & destination address

This happens to work at the moment but isn't a good idea so fix it the
simple way.

Resolves-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13576

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
14 years agoAFS: Fix lock imbalance
Jiri Slaby [Tue, 30 Jun 2009 20:10:13 +0000 (21:10 +0100)]
AFS: Fix lock imbalance

Don't unlock on vfs_rejected_lock path in afs_do_setlk, since the lock
is unlocked after abort_attempt label.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoipv4: Fix fib_trie rebalancing, part 3
Jarek Poplawski [Tue, 30 Jun 2009 19:47:19 +0000 (12:47 -0700)]
ipv4: Fix fib_trie rebalancing, part 3

Alas current delaying of freeing old tnodes by RCU in trie_rebalance
is still not enough because we can free a top tnode before updating a
t->trie pointer.

Reported-by: Pawel Staszewski <pstaszewski@itcare.pl>
Tested-by: Pawel Staszewski <pstaszewski@itcare.pl>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: Fix the behavior of ethtool when ONBOOT=no
Naohiro Ooiwa [Tue, 30 Jun 2009 19:44:19 +0000 (12:44 -0700)]
bnx2x: Fix the behavior of ethtool when ONBOOT=no

This is the same fix as commit
7959ea254ed18faee41160b1c50b3c9664735967 ("bnx2: Fix the behavior of
ethtool when ONBOOT=no"), but for bnx2x:

--------------------
    When configure in ifcfg-eth* is ONBOOT=no,
    the behavior of ethtool command is wrong.

        # grep ONBOOT /etc/sysconfig/network-scripts/ifcfg-eth2
        ONBOOT=no
        # ethtool eth2 | tail -n1
                Link detected: yes

    I think "Link detected" should be "no".
--------------------

Signed-off-by: Naohiro Ooiwa <nooiwa@miraclelinux.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agofuse: invalidation reverse calls
John Muir [Sun, 31 May 2009 15:13:57 +0000 (11:13 -0400)]
fuse: invalidation reverse calls

Add notification messages that allow the filesystem to invalidate VFS
caches.

Two notifications are added:

 1) inode invalidation

   - invalidate cached attributes
   - invalidate a range of pages in the page cache (this is optional)

 2) dentry invalidation

   - try to invalidate a subtree in the dentry cache

Care must be taken while accessing the 'struct super_block' for the
mount, as it can go away while an invalidation is in progress.  To
prevent this, introduce a rw-semaphore, that is taken for read during
the invalidation and taken for write in the ->kill_sb callback.

Cc: Csaba Henk <csaba@gluster.com>
Cc: Anand Avati <avati@zresearch.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
14 years agofuse: allow umask processing in userspace
Miklos Szeredi [Tue, 30 Jun 2009 18:12:23 +0000 (20:12 +0200)]
fuse: allow umask processing in userspace

This patch lets filesystems handle masking the file mode on creation.
This is needed if filesystem is using ACLs.

 - The CREATE, MKDIR and MKNOD requests are extended with a "umask"
   parameter.

 - A new FUSE_DONT_MASK flag is added to the INIT request/reply.  With
   this the filesystem may request that the create mode is not masked.

CC: Jean-Pierre André <jean-pierre.andre@wanadoo.fr>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
14 years agofuse: fix bad return value in fuse_file_poll()
Miklos Szeredi [Tue, 30 Jun 2009 18:06:24 +0000 (20:06 +0200)]
fuse: fix bad return value in fuse_file_poll()

Fix fuse_file_poll() which returned a -errno value instead of a poll
mask.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
14 years agofuse: fix return value of fuse_dev_write()
Csaba Henk [Mon, 29 Jun 2009 01:26:53 +0000 (03:26 +0200)]
fuse: fix return value of fuse_dev_write()

On 64 bit systems -- where sizeof(ssize_t) > sizeof(int) -- the following test
exposes a bug due to a non-careful return of an int or unsigned value:

implement a FUSE filesystem which sends an unsolicited notification to
the kernel with invalid opcode. The respective write to /dev/fuse
will return (1 << 32) - EINVAL with errno == 0 instead of -1 with
errno == EINVAL.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
14 years agoperf_counter tools: Adjust only prelinked symbol's addresses
Arnaldo Carvalho de Melo [Tue, 30 Jun 2009 14:43:17 +0000 (11:43 -0300)]
perf_counter tools: Adjust only prelinked symbol's addresses

I.e. we can't handle these two kinds of files in the same way:

1) prelinked system library:

[acme@doppio pahole]$ readelf -s /usr/lib64/libdw-0.141.so | egrep 'FUNC.+GLOBAL.+dwfl_report_elf'
   278: 00000030450105a0   261 FUNC    GLOBAL DEFAULT   12 dwfl_report_elf@@ELFUTILS_0.122

2) not prelinked library with debug information from a -debuginfo package:

[acme@doppio pahole]$ readelf -s /usr/lib/debug/usr/lib64/libdw-0.141.so.debug | egrep 'FUNC.+GLOBAL.+dwfl_report_elf'
   629: 00000000000105a0   261 FUNC    GLOBAL DEFAULT   12 dwfl_report_elf
[acme@doppio pahole]$

Now the numbers I got for a pahole perf run are in line with
the numbers I get from oprofile.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20090630144317.GB12663@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agodm table: fix blk_stack_limits arg to use bytes not sectors
Mike Snitzer [Tue, 30 Jun 2009 14:18:17 +0000 (15:18 +0100)]
dm table: fix blk_stack_limits arg to use bytes not sectors

The offset passed to blk_stack_limits() must be in bytes not sectors.
Fixes false warnings like the following:
device-mapper: table: 254:1: target device sda6 is misaligned

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Reported-by: Frans Pop <elendil@planet.nl>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
14 years agodm exception store: really fix type lookup
Milan Broz [Tue, 30 Jun 2009 14:18:14 +0000 (15:18 +0100)]
dm exception store: really fix type lookup

Fix exception store name handling.

We need to reference exception store by zero terminated string.

Fixes regression introduced in commit f6bd4eb73cdf2a5bf954e497972842f39cabb7e3

Cc: Yi Yang <yi.y.yang@intel.com>
Cc: Jonathan Brassow <jbrassow@redhat.com>
Cc: stable@kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
14 years agoperf_counter: Provide a way to enable counters on exec
Paul Mackerras [Tue, 30 Jun 2009 06:07:19 +0000 (16:07 +1000)]
perf_counter: Provide a way to enable counters on exec

This provides a way to mark a counter to be enabled on the next
exec. This is useful for measuring the total activity of a
program without including overhead from the process that
launches it.

This also changes the perf stat command to use this new
facility.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <19017.43927.838745.689203@cargo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Tue, 30 Jun 2009 03:07:43 +0000 (20:07 -0700)]
Merge git://git./linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  ide: memory overrun in ide_get_identity_ioctl() on big endian machines using ioctl HDIO_OBSOLETE_IDENTITY
  ide: fix resume for CONFIG_BLK_DEV_IDEACPI=y
  ide-cd: handle fragmented packet commands gracefully
  ide: always kill the whole request on error
  ide: fix ide_kill_rq() for special ide-{floppy,tape} driver requests

14 years agosctp: xmit sctp packet always return no route error
Wei Yongjun [Sun, 28 Jun 2009 22:49:37 +0000 (22:49 +0000)]
sctp: xmit sctp packet always return no route error

Commit 'net: skb->dst accessors'(adf30907d63893e4208dfe3f5c88ae12bc2f25d5)
broken the sctp protocol stack, the sctp packet can never be sent out after
Eric Dumazet's patch, which have typo in the sctp code.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Vlad Yasevich <vladisalv.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/irda: convert bfin_sir to net_device_ops
Graf Yang [Mon, 29 Jun 2009 09:34:20 +0000 (09:34 +0000)]
net/irda: convert bfin_sir to net_device_ops

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: use xfrm_addr_cmp() instead of compare addresses directly
Wei Yongjun [Sun, 28 Jun 2009 18:42:53 +0000 (18:42 +0000)]
xfrm: use xfrm_addr_cmp() instead of compare addresses directly

Clean up to use xfrm_addr_cmp() instead of compare addresses directly.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: Do not tack on TSO data to non-TSO packet
Herbert Xu [Sun, 28 Jun 2009 18:06:41 +0000 (18:06 +0000)]
tcp: Do not tack on TSO data to non-TSO packet

If a socket starts out on a non-TSO route, and then switches to
a TSO route, then we will tack on data to the tail of the tx queue
even if it started out life as non-TSO.  This is suboptimal because
all of it will then be copied and checksummed unnecessarily.

This patch fixes this by ensuring that skb->ip_summed is set to
CHECKSUM_PARTIAL before appending extra data beyond the MSS.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: Stop non-TSO packets morphing into TSO
Herbert Xu [Sun, 28 Jun 2009 18:03:30 +0000 (18:03 +0000)]
tcp: Stop non-TSO packets morphing into TSO

If a socket starts out on a non-TSO route, and then switches to
a TSO route, then the tail on the tx queue can morph into a TSO
packet, causing mischief because the rest of the stack does not
expect a partially linear TSO packet.

This patch fixes this by ensuring that skb->ip_summed is set to
CHECKSUM_PARTIAL before declaring a packet as TSO.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoide: memory overrun in ide_get_identity_ioctl() on big endian machines using ioctl...
Christian Engelmayer [Tue, 30 Jun 2009 02:31:41 +0000 (19:31 -0700)]
ide: memory overrun in ide_get_identity_ioctl() on big endian machines using ioctl HDIO_OBSOLETE_IDENTITY

This patch fixes a memory overrun in function ide_get_identity_ioctl() which
chooses the size of a memory buffer depending on the ioctl command that led
to the function call, however, passes that buffer to a function which needs the
buffer size to be always chosen unconditionally.

Due to conditional compilation the memory overrun can only happen on big endian
machines. The error can be triggered using ioctl HDIO_OBSOLETE_IDENTITY. Usage
of ioctl HDIO_GET_IDENTITY is safe.

Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lowpan...
David S. Miller [Tue, 30 Jun 2009 02:23:53 +0000 (19:23 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lowpan/lowpan

14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Tue, 30 Jun 2009 02:22:31 +0000 (19:22 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-2.6

14 years agoide: fix resume for CONFIG_BLK_DEV_IDEACPI=y
Bartlomiej Zolnierkiewicz [Tue, 30 Jun 2009 02:20:42 +0000 (19:20 -0700)]
ide: fix resume for CONFIG_BLK_DEV_IDEACPI=y

commit 2f0d0fd2a605666d38e290c5c0d2907484352dc4 ("ide-acpi: cleanup
do_drive_get_GTF()") didn't account for the lack of hwif->acpidata
check in generic_ide_suspend() [ indirect user of do_drive_get_GTF()
through ide_acpi_exec_tfs() ] resulting in broken resume when ACPI
support is enabled but ACPI data is unavailable.

Fix it by adding ide_port_acpi() helper for checking if port needs
ACPI handling and cleaning generic_ide_{suspend,resume}() to use it
instead of hiding hwif->acpidata and ide_noacpi checks in IDE ACPI
helpers (this should help in preventing similar bugs in the future).

While at it:
- kill superfluous debugging printks in ide_acpi_{get,push}_timing()

Reported-and-tested-by: Etienne Basset <etienne.basset@numericable.fr>
Also-reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 29 Jun 2009 23:18:19 +0000 (16:18 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm: (28 commits)
  [ARM] 5562/2: at91: add gpio button support for at91sam9g20ek
  [ARM] 5563/1: at91: at91sam9rlek lcd interface correction
  [ARM] 5565/2: Use PAGE_SIZE and RO_DATA() in link script
  [ARM] 5560/1: Avoid buffer overrun in case of an invalid IRQ
  [ARM] GTA02: build fixes (s3c2410_nand_set usage)
  [ARM] MINI2440: Add missing flash_bbt flat to NAND
  [ARM] s3c2410_defconfig: add MINI2440 machine to build
  [ARM] S3C: Fix S3C24XX build to not include s3c64xx IIS devices
  [ARM] S3C24XX: Fix missing s3c_iis_device.
  [ARM] MINI2440: remove duplicated #include
  [ARM] S3C24XX: Fix spi-bus configuration build errors
  OMAP: Fix IOMEM macro for assembly
  [ARM] S3C: Remove unused CONFIG_DEBUG_S3C_PORT
  [ARM] S3C24XX: Fix use of CONFIG_S3C24XX_PWM
  OMAP2/3: Initialize gpio debounce register
  OMAP: IOMMU: function flush_iotlb_page is not flushing correct entry
  OMAP3: RX51: Use OneNAND sync read / write
  OMAP2/3: gpmc-onenand: correct use of async timings
  OMAP3: DMA: Enable idlemodes for DMA OCP
  OMAP3: SRAM size fix for HS/EMU devices
  ...

14 years agoperf_counter tools: Reduce perf stat measurement overhead/skew
Paul Mackerras [Mon, 29 Jun 2009 11:13:21 +0000 (21:13 +1000)]
perf_counter tools: Reduce perf stat measurement overhead/skew

Vince Weaver reported a 'perf stat' measurement overhead in the
count of retired instructions, which can amount to a +6000
instructions inflated count in the reported count.

At present, perf stat creates its counters on the perf process.  Thus
the counters count the fork and various other activity in both the
parent and child, such as the resolver overhead for resolving PLT
entries for any libc functions that haven't been called before, such
as execvp.

This reduces the overhead by creating the counters on the child process
after the fork, using a couple of pipes to synchronize so that the
child process waits until the parent has created the counters before
doing the exec.  To eliminate the PLT resolution overhead on calling
execvp, this does a dummy execvp first which will always fail.

With this, the overhead of executing a program goes down from over
4800 instructions to about 90 instructions on powerpc (32-bit).
This was measured with a statically-linked program written in
assembler which only does the 3 instructions needed to call _exit(0).

Before:

$ perf stat -e 0:1:u ./three

 Performance counter stats for './three':

           4858  instructions

    0.001274523  seconds time elapsed

After:

$ perf stat -e 0:1:u ./three

 Performance counter stats for './three':

             92  instructions

    0.000468153  seconds time elapsed

Reported-by: Vince Weaver <vince@deater.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <19016.41425.814043.870352@cargo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'for-linus' of git://git.infradead.org/users/eparis/notify
Linus Torvalds [Mon, 29 Jun 2009 20:09:39 +0000 (13:09 -0700)]
Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify

* 'for-linus' of git://git.infradead.org/users/eparis/notify:
  fs: allow d_instantiate to be called with negative parent dentry

14 years agoperf stat: Use percentages for scaling output
Ingo Molnar [Mon, 29 Jun 2009 19:50:54 +0000 (21:50 +0200)]
perf stat: Use percentages for scaling output

Peter expressed a strong preference for percentage based
display of scaled values - so revert to that from the
recently introduced multiplication-factor unit.

Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 29 Jun 2009 16:46:12 +0000 (09:46 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: OSS: mpu401, fix deadlock
  ALSA: hda - Add missing initializations for ALC268 and ALC269
  ALSA: cmi8330: fix MPU-401 PnP init copy&paste bug
  ALSA: hda - Line In for Acer Inspire 6530G model
  sound: oxygen: make mic volume control mono
  MAINTAINERS: Add entry for twl4030 series soc codec driver
  ALSA: lx6464es - configure ethersound io channels
  sound: Use PCI_VDEVICE for CREATIVE and ECTIVA
  sound: Use PCI_VDEVICE
  ALSA: hda - Use model=acer-aspire-6530g for Acer Aspire 6930G
  ALSA: hda - Fix acer-aspire-6530g model quirk
  ALSA: hda - Add pin-sense trigger when needed for Realtek codecs
  ALSA: hda - Fix support for Samsung P50 with AD1986A codec
  ALSA: hda - Generalize the pin-detect quirk for Lenovo N100
  ALSA: hda - Simplify AD1986A mixer definitions

14 years agoMerge branch 'bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Mon, 29 Jun 2009 16:44:44 +0000 (09:44 -0700)]
Merge branch 'bugfixes' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  integrity: add ima_counts_put (updated)
  integrity: ima audit hash_exists fix
  integrity: ima mq_open imbalance msg fix

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 29 Jun 2009 16:42:01 +0000 (09:42 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  Revert "x86: cap iomem_resource to addressable physical memory"

14 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
Linus Torvalds [Mon, 29 Jun 2009 16:41:12 +0000 (09:41 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
  backlight: Fix tdo24m crash on kmalloc

14 years agoeeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS
Ingo Molnar [Mon, 29 Jun 2009 08:07:54 +0000 (10:07 +0200)]
eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS

FYI, there's a post-rc1 build regression with certain configs:

 drivers/built-in.o: In function `pci_hp_deregister':
 (.text+0xb166): undefined reference to `pci_hp_remove_module_link'
 drivers/built-in.o: In function `pci_hp_deregister':
 (.text+0xb19f): undefined reference to `pci_destroy_slot'
 drivers/built-in.o: In function `__pci_hp_register':
 (.text+0xb583): undefined reference to `pci_create_slot'
 drivers/built-in.o: In function `__pci_hp_register':
 (.text+0xb5b1): undefined reference to `pci_hp_create_module_link'
 make: *** [.tmp_vmlinux1] Error 1

Caused by:

2b121bc262fa03c94e653b2d44356c2f86c1bcdc is first bad commit
| commit 2b121bc262fa03c94e653b2d44356c2f86c1bcdc
| Date:   Thu Jun 25 13:25:36 2009 +0200
|
|     eeepc-laptop: Register as a pci-hotplug device

which changed the driver to use the PCI hotplug infrastructure, but
didn't do a good job on the Kconfig rules.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agotty: Fix the leak in tty_ldisc_release
Alan Cox [Mon, 29 Jun 2009 14:21:47 +0000 (15:21 +0100)]
tty: Fix the leak in tty_ldisc_release

Currently we reinit the ldisc on final tty close which is what the old code
did to ensure that if the device retained its termios settings then it had the
right ldisc. tty_ldisc_reinit does that but also leaves us with the reset
ldisc reference which is then leaked.

At this point we know the port will be recycled so we can kill the ldisc
off completely rather than try and add another ldisc free up when the kref
count hits zero.

At this point it is safe to keep the ldisc closed as tty_ldisc waiting
methods are only used from the user side, and as the final close we are
the last such reference. Interrupt/driver side methods will always use the
non wait version and get back a NULL.

Found with kmemleak and investigated/identified by Catalin Marinas.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agokmemleak: Inform kmemleak about pid_hash
Catalin Marinas [Mon, 29 Jun 2009 16:13:55 +0000 (17:13 +0100)]
kmemleak: Inform kmemleak about pid_hash

Kmemleak does not track alloc_bootmem calls but the pid_hash allocated
in pidhash_init() would need to be scanned as it contains pointers to
struct pid objects.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agokmemleak: Do not warn if an unknown object is freed
Catalin Marinas [Mon, 29 Jun 2009 16:13:57 +0000 (17:13 +0100)]
kmemleak: Do not warn if an unknown object is freed

vmap'ed memory blocks are not tracked by kmemleak (yet) but they may be
released with vfree() which is tracked. The corresponding kmemleak
warning is only enabled in debug mode. Future patch will add support for
ioremap and vmap.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agokmemleak: Do not report new leaked objects if the scanning was stopped
Catalin Marinas [Mon, 29 Jun 2009 16:13:56 +0000 (17:13 +0100)]
kmemleak: Do not report new leaked objects if the scanning was stopped

If the scanning was stopped with a signal, it is possible that some
objects are left with a white colour (potential leaks) and reported. Add
a check to avoid reporting such objects.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
14 years agosound: OSS: mpu401, fix deadlock
Jiri Slaby [Mon, 29 Jun 2009 16:03:34 +0000 (18:03 +0200)]
sound: OSS: mpu401, fix deadlock

mpu401_chk_version is called with a spin lock already held. Don't take it
again.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'fix/pci-vdevice' into for-linus
Takashi Iwai [Mon, 29 Jun 2009 16:05:09 +0000 (18:05 +0200)]
Merge branch 'fix/pci-vdevice' into for-linus

* fix/pci-vdevice:
  sound: Use PCI_VDEVICE for CREATIVE and ECTIVA
  sound: Use PCI_VDEVICE

14 years agoMerge branch 'fix/oxygen' into for-linus
Takashi Iwai [Mon, 29 Jun 2009 16:05:07 +0000 (18:05 +0200)]
Merge branch 'fix/oxygen' into for-linus

* fix/oxygen:
  sound: oxygen: make mic volume control mono

14 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Mon, 29 Jun 2009 16:05:06 +0000 (18:05 +0200)]
Merge branch 'fix/misc' into for-linus

* fix/misc:
  ALSA: cmi8330: fix MPU-401 PnP init copy&paste bug

14 years agoMerge branch 'fix/lx6464es' into for-linus
Takashi Iwai [Mon, 29 Jun 2009 16:05:05 +0000 (18:05 +0200)]
Merge branch 'fix/lx6464es' into for-linus

* fix/lx6464es:
  ALSA: lx6464es - configure ethersound io channels

14 years agoMerge branch 'fix/hda-samsung-p50' into for-linus
Takashi Iwai [Mon, 29 Jun 2009 16:05:04 +0000 (18:05 +0200)]
Merge branch 'fix/hda-samsung-p50' into for-linus

* fix/hda-samsung-p50:
  ALSA: hda - Fix support for Samsung P50 with AD1986A codec
  ALSA: hda - Generalize the pin-detect quirk for Lenovo N100
  ALSA: hda - Simplify AD1986A mixer definitions

14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Mon, 29 Jun 2009 16:05:02 +0000 (18:05 +0200)]
Merge branch 'fix/hda' into for-linus

* fix/hda:
  ALSA: hda - Add missing initializations for ALC268 and ALC269
  ALSA: hda - Line In for Acer Inspire 6530G model
  ALSA: hda - Use model=acer-aspire-6530g for Acer Aspire 6930G
  ALSA: hda - Fix acer-aspire-6530g model quirk
  ALSA: hda - Add pin-sense trigger when needed for Realtek codecs

14 years agonl802154: add module license and description
Dmitry Eremin-Solenikov [Fri, 19 Jun 2009 13:02:09 +0000 (17:02 +0400)]
nl802154: add module license and description

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agonl802154: fix Oops in ieee802154_nl_get_dev
Dmitry Eremin-Solenikov [Fri, 19 Jun 2009 13:00:08 +0000 (17:00 +0400)]
nl802154: fix Oops in ieee802154_nl_get_dev

ieee802154_nl_get_dev() lacks check for the existance of the device
that was returned by dev_get_XXX, thus resulting in Oops for non-existing
devices. Fix it.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agoMAINTAINERS: ieee802154 lists are moderated for non-subscribers.
Dmitry Eremin-Solenikov [Thu, 18 Jun 2009 09:05:49 +0000 (13:05 +0400)]
MAINTAINERS: ieee802154 lists are moderated for non-subscribers.

Note that our mailing list is moderated for non-subscribers.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agofs: allow d_instantiate to be called with negative parent dentry
Jeremy Kerr [Mon, 29 Jun 2009 06:31:58 +0000 (14:31 +0800)]
fs: allow d_instantiate to be called with negative parent dentry

The new fsnotify infrastructure (starting at 90586523) causes an oops in
spufs, where we populate a directory with files before instantiating the
directory itself. The new changes seem to have introduced an assumption
that a dentry's parent will be positive when instantiating.

This change makes it once again possible to d_instantiate a dentry
with a negative parent, and brings __fsnotify_d_instantiate() into
line with inotify_d_instantiate(), which already has this NULL check.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Eric Paris <eparis@redhat.com>
14 years agonetfilter: xtables: conntrack match revision 2
Jan Engelhardt [Mon, 29 Jun 2009 12:31:46 +0000 (14:31 +0200)]
netfilter: xtables: conntrack match revision 2

As reported by Philip, the UNTRACKED state bit does not fit within
the 8-bit state_mask member. Enlarge state_mask and give status_mask
a few more bits too.

Reported-by: Philip Craig <philipc@snapgear.com>
References: http://markmail.org/thread/b7eg6aovfh4agyz7
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: headers_check fix: linux/netfilter/xt_osf.h
Jaswinder Singh Rajput [Mon, 29 Jun 2009 12:28:27 +0000 (14:28 +0200)]
netfilter: headers_check fix: linux/netfilter/xt_osf.h

fix the following 'make headers_check' warnings:

  usr/include/linux/netfilter/xt_osf.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: tcp conntrack: fix unacknowledged data detection with NAT
Patrick McHardy [Mon, 29 Jun 2009 12:07:56 +0000 (14:07 +0200)]
netfilter: tcp conntrack: fix unacknowledged data detection with NAT

When NAT helpers change the TCP packet size, the highest seen sequence
number needs to be corrected. This is currently only done upwards, when
the packet size is reduced the sequence number is unchanged. This causes
TCP conntrack to falsely detect unacknowledged data and decrease the
timeout.

Fix by updating the highest seen sequence number in both directions after
packet mangling.

Tested-by: Krzysztof Piotr Oledzki <ole@ans.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years ago[ARM] 5562/2: at91: add gpio button support for at91sam9g20ek
Nicolas Ferre [Mon, 29 Jun 2009 11:11:50 +0000 (12:11 +0100)]
[ARM] 5562/2: at91: add gpio button support for at91sam9g20ek

This adds input keyboard gpio support on at91sam9g20ek board.
It adds button 3 and 4.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoALSA: hda - Add missing initializations for ALC268 and ALC269
Takashi Iwai [Mon, 29 Jun 2009 09:33:53 +0000 (11:33 +0200)]
ALSA: hda - Add missing initializations for ALC268 and ALC269

During the changes to clean up / fix the realtek codec initialization
routines in commit 4a79ba34cada6a5a4ee86ed53aa8a73ba1e6fc51,
I forgot to add the check for ALC268 and ALC269.
This resulted in the missing EAPD and COEF setup for these codecs.

This patch adds the missing checks for these codecs.

Reference: bko#13633
http://bugzilla.kernel.org/show_bug.cgi?id=13633

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoperf_counter, x86: Update x86_pmu after WARN()
Yinghai Lu [Mon, 29 Jun 2009 07:41:11 +0000 (00:41 -0700)]
perf_counter, x86: Update x86_pmu after WARN()

The print out should read the value before changing the value.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <4A487017.4090007@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosh: ms7724se: Enable sh_eth in defconfig.
Kuninori Morimoto [Mon, 29 Jun 2009 07:40:00 +0000 (07:40 +0000)]
sh: ms7724se: Enable sh_eth in defconfig.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoarch/sh/boards/mach-se/7206/io.c: Remove unnecessary semicolons
Joe Perches [Sun, 28 Jun 2009 16:26:13 +0000 (16:26 +0000)]
arch/sh/boards/mach-se/7206/io.c: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoALSA: cmi8330: fix MPU-401 PnP init copy&paste bug
Ondrej Zary [Sat, 27 Jun 2009 14:17:08 +0000 (16:17 +0200)]
ALSA: cmi8330: fix MPU-401 PnP init copy&paste bug

Fix copy&paste bug in PnP MPU-401 initialization.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Line In for Acer Inspire 6530G model
Tony Vroon [Fri, 26 Jun 2009 08:27:50 +0000 (09:27 +0100)]
ALSA: hda - Line In for Acer Inspire 6530G model

The Line In connector is set up as PIN_IN by default, using
VREF_HIZ. It is connected to both ADCs, so add it to both
input selectors.
Also add the ability to use the input mix (on a SoundBlaster
one would call this "What You Hear").

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 29 Jun 2009 02:57:31 +0000 (19:57 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  be2net: Fix to avoid a crash seen on PPC with LRO and Jumbo frames.
  gro: Flush GRO packets in napi_disable_pending path
  inet: Call skb_orphan before tproxy activates
  mac80211: Use rcu_barrier() on unload.
  sunrpc: Use rcu_barrier() on unload.
  bridge: Use rcu_barrier() instead of syncronize_net() on unload.
  ipv6: Use rcu_barrier() on module unload.
  decnet: Use rcu_barrier() on module unload.
  sky2: Fix checksum endianness
  mdio add missing GPL flag
  sh_eth: remove redundant test on unsigned
  fsl_pq_mdio: Fix fsl_pq_mdio to work with modules
  ipv6: avoid wraparound for expired preferred lifetime
  tcp: missing check ACK flag of received segment in FIN-WAIT-2 state
  atl1*: add device_set_wakeup_enable to atl1*_set_wol
  Phonet: generate Netlink RTM_DELADDR when destroying a device
  Phonet: publicize the Netlink notification function
  Revert "veth: prevent oops caused by netdev destructor"
  cpmac: fix compilation failure introduced with netdev_ops conversion
  ipsec: Fix name of CAST algorithm

14 years agobe2net: Fix to avoid a crash seen on PPC with LRO and Jumbo frames.
Ajit Khaparde [Fri, 26 Jun 2009 02:51:07 +0000 (02:51 +0000)]
be2net: Fix to avoid a crash seen on PPC with LRO and Jumbo frames.

While testing the driver on PPC, we ran into a crash with LRO, Jumbo frames.
With CONFIG_PPC_64K_PAGES configured (a default in PPC), MAX_SKB_FRAGS drops to 3 and we were crossing the array limits on skb_shinfo(skb)->frags[].
Now we coalesce the frags from the same physical page into one slot in
skb_shinfo(skb)->frags[] and go to the next index when the frag is from

different physical page.

This patch is against the net-2.6 tree.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agointegrity: add ima_counts_put (updated)
Mimi Zohar [Fri, 26 Jun 2009 18:05:27 +0000 (14:05 -0400)]
integrity: add ima_counts_put (updated)

This patch fixes an imbalance message as reported by J.R. Okajima.
The IMA file counters are incremented in ima_path_check. If the
actual open fails, such as ETXTBSY, decrement the counters to
prevent unnecessary imbalance messages.

Reported-by: J.R. Okajima <hooanon05@yahoo.co.jp>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
14 years agointegrity: ima audit hash_exists fix
Mimi Zohar [Fri, 26 Jun 2009 15:25:00 +0000 (11:25 -0400)]
integrity: ima audit hash_exists fix

Audit the file name, not the template name.

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
14 years agointegrity: ima mq_open imbalance msg fix
Mimi Zohar [Fri, 26 Jun 2009 15:24:05 +0000 (11:24 -0400)]
integrity: ima mq_open imbalance msg fix

This patch fixes an imbalance message as reported by Sanchin Sant.
As we don't need to measure the message queue, just increment the
counters.

Reported-by: Sanchin Sant <sanchinp@in.ibm.com>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
14 years agoMerge branch 'kvm-updates/2.6.31' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sun, 28 Jun 2009 18:12:52 +0000 (11:12 -0700)]
Merge branch 'kvm-updates/2.6.31' of git://git./virt/kvm/kvm

* 'kvm-updates/2.6.31' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: shut up uninit compiler warning in paging_tmpl.h
  KVM: Ignore reads to K7 EVNTSEL MSRs
  KVM: VMX: Handle vmx instruction vmexits
  KVM: s390: Allow stfle instruction in the guest
  KVM: kvm/x86_emulate.c toggle_interruptibility() should be static
  KVM: ia64: fix ia64 build due to missing kallsyms_lookup() and double export
  KVM: protect concurrent make_all_cpus_request
  KVM: MMU: Allow 4K ptes with bit 7 (PAT) set
  KVM: Fix dirty bit tracking for slots with large pages

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Sun, 28 Jun 2009 18:08:09 +0000 (11:08 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: fix fh_mutex locking in cifs_reopen_file

14 years agoMerge git://git.infradead.org/iommu-2.6
Linus Torvalds [Sun, 28 Jun 2009 18:06:11 +0000 (11:06 -0700)]
Merge git://git.infradead.org/iommu-2.6

* git://git.infradead.org/iommu-2.6:
  intel-iommu: fix Identity Mapping to be arch independent

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 28 Jun 2009 18:05:28 +0000 (11:05 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, delay: tsc based udelay should have rdtsc_barrier
  x86, setup: correct include file in <asm/boot.h>
  x86, setup: Fix typo "CONFIG_x86_64" in <asm/boot.h>
  x86, mce: percpu mcheck_timer should be pinned
  x86: Add sysctl to allow panic on IOCK NMI error
  x86: Fix uv bau sending buffer initialization
  x86, mce: Fix mce resume on 32bit
  x86: Move init_gbpages() to setup_arch()
  x86: ensure percpu lpage doesn't consume too much vmalloc space
  x86: implement percpu_alloc kernel parameter
  x86: fix pageattr handling for lpage percpu allocator and re-enable it
  x86: reorganize cpa_process_alias()
  x86: prepare setup_pcpu_lpage() for pageattr fix
  x86: rename remap percpu first chunk allocator to lpage
  x86: fix duplicate free in setup_pcpu_remap() failure path
  percpu: fix too lazy vunmap cache flushing
  x86: Set cpu_llc_id on AMD CPUs

14 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 28 Jun 2009 18:05:16 +0000 (11:05 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  timer stats: Optimize by adding quick check to avoid function calls
  timers: Fix timer_migration interface which accepts any number as input

14 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 28 Jun 2009 18:05:04 +0000 (11:05 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ftrace: Fix the output of profile
  ring-buffer: Make it generally available
  ftrace: Remove duplicate newline
  tracing: Fix trace_buf_size boot option
  ftrace: Fix t_hash_start()
  ftrace: Don't manipulate @pos in t_start()
  ftrace: Don't increment @pos in g_start()
  tracing: Reset iterator in t_start()
  trace_stat: Don't increment @pos in seq start()
  tracing_bprintk: Don't increment @pos in t_start()
  tracing/events: Don't increment @pos in s_start()

14 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
Linus Torvalds [Sun, 28 Jun 2009 18:02:32 +0000 (11:02 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: Futher document blink_set
  leds: Add options to have GPIO LEDs start on or keep their state
  leds: LED driver for National Semiconductor LP3944 Funlight Chip
  leds: pca9532 - Indent using tabs, not spaces.
  leds: Remove an orphan Kconfig entry
  leds: Further document parameters for blink_set()
  leds: alix-leds2 fixed for Award BIOS
  leds: leds-gpio - fix a section mismatch
  leds: add the sysfs interface into the leds-bd2802 driver for changing wave pattern and led current.
  leds: change the license information
  leds: fix led-bd2802 errors while resuming

14 years agoperf stat: Micro-optimize the code: memcpy is only required if no event is selected...
Jaswinder Singh Rajput [Sat, 27 Jun 2009 18:19:09 +0000 (23:49 +0530)]
perf stat: Micro-optimize the code: memcpy is only required if no event is selected and !null_run

Set attrs and nr_counters if no event is selected and !null_run.

Setting of attrs should depend on number of counters,
so we need to memcpy only for sizeof(default_attrs)

Also set nr_counters as ARRAY_SIZE(default_attrs) in place of
hardcoded value.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1246126749.32198.16.camel@hpdv5.satnam>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoKVM: shut up uninit compiler warning in paging_tmpl.h
Jaswinder Singh Rajput [Wed, 20 May 2009 04:29:35 +0000 (09:59 +0530)]
KVM: shut up uninit compiler warning in paging_tmpl.h

Dixes compilation warning:
  CC      arch/x86/kernel/io_delay.o
 arch/x86/kvm/paging_tmpl.h: In function ‘paging64_fetch’:
 arch/x86/kvm/paging_tmpl.h:279: warning: ‘sptep’ may be used uninitialized in this function
 arch/x86/kvm/paging_tmpl.h: In function ‘paging32_fetch’:
 arch/x86/kvm/paging_tmpl.h:279: warning: ‘sptep’ may be used uninitialized in this function

warning is bogus (always have a least one level), but need to shut the compiler
up.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: Ignore reads to K7 EVNTSEL MSRs
Amit Shah [Mon, 15 Jun 2009 07:55:34 +0000 (13:25 +0530)]
KVM: Ignore reads to K7 EVNTSEL MSRs

In commit 7fe29e0faacb650d31b9e9f538203a157bec821d we ignored the
reads to the P6 EVNTSEL MSRs. That fixed crashes on Intel machines.

Ignore the reads to K7 EVNTSEL MSRs as well to fix this on AMD
hosts.

This fixes Kaspersky antivirus crashing Windows guests on AMD hosts.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: VMX: Handle vmx instruction vmexits
Avi Kivity [Tue, 16 Jun 2009 11:19:52 +0000 (14:19 +0300)]
KVM: VMX: Handle vmx instruction vmexits

IF a guest tries to use vmx instructions, inject a #UD to let it know the
instruction is not implemented, rather than crashing.

This prevents guest userspace from crashing the guest kernel.

Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: s390: Allow stfle instruction in the guest
Christian Borntraeger [Tue, 23 Jun 2009 15:24:07 +0000 (17:24 +0200)]
KVM: s390: Allow stfle instruction in the guest

2.6.31-rc introduced an architecture level set checker based on facility
bits. e.g. if the kernel is compiled to run only on z9, several facility
bits are checked very early and the kernel refuses to boot if a z9 specific
facility is missing.
Until now kvm on s390 did not implement the store facility extended (STFLE)
instruction. A 2.6.31-rc kernel that was compiled for z9 or higher did not
boot in kvm. This patch implements stfle.

This patch should go in before 2.6.31.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: kvm/x86_emulate.c toggle_interruptibility() should be static
Jaswinder Singh Rajput [Thu, 18 Jun 2009 11:23:25 +0000 (16:53 +0530)]
KVM: kvm/x86_emulate.c toggle_interruptibility() should be static

toggle_interruptibility() is used only by same file, it should be static.

Fixed following sparse warning :

  arch/x86/kvm/x86_emulate.c:1364:6: warning: symbol 'toggle_interruptibility' was not declared. Should it be static?

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: ia64: fix ia64 build due to missing kallsyms_lookup() and double export
Jes Sorensen [Wed, 17 Jun 2009 09:08:08 +0000 (11:08 +0200)]
KVM: ia64: fix ia64 build due to missing kallsyms_lookup() and double export

Fix problem with double export of certain symbols from vsprintf.c
which we do not wish to export from the kvm-intel.ko module.

In addition, we do not have access to kallsyms_lookup() from the
module, so make sure to #undef CONFIG_KALLSYMS

Signed-off-by: Jes Sorensen <jes@sgi.com>
Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: protect concurrent make_all_cpus_request
Marcelo Tosatti [Wed, 17 Jun 2009 13:53:47 +0000 (10:53 -0300)]
KVM: protect concurrent make_all_cpus_request

make_all_cpus_request contains a race condition which can
trigger false request completed status, as follows:

CPU0                                              CPU1

if (test_and_set_bit(req,&vcpu->requests))
   ....                                            if (test_and_set_bit(req,&vcpu->requests))
   ..                                                  return
proceed to smp_call_function_many(wait=1)

Use a spinlock to serialize concurrent CPUs.

Cc: stable@kernel.org
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: MMU: Allow 4K ptes with bit 7 (PAT) set
Avi Kivity [Tue, 19 May 2009 10:29:27 +0000 (13:29 +0300)]
KVM: MMU: Allow 4K ptes with bit 7 (PAT) set

Bit 7 is perfectly legal in the 4K page leve; it is used for the PAT.

Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: Fix dirty bit tracking for slots with large pages
Izik Eidus [Wed, 10 Jun 2009 16:23:24 +0000 (19:23 +0300)]
KVM: Fix dirty bit tracking for slots with large pages

When slot is already allocated and being asked to be tracked we need
to break the large pages.

This code flush the mmu when someone ask a slot to start dirty bit
tracking.

Cc: stable@kernel.org
Signed-off-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agomtd: nand: fix build failure and incorrect return from omap_wait()
vimal singh [Sat, 27 Jun 2009 05:37:06 +0000 (11:07 +0530)]
mtd: nand: fix build failure and incorrect return from omap_wait()

We need to include jiffies.h manually in some cases, and the status
returned from omap_wait() was broken in two separate ways.

Also add cond_resched() to the loop.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoRevert "x86: cap iomem_resource to addressable physical memory"
H. Peter Anvin [Sat, 27 Jun 2009 19:22:27 +0000 (12:22 -0700)]
Revert "x86: cap iomem_resource to addressable physical memory"

This reverts commit 95ee14e4379c5e19c0897c872350570402014742.
Mikael Petterson <mikepe@it.uu.se> reported that at least one of his
systems will not boot as a result.  We have ruled out the detection
algorithm malfunctioning, so it is not a matter of producing the
incorrect bitmasks; rather, something in the application of them
fails.

Revert the commit until we can root cause and correct this problem.

-stable team: this means the underlying commit should be rejected.

Reported-and-isolated-by: Mikael Petterson <mikpe@it.uu.se>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
LKML-Reference: <200906261559.n5QFxJH8027336@pilspetsen.it.uu.se>
Cc: stable@kernel.org
Cc: Grant Grundler <grundler@parisc-linux.org>
14 years agocifs: fix fh_mutex locking in cifs_reopen_file
Jeff Layton [Sat, 27 Jun 2009 11:04:55 +0000 (07:04 -0400)]
cifs: fix fh_mutex locking in cifs_reopen_file

Fixes a regression caused by commit a6ce4932fbdbcd8f8e8c6df76812014351c32892

When this lock was converted to a mutex, the locks were turned into
unlocks and vice-versa.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
14 years agoperf stat: Improve output
Jaswinder Singh Rajput [Fri, 26 Jun 2009 21:32:07 +0000 (03:02 +0530)]
perf stat: Improve output

Increase size for event name to handle bigger names like
'L1-d$-prefetch-misses'

Changed scaled counters from percentage to a multiplicative
factor because the latter is more expressive.

Also aligned the scaling factor, otherwise sometimes it looks
like:

            384  iTLB-load-misses           (4.74x scaled)
         452029  branch-loads               (8.00x scaled)
           5892  branch-load-misses         (20.39x scaled)
         972315  iTLB-loads                 (3.24x scaled)

Before:
         150708  L1-d$-stores          (scaled from 23.57%)
         428804  L1-d$-prefetches      (scaled from 23.47%)
         314446  L1-d$-prefetch-misses  (scaled from 23.42%)
      252626137  L1-i$-loads           (scaled from 23.24%)
        5297550  dTLB-load-misses      (scaled from 23.96%)
      106992392  branch-loads          (scaled from 23.67%)
        5239561  branch-load-misses    (scaled from 23.43%)

After:
        1731713  L1-d$-loads               (  14.25x scaled)
          44241  L1-d$-prefetches          (   3.88x scaled)
          21076  L1-d$-prefetch-misses     (   3.40x scaled)
        5789421  L1-i$-loads               (   3.78x scaled)
          29645  dTLB-load-misses          (   2.95x scaled)
         461474  branch-loads              (   6.52x scaled)
           7493  branch-load-misses        (  26.57x scaled)

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1246051927.2988.10.camel@hpdv5.satnam>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years ago[ARM] 5563/1: at91: at91sam9rlek lcd interface correction
Nicolas Ferre [Wed, 24 Jun 2009 16:13:48 +0000 (17:13 +0100)]
[ARM] 5563/1: at91: at91sam9rlek lcd interface correction

Here is a little update to the at91sam9rlek lcd interface.
This will correct the power pin of the LCD.
It will also add precision to the struct atmel_lcdfb_info
scructure: backlight enabling  and wiring mode correction:
RGB wiring on the -EK board.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agomtd: Use BLOCK_NIL consistently in NFTL/INFTL
Julia Lawall [Sat, 27 Jun 2009 07:55:32 +0000 (09:55 +0200)]
mtd: Use BLOCK_NIL consistently in NFTL/INFTL

Use BLOCK_NIL consistently rather than sometimes 0xffff and sometimes
BLOCK_NIL.

The semantic patch that finds this issue is below
(http://www.emn.fr/x-info/coccinelle/).  On the other hand, the changes
were made by hand, in part because drivers/mtd/inftlcore.c contains dead
code that causes spatch to ignore a relevant function.  Specifically, the
function INFTL_findwriteunit contains a do-while loop, but always takes a
return that leaves the loop on the first iteration.

// <smpl>
@r exists@
identifier f,C;
@@

f(...) { ... return C; }

@s@
identifier r.C;
expression E;
@@

@@
identifier r.f,r.C,I;
expression s.E;
@@

f(...) {
 <...
(
  I
|
- E
+ C
)
 ...>
}

// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoperf stat: Fix multi-run stats
Ingo Molnar [Sat, 27 Jun 2009 04:24:32 +0000 (06:24 +0200)]
perf stat: Fix multi-run stats

In multi-run (-r/--repeat) printouts, print out the noise of
the wall-clock average as well.

Also, fix a bug in printing out scaled counters: if it was not
scaled then we should not update the average with -1.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf stat: Add -n/--null option to run without counters
Ingo Molnar [Sat, 27 Jun 2009 04:10:30 +0000 (06:10 +0200)]
perf stat: Add -n/--null option to run without counters

Allow a no-counters run. This can be useful to measure just
elapsed wall-clock time - or to assess the raw overhead of perf
stat itself, without running any counters.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf_counter tools: Remove dead code
Ingo Molnar [Sat, 27 Jun 2009 04:06:39 +0000 (06:06 +0200)]
perf_counter tools: Remove dead code

Vince Weaver reported that there's a handful of #ifdef __MINGW32__
sections in the code.

Remove them as they are in essence dead code - as unlike upstream
Git, the perf tool is unlikely to be ported to Windows.

Reported-by: Vince Weaver <vince@deater.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agogro: Flush GRO packets in napi_disable_pending path
Herbert Xu [Sat, 27 Jun 2009 02:27:04 +0000 (19:27 -0700)]
gro: Flush GRO packets in napi_disable_pending path

When NAPI is disabled while we're in net_rx_action, we end up
calling __napi_complete without flushing GRO packets.  This is
a bug as it would cause the GRO packets to linger, of course it
also literally BUGs to catch error like this :)

This patch changes it to napi_complete, with the obligatory IRQ
reenabling.  This should be safe because we've only just disabled
IRQs and it does not materially affect the test conditions in
between.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoinet: Call skb_orphan before tproxy activates
Herbert Xu [Sat, 27 Jun 2009 02:22:37 +0000 (19:22 -0700)]
inet: Call skb_orphan before tproxy activates

As transparent proxying looks up the socket early and assigns
it to the skb for later processing, we must drop any existing
socket ownership prior to that in order to distinguish between
the case where tproxy is active and where it is not.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: Use rcu_barrier() on unload.
Jesper Dangaard Brouer [Fri, 26 Jun 2009 10:45:53 +0000 (10:45 +0000)]
mac80211: Use rcu_barrier() on unload.

The mac80211 module uses rcu_call() thus it should use rcu_barrier()
on module unload.

The rcu_barrier() is placed in mech.c ieee80211_stop_mesh() which is
invoked from ieee80211_stop() in case vif.type == NL80211_IFTYPE_MESH_POINT.

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosunrpc: Use rcu_barrier() on unload.
Jesper Dangaard Brouer [Fri, 26 Jun 2009 10:45:58 +0000 (10:45 +0000)]
sunrpc: Use rcu_barrier() on unload.

The sunrpc module uses rcu_call() thus it should use rcu_barrier() on
module unload.

Have not verified that the possibility for new call_rcu() callbacks
has been disabled.  As a hint for checking, the functions calling
call_rcu() (unx_destroy_cred and generic_destroy_cred) are
registered as crdestroy function pointer in struct rpc_credops.

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge: Use rcu_barrier() instead of syncronize_net() on unload.
Jesper Dangaard Brouer [Fri, 26 Jun 2009 10:45:48 +0000 (10:45 +0000)]
bridge: Use rcu_barrier() instead of syncronize_net() on unload.

When unloading modules that uses call_rcu() callbacks, then we must
use rcu_barrier().  This module uses syncronize_net() which is not
enough to be sure that all callback has been completed.

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: Use rcu_barrier() on module unload.
Jesper Dangaard Brouer [Fri, 26 Jun 2009 10:46:03 +0000 (10:46 +0000)]
ipv6: Use rcu_barrier() on module unload.

The ipv6 module uses rcu_call() thus it should use rcu_barrier() on
module unload.

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodecnet: Use rcu_barrier() on module unload.
Jesper Dangaard Brouer [Fri, 26 Jun 2009 10:46:08 +0000 (10:46 +0000)]
decnet: Use rcu_barrier() on module unload.

The decnet module unloading as been disabled with a '#if 0' statement,
because it have had issues.

We add a rcu_barrier() anyhow for correctness.

The maintainer (Chrissie Caulfield) will look into the unload issue
when time permits.

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Chrissie Caulfield <christine.caulfield@googlemail.com>
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoide-cd: handle fragmented packet commands gracefully
Borislav Petkov [Fri, 26 Jun 2009 18:22:37 +0000 (11:22 -0700)]
ide-cd: handle fragmented packet commands gracefully

There are some devices in the wild that clear the DRQ bit during the
last word of a packet command and therefore could use a "second chance"
for that last word of data to be xferred instead of simply failing the
request. Do that by attempting to suck in those last bytes in PIO mode.

In addition, the ATA_ERR bit has to be cleared for we cannot be sure the
data is valid otherwise.

See http://bugzilla.kernel.org/show_bug.cgi?id=13399 for details.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomtd: m25p80 timeout too short for worst-case m25p16 devices
Steven A. Falco [Fri, 26 Jun 2009 16:42:47 +0000 (12:42 -0400)]
mtd: m25p80 timeout too short for worst-case m25p16 devices

The m25p16 data sheet from numonyx lists the worst-case bulk erase time
(tBE) as 40 seconds.

Signed-off-by: Steven A. Falco <sfalco@harris.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Linus Torvalds [Fri, 26 Jun 2009 16:39:40 +0000 (09:39 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/bp/bp

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  amd64_edac: misc small cleanups
  amd64_edac: fix ecc_enable_override handling
  amd64_edac: check only ECC bit in amd64_determine_edac_cap

14 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Fri, 26 Jun 2009 16:39:02 +0000 (09:39 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (29 commits)
  powerpc/rtas: Fix watchdog driver temperature read functionality
  powerpc/mm: Fix potential access to freed pages when using hugetlbfs
  powerpc/440: Fix warning early debug code
  powerpc/of: Fix usage of dev_set_name() in of_device_alloc()
  powerpc/pasemi: Use raw spinlock in SMP TB sync
  powerpc: Use one common impl. of RTAS timebase sync and use raw spinlock
  powerpc/rtas: Turn rtas lock into a raw spinlock
  powerpc: Add irqtrace support for 32-bit powerpc
  powerpc/BSR: Fix BSR to allow mmap of small BSR on 64k kernel
  powerpc/BSR: add 4096 byte BSR size
  powerpc: Map more memory early on 601 processors
  powerpc/pmac: Fix DMA ops for MacIO devices
  powerpc/mm: Make k(un)map_atomic out of line
  powerpc: Fix mpic alloc warning
  powerpc: Fix output from show_regs
  powerpc/pmac: Fix issues with PowerMac "PowerSurge" SMP
  powerpc/amigaone: Limit ISA I/O range to 4k in the device tree
  powerpc/warp: Platform fix for i2c change
  powerpc: Have git ignore generated files from dtc compile
  powerpc/mpic: Fix mapping of "DCR" based MPIC variants
  ...

14 years agokmemleak: Slightly change the policy on newly allocated objects
Catalin Marinas [Fri, 26 Jun 2009 16:38:29 +0000 (17:38 +0100)]
kmemleak: Slightly change the policy on newly allocated objects

Newly allocated objects are more likely to be reported as false
positives. Kmemleak ignores the reporting of objects younger than 5
seconds. However, this age was calculated after the memory scanning
completed which usually takes longer than 5 seconds. This patch
make the minimum object age calculation in relation to the start of the
memory scanning.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>