]> bbs.cooldavid.org Git - net-next-2.6.git/log
net-next-2.6.git
13 years agodrm/i915: Allocate the PCI resource for the MCHBAR
Chris Wilson [Fri, 20 Aug 2010 13:36:45 +0000 (14:36 +0100)]
drm/i915: Allocate the PCI resource for the MCHBAR

We were failing when trying to allocate the resource for MMIO of the
MCHBAR because we forgot to specify what type of resource we wanted.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@kernel.org
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agodrm/i915/dp: Really try 5 times before giving up.
Chris Wilson [Wed, 18 Aug 2010 17:12:56 +0000 (18:12 +0100)]
drm/i915/dp: Really try 5 times before giving up.

Only stop trying if the aux channel sucessfully reports that the
transmission was completed, otherwise try again. On the 5th failure,
bail and report that something is amiss.

This fixes a sporadic failure in reading the EDID for my external panel
over DP.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
13 years agodrm/i915/sdvo: Restore guess of the DDC bus in absence of VBIOS
Chris Wilson [Thu, 12 Aug 2010 14:26:41 +0000 (15:26 +0100)]
drm/i915/sdvo: Restore guess of the DDC bus in absence of VBIOS

If the VBIOS tells us the mapping of the SDVO device onto the DDC bus,
use it. However, if there is no VBIOS available that mapping is
uninitialised and we should fallback to our earlier guess.

Fix regression introduced in b1083333 (which in turn is a fix for the
regression caused by the introduction of this guess, 14571b4).

References:

  Bug 29499 - [945GM] Screen disconnected because of missing VBIOS
  https://bugs.freedesktop.org/show_bug.cgi?id=29499

  Bug 15109 - i945GM fails to detect EDID on DVI port
  https://bugzilla.kernel.org/show_bug.cgi?id=15109

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-and-tested-by: Paul Neumann <paul104x@yahoo.de>
Cc: Adam Jackson <ajax@redhat.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: stable@kernel.org
13 years agodrm/i915/dp: Boost timeout for enabling transcoder to 100ms
Chris Wilson [Mon, 9 Aug 2010 16:21:44 +0000 (17:21 +0100)]
drm/i915/dp: Boost timeout for enabling transcoder to 100ms

Adam Hill reported that his Arrandale system required a much longer, up
to 200x500us, wait for the panel to initialise or else modesetting would
fail.

References:

  https://bugs.freedesktop.org/show_bug.cgi?id=29141

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-and-tested-by: Adam Hill <sidepipeuk@yahoo.co.uk>
13 years agodrm/i915: Re-use set_base_atomic to share setting of the display registers
Chris Wilson [Sun, 8 Aug 2010 12:20:19 +0000 (13:20 +0100)]
drm/i915: Re-use set_base_atomic to share setting of the display registers

Lets try to avoid repeating old bugs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agodrm/i915: Fix offset page-flips on i965+
Chris Wilson [Sun, 8 Aug 2010 09:15:59 +0000 (10:15 +0100)]
drm/i915: Fix offset page-flips on i965+

i965 uses the Display Registers to compute the offset from the display
base so the new base does not need adjusting when flipping. The older
chipsets use a fence to access the display and so do perceive the
surface as linear and have a single base register which is reprogrammed
using the flip.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reported-by: Marty Jack <martyj19@comcast.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agodrm/i915: Include a generation number in the device info
Chris Wilson [Wed, 11 Aug 2010 08:59:24 +0000 (09:59 +0100)]
drm/i915: Include a generation number in the device info

To simplify the IS_GEN[234] macros and to enable switching.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoi915: return -EFAULT if copy_to_user fails
Dan Carpenter [Wed, 23 Jun 2010 17:03:01 +0000 (19:03 +0200)]
i915: return -EFAULT if copy_to_user fails

copy_to_user() returns the number of bytes remaining to be copied and
I'm pretty sure we want to return a negative error code here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
13 years agoi915: return -EFAULT if copy_to_user fails
Dan Carpenter [Sat, 19 Jun 2010 13:12:51 +0000 (15:12 +0200)]
i915: return -EFAULT if copy_to_user fails

copy_to_user returns the number of bytes remaining to be copied, but we
want to return a negative error code here.  These are returned to
userspace.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
13 years agoagp/intel: Promote warning about failure to setup flush to error.
Chris Wilson [Sat, 4 Sep 2010 13:57:27 +0000 (14:57 +0100)]
agp/intel: Promote warning about failure to setup flush to error.

Make sure we always detect when we fail to correctly allocate the Isoch
Flush Page and print an error to warn the user about the likely memory
corruption that will result in invalid rendering or worse.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
13 years agodrm/i915: overlay on gen2 can't address above 1G
Daniel Vetter [Mon, 30 Aug 2010 19:25:23 +0000 (21:25 +0200)]
drm/i915: overlay on gen2 can't address above 1G

So set the coherent dma mask accordingly. This dma mask is only used
for physical objects, so it won't really matter allocation-wise.

Now this never really surfaced because sane 32bit kernels only have 1G
of lowmem. But some eager testers (distros?) still carry around the patch
to adjust lowmem via a kconfig option. And the kernel seems to favour
high allocations on boot-up, hence the overlay blowing up reliably.

Because the patch is tiny and nicely shows how broken gen2 is it's imho
worth to merge despite the fact that mucking around with the lowmem/
highmem division is (no longer) supported.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28318
Cc: stable@kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Clear the vblank status bit before polling for the next vblank
Chris Wilson [Sun, 5 Sep 2010 19:25:43 +0000 (20:25 +0100)]
drm/i915: Clear the vblank status bit before polling for the next vblank

The vblank status bit is a sticky bit that must be cleared with a write
of '1' prior to polling for the next vblank.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
jbarnes: I'd still rather see a lock, but I think you're right that
we don't generally wait in code that needs not to miss an interrupt.
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoi915: Fix spurious TV detection after 9d0498a2bf + 9559fcdbff
Pekka Enberg [Sat, 4 Sep 2010 16:24:04 +0000 (19:24 +0300)]
i915: Fix spurious TV detection after 9d0498a2bf + 9559fcdbff

Partial revert of 9d0498a2bf.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Tested-by: Hugh Dickins <hughd@google.com>
Tested-by: Sven Joachim <svenjoac@gmx.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoi915: revert some checks added by commit 32aad86f
Pavel Roskin [Thu, 2 Sep 2010 18:46:34 +0000 (14:46 -0400)]
i915: revert some checks added by commit 32aad86f

This fixes blur-like screen corruption on the following card:

VGA compatible controller [0300]: Intel Corporation 82G33/G31 Express
Integrated Graphics Controller [8086:29c2] (rev 10)

intel_sdvo_mode_set() should not return prematurely just because some
features are not supported.

https://bugzilla.kernel.org/show_bug.cgi?id=17151

Signed-off-by: Pavel Roskin <proski@gnu.org>
Reported-by: Jonathan Corbet <corbet@lwn.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
[ickle: Relax a couple more checks for failing LVDS modesetting]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoRevert "drm/i915: Unreference object not handle on creation"
Chris Wilson [Mon, 6 Sep 2010 13:44:14 +0000 (14:44 +0100)]
Revert "drm/i915: Unreference object not handle on creation"

This reverts commit 86f100b136626e91f4f66f3776303475e2e58998.

The kref API requires the handlecount to be initialised to one on object
creation (so that kref_get() doesn't complain upon first use) so the
dalliance in the drivers is required in order to sink the initial
floating reference.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
13 years agodrivers/gpu/drm/i915/intel_overlay.c needs seq_file.h
Andrew Morton [Tue, 24 Aug 2010 23:35:52 +0000 (16:35 -0700)]
drivers/gpu/drm/i915/intel_overlay.c needs seq_file.h

drivers/gpu/drm/i915/intel_overlay.c: In function 'intel_overlay_print_error_state':

drivers/gpu/drm/i915/intel_overlay.c:1467: error: implicit declaration of function 'seq_printf'

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16811

Reported-by: Martin Ziegler <ziegler@uni-freiburg.de>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Eric Anholt <eric@anholt.net>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Andre Muller <andremuellerster@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm: Do not force 1024x768 modes on unknown connectors
Chris Wilson [Sun, 5 Sep 2010 15:55:25 +0000 (16:55 +0100)]
drm: Do not force 1024x768 modes on unknown connectors

Only fallback to a set of default modes on a connector iff that
connector is known to be connected. The issue occurs that with limited
hardware which cannot probe a connector and so reports the
connector status as unknown will then attempt to retrieve the modes for
it during drm_helper_probe_single_connector_modes(). Should that fail,
the helper then generates a default set which fools the fb_helper and
causes havoc with the console and beyond.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/kms: Add a module parameter to disable polling
Chris Wilson [Fri, 20 Aug 2010 08:13:36 +0000 (09:13 +0100)]
drm/kms: Add a module parameter to disable polling

Polling for a VGA device on an old system can be quite expensive,
causing latencies on the order of 600ms. As we hold the mode mutex for
this time and also need the same mutex to move the cursor, we trigger a
user-visible stall.

The real solution would involve improving the granulatity of the
locking and so perhaps performing some of the probing not under the lock
or some other updates can be done under different locks. Also reducing the
cost of probing for a non-existent monitor would be worthwhile. However,
exposing a parameter to disable polling is a simple workaround in the
meantime.

In order to accommodate users turning polling on and off at runtime, the
polling is potentially re-enabled on every probe. This is coupled to
the user calling xrandr, which seems to be a vaild time to reset the
polling timeout since the information on the connection has just been
updated. (The presumption being that all connections are probed in a
single xrandr pass, which is currently valid.)

References:

  Bug 29536 - 2.6.35 causes ~600ms latency every 10s
  https://bugs.freedesktop.org/show_bug.cgi?id=29536

  Bug 16265 - Why is kslowd accumulating so much CPU time?
  https://bugzilla.kernel.org/show_bug.cgi?id=16265

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-and-tested-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: fix tv-out on avivo asics
Alex Deucher [Fri, 3 Sep 2010 19:52:53 +0000 (15:52 -0400)]
drm/radeon/kms: fix tv-out on avivo asics

digital underscan support regressed tv-out.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=29985

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms/evergreen: fix gpu hangs in userspace accel code
Alex Deucher [Fri, 3 Sep 2010 01:32:32 +0000 (21:32 -0400)]
drm/radeon/kms/evergreen: fix gpu hangs in userspace accel code

These VGT regs need to be programmed via the ring rather than
MMIO as on previous asics (r6xx/r7xx).

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agogcc-4.6: kernel/*: Fix unused but set warnings
Andi Kleen [Tue, 10 Aug 2010 21:17:51 +0000 (14:17 -0700)]
gcc-4.6: kernel/*: Fix unused but set warnings

No real bugs I believe, just some dead code.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: andi@firstfloor.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86, mcheck: Avoid duplicate sysfs links/files for thresholding banks
Andreas Herrmann [Fri, 27 Aug 2010 09:20:07 +0000 (11:20 +0200)]
x86, mcheck: Avoid duplicate sysfs links/files for thresholding banks

kobject_add_internal failed for threshold_bank2 with -EEXIST,
don't try to register things with the same name in the same
directory:

  Pid: 1, comm: swapper Tainted: G        W  2.6.31 #1
  Call Trace:
  [<ffffffff81161b07>] ? kobject_add_internal+0x156/0x180
  [<ffffffff81161cc0>] ? kobject_add+0x66/0x6b
  [<ffffffff81161793>] ? kobject_init+0x42/0x82
  [<ffffffff81161cf9>] ? kobject_create_and_add+0x34/0x63
  [<ffffffff81393963>] ? threshold_create_bank+0x14f/0x259
  [<ffffffff8139310a>] ? mce_create_device+0x8d/0x1b8
  [<ffffffff81646497>] ? threshold_init_device+0x3f/0x80
  [<ffffffff81646458>] ? threshold_init_device+0x0/0x80
  [<ffffffff81009050>] ? do_one_initcall+0x4f/0x143
  [<ffffffff816413a0>] ? kernel_init+0x14c/0x1a2
  [<ffffffff8100c8da>] ? child_rip+0xa/0x20
  [<ffffffff81641254>] ? kernel_init+0x0/0x1a2
  [<ffffffff8100c8d0>] ? child_rip+0x0/0x20
  kobject_create_and_add: kobject_add error: -17

(Probably the for_each_cpu loop should be entirely removed.)

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20100827092006.GB5348@loge.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoio-mapping: Fix the address space annotations
Francisco Jerez [Sat, 4 Sep 2010 20:56:44 +0000 (22:56 +0200)]
io-mapping: Fix the address space annotations

Fixes a bunch of sparse warnings in io-mapping.h because of the
inconsistent __iomem usage.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
LKML-Reference: <1283633804-11749-2-git-send-email-currojerez@riseup.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agox86: Fix the address space annotations of iomap_atomic_prot_pfn()
Francisco Jerez [Sat, 4 Sep 2010 20:56:43 +0000 (22:56 +0200)]
x86: Fix the address space annotations of iomap_atomic_prot_pfn()

This patch fixes the sparse warnings when the return pointer of
iomap_atomic_prot_pfn() is used as an argument of iowrite32()
and friends.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
LKML-Reference: <1283633804-11749-1-git-send-email-currojerez@riseup.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoStaging: wlan-ng: Explicitly set some fields in cfg80211 interface
Karl Relton [Wed, 11 Aug 2010 17:16:08 +0000 (18:16 +0100)]
Staging: wlan-ng: Explicitly set some fields in cfg80211 interface

The cfg80211 api has introduced a few new fields. Rather than assume
what cfg80211 api does by default, set these explicitly.

Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: octeon: depends on NETDEVICES
Randy Dunlap [Tue, 24 Aug 2010 21:09:40 +0000 (14:09 -0700)]
Staging: octeon: depends on NETDEVICES

OCTEON_ETHERNET should depend on NETDEVICES.

Fixes this kconfig warning:

warning: (NET_DSA && NET && EXPERIMENTAL && NETDEVICES && !S390 || ...
|| OCTEON_ETHERNET && STAGING && !STAGING_EXCLUDE_BUILD && CPU_CAVIUM_OCTEON) selects PHYLIB which has unmet direct dependencies (!S390 && NETDEVICES)

Reported-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: support@caviumnetworks.com
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: spectra: depend on X86_MRST
Jeff Mahoney [Tue, 24 Aug 2010 16:12:26 +0000 (12:12 -0400)]
Staging: spectra: depend on X86_MRST

lld_nand fails to build on arches without virt_to_bus. Since this driver
is specifically for hardware enablment on Moorestown, this patch adds
Moorestown MID support as a dependency.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: zram: free device memory when init fails
Shahar Havivi [Sat, 28 Aug 2010 07:09:05 +0000 (10:09 +0300)]
Staging: zram: free device memory when init fails

Signed-off-by: Shahar Havivi <shaharh@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: rt2870sta: Add more device IDs from vendor drivers
Ben Hutchings [Sun, 29 Aug 2010 01:13:11 +0000 (02:13 +0100)]
Staging: rt2870sta: Add more device IDs from vendor drivers

Taken from DPO_RT3070_LinuxSTA_V2.3.0.4_20100604.tar.bz2 and
2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2, with duplicates removed.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: comedi das08_cs.c: Fix io_req_t conversion
Andreas Bombe [Sat, 14 Aug 2010 01:24:22 +0000 (03:24 +0200)]
staging: comedi das08_cs.c: Fix io_req_t conversion

Commit 90abdc3b9 converted all PCMCIA users away from io_req_t. In
das08_cs.c the converted IO lines mask setting was added but the old
line using the now inexistent p_dev->io was not removed.

Signed-off-by: Andreas Bombe <aeb@debian.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: spectra needs <linux/slab.h>
Geert Uytterhoeven [Mon, 30 Aug 2010 06:57:49 +0000 (08:57 +0200)]
staging: spectra needs <linux/slab.h>

On one of my m68k test builds I get:

drivers/staging/spectra/ffsport.c: In function ‘ioctl_read_page_data’:
drivers/staging/spectra/ffsport.c:196: error: implicit declaration of function ‘kmalloc’
drivers/staging/spectra/ffsport.c:196: warning: assignment makes pointer from integer without a cast
drivers/staging/spectra/ffsport.c:212: error: implicit declaration of function ‘kfree’
drivers/staging/spectra/ffsport.c: In function ‘ioctl_write_page_data’:
drivers/staging/spectra/ffsport.c:229: warning: assignment makes pointer from integer without a cast
drivers/staging/spectra/ffsport.c: In function ‘SBD_setup_device’:
drivers/staging/spectra/ffsport.c:637: warning: assignment makes pointer from integer without a cast

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: hv: Fixed lockup problem with bounce_buffer scatter list
Hank Janssen [Wed, 1 Sep 2010 18:10:41 +0000 (11:10 -0700)]
staging: hv: Fixed lockup problem with bounce_buffer scatter list

Fixed lockup problem with bounce_buffer scatter list which caused
crashes in heavy loads. And minor code indentation cleanup in effected
area.

Removed whitespace and noted minor indentation changes in description as
pointed out by Joe Perches. (Thanks for reviewing Joe)

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: hv: Increased storvsc ringbuffer and max_io_requests
Hank Janssen [Thu, 5 Aug 2010 19:30:31 +0000 (19:30 +0000)]
staging: hv: Increased storvsc ringbuffer and max_io_requests

Increased storvsc ringbuffer and max_io_requests. This now more
closely mimics the numbers on Hyper-V. And will allow more IO requests
to take place for the SCSI driver.

Max_IO is set to double from what it was before, Hyper-V allows it and
we have had appliance builder requests to see if it was a problem to
increase the number.

Ringbuffer size for storvsc is now increased because I have seen A few buffer
problems on extremely busy systems. They were Set pretty low before.
And since max_io_requests is increased I Really needed to increase the buffer
as well.

Signed-off-by:Hank Janssen <hjanssen@microsoft.com>
Signed-off-by:Haiyang Zhang <haiyangz@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: hv: Fixed the value of the 64bit-hole inside ring buffer
Haiyang Zhang [Thu, 5 Aug 2010 19:30:01 +0000 (19:30 +0000)]
staging: hv: Fixed the value of the 64bit-hole inside ring buffer

Fixed the value of the 64bit-hole inside ring buffer, this
caused a problem on Hyper-V when running checked Windows builds.

Checked builds of Windows are used internally and given to external
system integrators at times. They are builds that for example that all
elements in a structure follow the definition of that Structure. The bug
this fixed was for a field that we did not fill in at all (Because we do
Not use it on the Linux side), and the checked build of windows gives
errors on it internally to the Windows logs.

This fixes that error.

Signed-off-by:Hank Janssen <hjanssen@microsoft.com>
Signed-off-by:Haiyang Zhang <haiyangz@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: hv: Fixed bounce kmap problem by using correct index
Hank Janssen [Thu, 5 Aug 2010 19:29:44 +0000 (19:29 +0000)]
staging: hv: Fixed bounce kmap problem by using correct index

Fixed bounce offset kmap problem by using correct index.
The symptom of the problem is that in some NAS appliances this problem
represents Itself by a unresponsive VM under a load with many clients writing
small files.

Signed-off-by:Hank Janssen <hjanssen@microsoft.com>
Signed-off-by:Haiyang Zhang <haiyangz@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: hv: Fix missing functions for net_device_ops
Haiyang Zhang [Tue, 3 Aug 2010 19:15:31 +0000 (19:15 +0000)]
staging: hv: Fix missing functions for net_device_ops

Fix missing functions for net_device_ops.
It's a bug when porting the drivers from 2.6.27 to 2.6.32. In 2.6.27,
the default functions for Ethernet, like eth_change_mtu(), were assigned
by ether_setup(). But in 2.6.32, these function pointers moved to
net_device_ops structure and no longer be assigned in ether_setup(). So
we need to set these functions in our driver code. It will ensure the
MTU won't be set beyond 1500. Otherwise, this can cause an error on the
server side, because the HyperV linux driver doesn't support jumbo frame
yet.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ftdi_sio: Added custom PIDs for ChamSys products
Luke Lowrey [Thu, 2 Sep 2010 10:39:49 +0000 (11:39 +0100)]
USB: ftdi_sio: Added custom PIDs for ChamSys products

Added the 0xDAF8 to 0xDAFF PID range for ChamSys limited USB interface/wing products

Signed-off-by: Luke Lowrey <luke@chamsys.co.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: cdc-acm: Fixing crash when ACM probing interfaces with no endpoint descriptors.
Toby Gray [Thu, 2 Sep 2010 09:46:20 +0000 (10:46 +0100)]
USB: cdc-acm: Fixing crash when ACM probing interfaces with no endpoint descriptors.

Certain USB devices, such as the Nokia X6 mobile phone, don't expose any
endpoint descriptors on some of their interfaces. If the ACM driver is forced
to probe all interfaces on a device the a NULL pointer dereference will occur
when the ACM driver attempts to use the endpoint of the alternative settings.
One way to get the ACM driver to probe all the interfaces is by using the
/sys/bus/usb/drivers/cdc_acm/new_id interface.

This patch checks that the endpoint pointer for the current alternate settings
is non-NULL before using it.

Signed-off-by: Toby Gray <toby.gray@realvnc.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: cdc-acm: Add pseudo modem without AT command capabilities
Philippe Corbes [Tue, 31 Aug 2010 17:31:32 +0000 (19:31 +0200)]
USB: cdc-acm: Add pseudo modem without AT command capabilities

cdc-acm.c : Manage pseudo-modem without AT commands capabilities
  Enable to drive electronic simple gadgets based on microcontrolers.
  The Interface descriptor is like this:
    bInterfaceClass         2 Communications
    bInterfaceSubClass      2 Abstract (modem)
    bInterfaceProtocol      0 None

Signed-off-by: Philippe Corbes <philippe.corbes@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: cxacru: Use a bulk/int URB to access the command endpoint
Simon Arlott [Wed, 1 Sep 2010 17:37:12 +0000 (18:37 +0100)]
USB: cxacru: Use a bulk/int URB to access the command endpoint

The command endpoint is either a bulk or interrupt endpoint, but using
the wrong type of transfer causes an error if CONFIG_USB_DEBUG is
enabled after commit f661c6f8c67bd55e93348f160d590ff9edf08904, which
checks for this mismatch.

Detect which type of endpoint it is and use a bulk/int URB as
appropriate. There are other function calls specifying a bulk pipe,
but usb_clear_halt doesn't use the pipe type (only the endpoint) and
usb_bulk_msg auto-detects interrupt transfers.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: stable <stable@kernel.org> [.34 and newer]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: serial: mos7840: Add USB IDs to support more B&B USB/RS485 converters.
Dave Ludlow [Wed, 1 Sep 2010 16:33:30 +0000 (12:33 -0400)]
usb: serial: mos7840: Add USB IDs to support more B&B USB/RS485 converters.

Add the USB IDs needed to support the B&B USOPTL4-4P, USO9ML2-2P, and
USO9ML2-4P.  This patch expands and corrects a typo in the patch sent
on 08-31-2010.

Signed-off-by: Dave Ludlow <dave.ludlow@bay.ws>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: cdc-acm: Adding second ACM channel support for various Nokia and one Samsung...
Toby Gray [Wed, 1 Sep 2010 15:01:19 +0000 (16:01 +0100)]
USB: cdc-acm: Adding second ACM channel support for various Nokia and one Samsung phones

S60 phones from Nokia and Samsung expose two ACM channels. The first is a modem
with a standard AT-command interface, which is picked up correctly by CDC-ACM.

The second ACM port is marked as having a vendor-specific protocol. This means
that the ACM driver will not claim the second channel by default.

This adds support for the second ACM channel for the following devices:
    Nokia E63
    Nokia E75
    Nokia 6760 Slide
    Nokia E52
    Nokia E55
    Nokia E72
    Nokia X6
    Nokia N97 Mini
    Nokia 5800 Xpressmusic
    Nokia E90
    Samsung GTi8510 (INNOV8)

Signed-off-by: Toby Gray <toby.gray@realvnc.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: serial: mos7840: Add USB ID to support the B&B Electronics USOPTL4-2P.
Dave Ludlow [Tue, 31 Aug 2010 18:26:17 +0000 (14:26 -0400)]
usb: serial: mos7840: Add USB ID to support the B&B Electronics USOPTL4-2P.

Add the USB ID needed to support B&B Electronic's 2-port, optically-isolated,
powered, USB to RS485 converter.

Signed-off-by: Dave Ludlow <dave.ludlow@bay.ws>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ssu100: turn off debug flag
Bill Pemberton [Wed, 25 Aug 2010 22:21:23 +0000 (18:21 -0400)]
USB: ssu100: turn off debug flag

Remove the hard coding of the debug flag to 1.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: allow drivers to use allocated bandwidth until unbound
Thadeu Lima de Souza Cascardo [Sat, 28 Aug 2010 06:06:29 +0000 (03:06 -0300)]
usb: allow drivers to use allocated bandwidth until unbound

When using the remove sysfs file, the device configuration is set to -1
(unconfigured). This eventually unbind drivers with the bandwidth_mutex
held. Some drivers may call functions that hold said mutex, like
usb_reset_device. This is the case for rtl8187, for example. This will
lead to the same process holding the mutex twice, which deadlocks.

Besides, according to Alan Stern:
"The deadlock problem probably could be handled somehow, but there's a
separate issue: Until the usb_disable_device call finishes unbinding
the drivers, the drivers are free to continue using their allocated
bandwidth.  We musn't change the bandwidth allocations until after the
unbinding is done.  So this patch is indeed necessary."

Unbinding the driver before holding the bandwidth_mutex solves the
problem. If any operation after that fails, drivers are not bound again.
But that would be a problem anyway that the user may solve resetting the
device configuration to one that works, just like he would need to do in
most other failure cases.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: cp210x usb driver: add USB_DEVICE for Pirelli DP-L10 mobile.
A E Lawrence [Sun, 29 Aug 2010 20:51:52 +0000 (21:51 +0100)]
USB: cp210x usb driver: add USB_DEVICE for Pirelli DP-L10 mobile.

The Pirelli DP-L10 mobile is sold under various brand names. One, already
supported by cp210x, is the T-COM TC300. Here is the lsusb for that version:
-------------------------------------------------------------------
Bus 001 Device 002: ID 0489:e000 Foxconn / Hon Hai T-Com TC 300
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0489 Foxconn / Hon Hai
  idProduct          0xe000 T-Com TC 300
  bcdDevice            1.00
  iManufacturer           1 Silicon Labs
  iProduct                2 TC 300
  iSerial                 3 0001
    [snip]
---------------------------------------------------------------------------

However the native Pirelli DP-L10 is not supported:
------------------------------------------------------------------
Bus 001 Device 003: ID 0489:e003 Foxconn / Hon Hai Pirelli DP-L10
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0489 Foxconn / Hon Hai
  idProduct          0xe003 Pirelli DP-L10
  bcdDevice            1.00
  iManufacturer           1 Silicon Labs
  iProduct                2 DP-L10
  iSerial                 3 0001
    [snip]
-------------------------------------------------------------------------

All that is required is an extra USB_DEVICE entry:

{ USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM
+Mobile */

The patch adds that entry. Tested under 2.6.36-rc2 from git.

Signed-off-by: A E Lawrence <lawrence_a_e@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: cp210x: Add B&G H3000 link cable ID
Jason Detring [Thu, 26 Aug 2010 20:08:54 +0000 (15:08 -0500)]
USB: cp210x: Add B&G H3000 link cable ID

This is the cable between an H3000 navigation unit and a multi-function display.
http://www.bandg.com/en/Products/H3000/Spares-and-Accessories/Cables/H3000-CPU-USB-Cable-Pack/

Signed-off-by: Jason Detring <jason.detring@navico.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: CP210x Add new device ID
Craig Shelley [Mon, 23 Aug 2010 19:50:57 +0000 (20:50 +0100)]
USB: CP210x Add new device ID

New device ID added for Balluff RFID reader.

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: option: fix incorrect novatel entries
Dirk De Schepper [Tue, 24 Aug 2010 19:38:35 +0000 (20:38 +0100)]
USB: option: fix incorrect novatel entries

Unfortunately some of the hardware PID belonging to auto-install CDROM
(AICD) of Novatel modems found their way into the option module. This
causes the AICD to be treated as a modem in stead of a disk. Since the
modem ports do not appear until after the AICD is ejected, this
essentially disables the modem. After a couple of minutes the AICD
should auto-eject, but it is just too long a wait. The frequency of the
failure seems to depend on both the hardware and the linux distribution.

Here is a patch that fixes this up, and also adds a couple of new PID,
offering some explanations and removing some incomplete and unnecessary
comments.

Signed-off-by: Dirk De Schepper <ddeschepper@nvtl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: Fix kernel oops with g_ether and Windows
Maxim Osipov [Sat, 21 Aug 2010 10:54:06 +0000 (14:54 +0400)]
USB: Fix kernel oops with g_ether and Windows

Please find attached patch for
https://bugzilla.kernel.org/show_bug.cgi?id=16023 problem.

Signed-off-by: Maxim Osipov <maxim.osipov@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: rndis: section mismatch fix
Henrik Kretzschmar [Fri, 20 Aug 2010 17:57:50 +0000 (19:57 +0200)]
USB: rndis: section mismatch fix

This patch removes the following section mismatch warning,
by moving the function rndis_init() from .init.text to .text.

WARNING: vmlinux.o(.text+0x1aeca5a): Section mismatch in reference from the function rndis_bind_config() to the function .init.text:rndis_init()
The function rndis_bind_config() references
the function __init rndis_init().
This is often because rndis_bind_config lacks a __init
annotation or the annotation of rndis_init is wrong.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ehci-ppc-of: problems in unwind
Dan Carpenter [Sat, 14 Aug 2010 09:06:19 +0000 (11:06 +0200)]
USB: ehci-ppc-of: problems in unwind

The iounmap(ehci->ohci_hcctrl_reg); should be the first thing we do
because the ioremap() was the last thing we did.  Also if we hit any of
the goto statements in the original code then it would have led to a
NULL dereference of "ehci".  This bug was introduced in: 796bcae7361c
"USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]"

I modified the few lines in front a little so that my code didn't
obscure the return success code path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: s3c-hsotg: Remove DEBUG define
Maurus Cuelenaere [Fri, 13 Aug 2010 19:29:30 +0000 (21:29 +0200)]
USB: s3c-hsotg: Remove DEBUG define

DEBUG is defined unconditionally, remove it as this clutters the message log.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agotty: fix tty_line must not be equal to number of allocated tty pointers in tty driver
Nathael Pajani [Thu, 2 Sep 2010 14:06:16 +0000 (16:06 +0200)]
tty: fix tty_line must not be equal to number of allocated tty pointers in tty driver

I found a bug "by chance" in drivers/char/tty_io.c

I mean "by chance" because I was just reading the code of the
tty_find_polling_driver() to make a new tty_find_by_name() function.

In tty_find_polling_driver() the driver actually test "tty_line <=
p->num" while num refers to the number of struct tty_struct pointers
allocated for the p->ttys (p is a tty_driver), and tty_line is scanned
in a tty name, which can be for example ttyS2. Then tty_line equals 2.
And if p->num is 2, we have only p->ttys[0] and p->ttys[1], but no
p->ttys[2].

This is actually unharmful, for tty_find_polling_driver() is used only
in drivers/serial/kgdboc.c, and there's a test over there to find a
console with a matching index, which will never happen.

This is still a bug anyway.

Signed-off-by: Nathael Pajani <nathael.pajani@ed3l.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoserial: bfin_sport_uart: restore transmit frame sync fix
Sonic Zhang [Sat, 28 Aug 2010 20:32:55 +0000 (16:32 -0400)]
serial: bfin_sport_uart: restore transmit frame sync fix

The large cleanup/rewrite of resources in commit ccf68e59e93181df9353c0cc
accidentally reverted an earlier fix in commit a19e8b205915b2925aca75b.
So restore it here.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: stable <stable@kernel.org> [.34 and newer]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoserial: fix port type conflict between NS16550A & U6_16550A
Philippe Langlais [Tue, 31 Aug 2010 12:19:09 +0000 (14:19 +0200)]
serial: fix port type conflict between NS16550A & U6_16550A

Bug seen by Dr. David Alan Gilbert with sparse

Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMAINTAINERS: orphan isicom
Jiri Slaby [Tue, 31 Aug 2010 15:08:52 +0000 (17:08 +0200)]
MAINTAINERS: orphan isicom

I do not maintain isicom anymore...

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agovt: Fix console corruption on driver hand-over.
Francisco Jerez [Sun, 22 Aug 2010 15:37:24 +0000 (17:37 +0200)]
vt: Fix console corruption on driver hand-over.

After 02f0777a0d6560eb995aade34a1b82f95c0452da "vc_origin" is no
longer reset to the screen buffer before calling the con_init() hook
of the new console driver.

If the old driver wasn't using a fixed scanout buffer (e.g. the case
of vgacon) "vc_origin" may be a pointer to a VRAM location, and its
contents aren't guaranteed to be preserved after calling con_deinit()
on the old driver and con_init() on the new driver, i.e. the
subsequent console resize may fill the framebuffer with garbage.

It can be reproduced in the transition from vgacon to the nouveau
framebuffer driver: in that case the legacy VGA aperture "vc_origin"
points to becomes unreadable after fbcon_init().

This patch reverts the mentioned commit. To avoid the problem it
intended to fix, stop using "vc_scr_end" in vc_do_resize() to
calculate how many rows we have to copy (actually the code looks
simpler this way without the help of "vc_scr_end").

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Cc: qiaochong <qiaochong@loongson.cn>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agosysfs: checking for NULL instead of ERR_PTR
Dan Carpenter [Wed, 25 Aug 2010 07:12:29 +0000 (09:12 +0200)]
sysfs: checking for NULL instead of ERR_PTR

d_path() returns an ERR_PTR and it doesn't return NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: stable <stable@kernel.org>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoMerge branch '2.6.36-xfs-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc...
Alex Elder [Fri, 3 Sep 2010 14:02:32 +0000 (09:02 -0500)]
Merge branch '2.6.36-xfs-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/xfsdev

13 years agoxfs: Make fiemap work with sparse files
Tao Ma [Mon, 30 Aug 2010 02:44:03 +0000 (02:44 +0000)]
xfs: Make fiemap work with sparse files

In xfs_vn_fiemap, we set bvm_count to fi_extent_max + 1 and want
to return fi_extent_max extents, but actually it won't work for
a sparse file. The reason is that in xfs_getbmap we will
calculate holes and set it in 'out', while out is malloced by
bmv_count(fi_extent_max+1) which didn't consider holes. So in the
worst case, if 'out' vector looks like
[hole, extent, hole, extent, hole, ... hole, extent, hole],
we will only return half of fi_extent_max extents.

This patch add a new parameter BMV_IF_NO_HOLES for bvm_iflags.
So with this flags, we don't use our 'out' in xfs_getbmap for
a hole. The solution is a bit ugly by just don't increasing
index of 'out' vector. I felt that it is not easy to skip it
at the very beginning since we have the complicated check and
some function like xfs_getbmapx_fix_eof_hole to adjust 'out'.

Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agomutex: Fix annotations to include it in kernel-locking docbook
Randy Dunlap [Thu, 2 Sep 2010 22:48:16 +0000 (15:48 -0700)]
mutex: Fix annotations to include it in kernel-locking docbook

Fix kernel-doc notation in linux/mutex.h and kernel/mutex.c,
then add these 2 files to the kernel-locking docbook as the
Mutex API reference chapter.

Add one API function to mutex-design.txt and correct a typo in
that file.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
LKML-Reference: <20100902154816.6cc2f9ad.randy.dunlap@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoperf, x86: Try to handle unknown nmis with an enabled PMU
Robert Richter [Thu, 2 Sep 2010 19:07:48 +0000 (15:07 -0400)]
perf, x86: Try to handle unknown nmis with an enabled PMU

When the PMU is enabled it is valid to have unhandled nmis, two
events could trigger 'simultaneously' raising two back-to-back
NMIs. If the first NMI handles both, the latter will be empty
and daze the CPU.

The solution to avoid an 'unknown nmi' massage in this case was
simply to stop the nmi handler chain when the PMU is enabled by
stating the nmi was handled. This has the drawback that a) we
can not detect unknown nmis anymore, and b) subsequent nmi
handlers are not called.

This patch addresses this. Now, we check this unknown NMI if it
could be a PMU back-to-back NMI. Otherwise we pass it and let
the kernel handle the unknown nmi.

This is a debug log:

 cpu #6, nmi #32333, skip_nmi #32330, handled = 1, time = 1934364430
 cpu #6, nmi #32334, skip_nmi #32330, handled = 1, time = 1934704616
 cpu #6, nmi #32335, skip_nmi #32336, handled = 2, time = 1936032320
 cpu #6, nmi #32336, skip_nmi #32336, handled = 0, time = 1936034139
 cpu #6, nmi #32337, skip_nmi #32336, handled = 1, time = 1936120100
 cpu #6, nmi #32338, skip_nmi #32336, handled = 1, time = 1936404607
 cpu #6, nmi #32339, skip_nmi #32336, handled = 1, time = 1937983416
 cpu #6, nmi #32340, skip_nmi #32341, handled = 2, time = 1938201032
 cpu #6, nmi #32341, skip_nmi #32341, handled = 0, time = 1938202830
 cpu #6, nmi #32342, skip_nmi #32341, handled = 1, time = 1938443743
 cpu #6, nmi #32343, skip_nmi #32341, handled = 1, time = 1939956552
 cpu #6, nmi #32344, skip_nmi #32341, handled = 1, time = 1940073224
 cpu #6, nmi #32345, skip_nmi #32341, handled = 1, time = 1940485677
 cpu #6, nmi #32346, skip_nmi #32347, handled = 2, time = 1941947772
 cpu #6, nmi #32347, skip_nmi #32347, handled = 1, time = 1941949818
 cpu #6, nmi #32348, skip_nmi #32347, handled = 0, time = 1941951591
 Uhhuh. NMI received for unknown reason 00 on CPU 6.
 Do you have a strange power saving mode enabled?
 Dazed and confused, but trying to continue

Deltas:

 nmi #32334 340186
 nmi #32335 1327704
 nmi #32336 1819      <<<< back-to-back nmi [1]
 nmi #32337 85961
 nmi #32338 284507
 nmi #32339 1578809
 nmi #32340 217616
 nmi #32341 1798      <<<< back-to-back nmi [2]
 nmi #32342 240913
 nmi #32343 1512809
 nmi #32344 116672
 nmi #32345 412453
 nmi #32346 1462095   <<<< 1st nmi (standard) handling 2 counters
 nmi #32347 2046      <<<< 2nd nmi (back-to-back) handling one
 counter nmi #32348 1773      <<<< 3rd nmi (back-to-back)
 handling no counter! [3]

For  back-to-back nmi detection there are the following rules:

The PMU nmi handler was handling more than one counter and no
counter was handled in the subsequent nmi (see [1] and [2]
above).

There is another case if there are two subsequent back-to-back
nmis [3]. The 2nd is detected as back-to-back because the first
handled more than one counter. If the second handles one counter
and the 3rd handles nothing, we drop the 3rd nmi because it
could be a back-to-back nmi.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
[ renamed nmi variable to pmu_nmi to avoid clash with .nmi in entry.S ]
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: peterz@infradead.org
Cc: gorcunov@gmail.com
Cc: fweisbec@gmail.com
Cc: ying.huang@intel.com
Cc: ming.m.lin@intel.com
Cc: eranian@google.com
LKML-Reference: <1283454469-1909-3-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoperf, x86: Fix handle_irq return values
Peter Zijlstra [Thu, 2 Sep 2010 19:07:49 +0000 (15:07 -0400)]
perf, x86: Fix handle_irq return values

Now that we rely on the number of handled overflows, ensure all
handle_irq implementations actually return the right number.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: peterz@infradead.org
Cc: robert.richter@amd.com
Cc: gorcunov@gmail.com
Cc: fweisbec@gmail.com
Cc: ying.huang@intel.com
Cc: ming.m.lin@intel.com
Cc: eranian@google.com
LKML-Reference: <1283454469-1909-4-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoperf, x86: Fix accidentally ack'ing a second event on intel perf counter
Don Zickus [Thu, 2 Sep 2010 19:07:47 +0000 (15:07 -0400)]
perf, x86: Fix accidentally ack'ing a second event on intel perf counter

During testing of a patch to stop having the perf subsytem
swallow nmis, it was uncovered that Nehalem boxes were randomly
getting unknown nmis when using the perf tool.

Moving the ack'ing of the PMI closer to when we get the status
allows the hardware to properly re-set the PMU bit signaling
another PMI was triggered during the processing of the first
PMI.  This allows the new logic for dealing with the
shortcomings of multiple PMIs to handle the extra NMI by
'eat'ing it later.

Now one can wonder why are we getting a second PMI when we
disable all the PMUs in the begining of the NMI handler to
prevent such a case, for that I do not know.  But I know the fix
below helps deal with this quirk.

Tested on multiple Nehalems where the problem was occuring.
With the patch, the code now loops a second time to handle the
second PMI (whereas before it was not).

Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: peterz@infradead.org
Cc: robert.richter@amd.com
Cc: gorcunov@gmail.com
Cc: fweisbec@gmail.com
Cc: ying.huang@intel.com
Cc: ming.m.lin@intel.com
Cc: eranian@google.com
LKML-Reference: <1283454469-1909-2-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoMerge remote branch 'nouveau/for-airlied' of /ssd/git/drm-nouveau-next into drm-fixes
Dave Airlie [Fri, 3 Sep 2010 03:31:33 +0000 (13:31 +1000)]
Merge remote branch 'nouveau/for-airlied' of /ssd/git/drm-nouveau-next into drm-fixes

* 'nouveau/for-airlied' of /ssd/git/drm-nouveau-next:
  drm/nv50: initialize ramht_refs list for faked 0 channel
  drm/nouveau: Don't take struct_mutex around the pushbuf IOCTL.
  drm/nouveau: Take fence spinlock before reading the last sequence.

13 years agoxfs: prevent 32bit overflow in space reservation
Dave Chinner [Fri, 3 Sep 2010 02:19:33 +0000 (12:19 +1000)]
xfs: prevent 32bit overflow in space reservation

If we attempt to preallocate more than 2^32 blocks of space in a
single syscall, the transaction block reservation will overflow
leading to a hangs in the superblock block accounting code. This
is trivially reproduced with xfs_io. Fix the problem by capping the
allocation reservation to the maximum number of blocks a single
xfs_bmapi() call can allocate (2^21 blocks).

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agodrm/nv50: initialize ramht_refs list for faked 0 channel
Marcin Slusarz [Sun, 22 Aug 2010 18:54:08 +0000 (20:54 +0200)]
drm/nv50: initialize ramht_refs list for faked 0 channel

We need it for PFIFO_INTR_CACHE_ERROR interrupt handling,
because nouveau_fifo_swmthd looks for matching gpuobj in
ramht_refs list.
It fixes kernel panic in nouveau_gpuobj_ref_find.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: Don't take struct_mutex around the pushbuf IOCTL.
Francisco Jerez [Sun, 29 Aug 2010 10:21:16 +0000 (12:21 +0200)]
drm/nouveau: Don't take struct_mutex around the pushbuf IOCTL.

We don't need it and it can lead to lock order inversions with respect
to drm_global_mutex, potentially causing dead locks.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: Take fence spinlock before reading the last sequence.
Francisco Jerez [Sat, 28 Aug 2010 15:56:33 +0000 (17:56 +0200)]
drm/nouveau: Take fence spinlock before reading the last sequence.

It fixes a race between the TTM delayed work queue and the GEM IOCTLs
(fdo bug 29583) uncovered by the BKL removal.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agoRDMA/cxgb3: Don't exceed the max HW CQ depth
Steve Wise [Sat, 28 Aug 2010 13:35:05 +0000 (13:35 +0000)]
RDMA/cxgb3: Don't exceed the max HW CQ depth

The max depth supported by T3 is 64K entries.  This fixes a bug
introduced in commit 9918b28d ("RDMA/cxgb3: Increase the max CQ
depth") that causes stalls and possibly crashes in large MPI clusters.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Cc: <stable@kernel.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
13 years agopkt_sched: Fix lockdep warning on est_tree_lock in gen_estimator
Jarek Poplawski [Thu, 2 Sep 2010 20:22:11 +0000 (13:22 -0700)]
pkt_sched: Fix lockdep warning on est_tree_lock in gen_estimator

This patch fixes a lockdep warning:

[  516.287584] =========================================================
[  516.288386] [ INFO: possible irq lock inversion dependency detected ]
[  516.288386] 2.6.35b #7
[  516.288386] ---------------------------------------------------------
[  516.288386] swapper/0 just changed the state of lock:
[  516.288386]  (&qdisc_tx_lock){+.-...}, at: [<c12eacda>] est_timer+0x62/0x1b4
[  516.288386] but this lock took another, SOFTIRQ-unsafe lock in the past:
[  516.288386]  (est_tree_lock){+.+...}
[  516.288386]
[  516.288386] and interrupts could create inverse lock ordering between them.
...

So, est_tree_lock needs BH protection because it's taken by
qdisc_tx_lock, which is used both in BH and process contexts.
(Full warning with this patch at netdev, 02 Sep 2010.)

Fixes commit: ae638c47dc040b8def16d05dc6acdd527628f231
("pkt_sched: gen_estimator: add a new lock")

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonfsd4: mask out non-access bits in nfs4_access_to_omode
J. Bruce Fields [Thu, 2 Sep 2010 19:23:16 +0000 (15:23 -0400)]
nfsd4: mask out non-access bits in nfs4_access_to_omode

This fixes an unnecessary BUG().

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
13 years agoipvs: avoid oops for passive FTP
Julian Anastasov [Wed, 1 Sep 2010 23:07:10 +0000 (23:07 +0000)]
ipvs: avoid oops for passive FTP

Fix Passive FTP problem in ip_vs_ftp:

- Do not oops in nf_nat_set_seq_adjust (adjust_tcp_sequence) when
  iptable_nat module is not loaded

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoRevert "sky2: don't do GRO on second port"
David S. Miller [Thu, 2 Sep 2010 16:39:09 +0000 (09:39 -0700)]
Revert "sky2: don't do GRO on second port"

This reverts commit de6be6c1f77798c4da38301693d33aff1cd76e84.

After some discussion with Jarek Poplawski and Eric Dumazet, we've
decided that this change is incorrect.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoARM: 6352/1: perf: fix event validation
Will Deacon [Thu, 2 Sep 2010 08:32:08 +0000 (09:32 +0100)]
ARM: 6352/1: perf: fix event validation

The validate_event function in the ARM perf events backend has the
following problems:

1.) Events that are disabled count towards the cost.
2.) Events associated with other PMUs [for example, software events or
    breakpoints] do not count towards the cost, but do fail validation,
    causing the group to fail.

This patch changes validate_event so that it ignores events in the
PERF_EVENT_STATE_OFF state or that are scheduled for other PMUs.

Reported-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoxfs: Disallow 32bit project quota id
Arkadiusz Mi?kiewicz [Thu, 26 Aug 2010 10:19:43 +0000 (10:19 +0000)]
xfs: Disallow 32bit project quota id

Currently on-disk structure is able to keep only 16bit project quota
id, so disallow 32bit ones. This fixes a problem where parts of
kernel structures holding project quota id are 32bit while parts
(on-disk) are 16bit variables which causes project quota member
files to be inaccessible for some operations (like mv/rm).

Signed-off-by: Arkadiusz Mi?kiewicz <arekm@maven.pl>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoARM: 6344/1: Mark CPU_32v6K as depended on CPU_V7
Catalin Marinas [Wed, 1 Sep 2010 13:33:29 +0000 (14:33 +0100)]
ARM: 6344/1: Mark CPU_32v6K as depended on CPU_V7

CPU_32v6K is selected by CPU_V7 but it only depends on CPU_V6.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoxfs: improve buffer cache hash scalability
Dave Chinner [Thu, 2 Sep 2010 05:14:38 +0000 (15:14 +1000)]
xfs: improve buffer cache hash scalability

When doing large parallel file creates on a 16p machines, large amounts of
time is being spent in _xfs_buf_find(). A system wide profile with perf top
shows this:

          1134740.00 19.3% _xfs_buf_find
           733142.00 12.5% __ticket_spin_lock

The problem is that the hash contains 45,000 buffers, and the hash table width
is only 256 buffers. That means we've got around 200 buffers per chain, and
searching it is quite expensive. The hash table size needs to increase.

Secondly, every time we do a lookup, we promote the buffer we find to the head
of the hash chain. This is causing cachelines to be dirtied and causes
invalidation of cachelines across all CPUs that may have walked the hash chain
recently. hence every walk of the hash chain is effectively a cold cache walk.
Remove the promotion to avoid this invalidation.

The results are:

          1045043.00 21.2% __ticket_spin_lock
           326184.00  6.6% _xfs_buf_find

A 70% drop in the CPU usage when looking up buffers. Unfortunately that does
not result in an increase in performance underthis workload as contention on
the inode_lock soaks up most of the reduction in CPU usage.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
13 years agodrm/radeon/kms/evergreen: work around bad data in some i2c tables
Alex Deucher [Fri, 27 Aug 2010 20:04:29 +0000 (16:04 -0400)]
drm/radeon/kms/evergreen: work around bad data in some i2c tables

The 7th entry in a lot of evergreen i2c gpio tables is partially
zeroed.  Fix the entry.

Should fix the missing ddc entry in:
https://bugs.freedesktop.org/show_bug.cgi?id=29255

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agogro: fix different skb headrooms
Eric Dumazet [Wed, 1 Sep 2010 00:50:51 +0000 (00:50 +0000)]
gro: fix different skb headrooms

Packets entering GRO might have different headrooms, even for a given
flow (because of implementation details in drivers, like copybreak).
We cant force drivers to deliver packets with a fixed headroom.

1) fix skb_segment()

skb_segment() makes the false assumption headrooms of fragments are same
than the head. When CHECKSUM_PARTIAL is used, this can give csum_start
errors, and crash later in skb_copy_and_csum_dev()

2) allocate a minimal skb for head of frag_list

skb_gro_receive() uses netdev_alloc_skb(headroom + skb_gro_offset(p)) to
allocate a fresh skb. This adds NET_SKB_PAD to a padding already
provided by netdevice, depending on various things, like copybreak.

Use alloc_skb() to allocate an exact padding, to reduce cache line
needs:
NET_SKB_PAD + NET_IP_ALIGN

bugzilla : https://bugzilla.kernel.org/show_bug.cgi?id=16626

Many thanks to Plamen Petrov, testing many debugging patches !
With help of Jarek Poplawski.

Reported-by: Plamen Petrov <pvp-lsts@fs.uni-ruse.bg>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: Clear INET control block of SKBs passed into ip_fragment().
David S. Miller [Thu, 2 Sep 2010 01:06:39 +0000 (18:06 -0700)]
bridge: Clear INET control block of SKBs passed into ip_fragment().

In a similar vain to commit 17762060c25590bfddd68cc1131f28ec720f405f
("bridge: Clear IPCB before possible entry into IP stack")

Any time we call into the IP stack we have to make sure the state
there is as expected by the ipv4 code.

With help from Eric Dumazet and Herbert Xu.

Reported-by: Bandan Das <bandan.das@stratus.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrm/radeon/kms: properly set crtc high base on r7xx
Alex Deucher [Wed, 1 Sep 2010 21:20:42 +0000 (17:20 -0400)]
drm/radeon/kms: properly set crtc high base on r7xx

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: fix tv module parameter
Alex Deucher [Wed, 1 Sep 2010 21:15:06 +0000 (17:15 -0400)]
drm/radeon/kms: fix tv module parameter

The tv parameter was added to disable the tv-out connector,
however, it caused a crash if it was set to 0 due to
drm_connector_init not getting called.  If tv=0, don't
attempt to add the connector.

Might fix:
https://bugzilla.kernel.org/show_bug.cgi?id=17241

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: force legacy pll algo for RV515 LVDS
Alex Deucher [Wed, 1 Sep 2010 16:03:37 +0000 (12:03 -0400)]
drm/radeon/kms: force legacy pll algo for RV515 LVDS

There has been periodic evidence that LVDS, on at least some
panels, prefers the dividers selected by the legacy pll algo.
This patch forces the use of the legacy pll algo on RV515
LVDS panels.  The old behavior (new pll algo) can be selected
by setting the new_pll module parameter to 1.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: remove useless clock code
Alex Deucher [Wed, 1 Sep 2010 15:24:42 +0000 (11:24 -0400)]
drm/radeon/kms: remove useless clock code

This code was originally for forcing some clocks on certain asics.
However, this code was later moved to asic specific functions
for all of the affected asics.  The only users of the original
code at this point were r600, rv770, and evergreen and the code
was not relevant for those asics.  So, remove it.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years ago3c59x: Remove incorrect locking; correct documented lock hierarchy
Ben Hutchings [Mon, 30 Aug 2010 14:15:33 +0000 (14:15 +0000)]
3c59x: Remove incorrect locking; correct documented lock hierarchy

vortex_ioctl() was grabbing vortex_private::lock around its call to
generic_mii_ioctl().  This is no longer necessary since there are more
specific locks which the mdio_{read,write}() functions will obtain.
Worse, those functions do not save and restore IRQ flags when locking
the MII state, so interrupts will be enabled when generic_mii_ioctl()
returns.

Since there is currently no need for any function to call
mdio_{read,write}() while holding another spinlock, do not change them
to save and restore IRQ flags but remove the specification of ordering
between vortex_private::lock and vortex_private::mii_lock.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopowerpc/pseries: Correct rtas_data_buf locking in dlpar code
Nathan Fontenot [Wed, 18 Aug 2010 09:58:46 +0000 (09:58 +0000)]
powerpc/pseries: Correct rtas_data_buf locking in dlpar code

The dlpar code can cause a deadlock to occur when making the RTAS
configure-connector call.  This occurs because we make kmalloc calls,
which can block, while parsing the rtas_data_buf and holding the
rtas_data_buf_lock.  This an cause issues if someone else attempts
to grab the rtas_data_bug_lock.

This patch alleviates this issue by copying the contents of the rtas_data_buf
to a local buffer before parsing.  This allows us to only hold the
rtas_data_buf_lock around the RTAS configure-connector calls.

Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
13 years ago[ARM] tegra: Add ZRELADDR default for ARCH_TEGRA
Erik Gilling [Fri, 27 Aug 2010 19:57:39 +0000 (12:57 -0700)]
[ARM] tegra: Add ZRELADDR default for ARCH_TEGRA

fixes the warning:
.config:369:warning: symbol value '' invalid for ZRELADDR

and the prompt for ZRELADDR on make

Signed-off-by: Erik Gilling <konkers@android.com>
13 years agosky2: don't do GRO on second port
stephen hemminger [Mon, 30 Aug 2010 07:51:17 +0000 (07:51 +0000)]
sky2: don't do GRO on second port

There's something very important I forgot to tell you.
 What?

 Don't cross the GRO streams.
 Why?

 It would be bad.
 I'm fuzzy on the whole good/bad thing. What do you mean, "bad"?

 Try to imagine all the Internet as you know it stopping instantaneously
  and every bit in every packet swapping at the speed of light.
 Total packet reordering.
 Right. That's bad. Okay. All right. Important safety tip. Thanks, Hubert

The simplest way to stop this is just avoid doing GRO on the second port.
Very few Marvell boards support two ports per ring, and GRO is just
an optimization.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: minor fix about RPF in help of Kconfig
Nicolas Dichtel [Tue, 31 Aug 2010 05:50:43 +0000 (05:50 +0000)]
ipv4: minor fix about RPF in help of Kconfig

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm_user: avoid a warning with some compiler
Nicolas Dichtel [Tue, 31 Aug 2010 05:54:00 +0000 (05:54 +0000)]
xfrm_user: avoid a warning with some compiler

Attached is a small patch to remove a warning ("warning: ISO C90 forbids
mixed declarations and code" with gcc 4.3.2).

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/sched/sch_hfsc.c: initialize parent's cl_cfmin properly in init_vf()
Michal Soltys [Mon, 30 Aug 2010 11:34:10 +0000 (11:34 +0000)]
net/sched/sch_hfsc.c: initialize parent's cl_cfmin properly in init_vf()

This patch fixes init_vf() function, so on each new backlog period parent's
cl_cfmin is properly updated (including further propgation towards the root),
even if the activated leaf has no upperlimit curve defined.

Signed-off-by: Michal Soltys <soltys@ziu.info>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopxa168_eth: fix a mdiobus leak
Denis Kirjanov [Sun, 29 Aug 2010 21:21:38 +0000 (21:21 +0000)]
pxa168_eth: fix a mdiobus leak

mdiobus resources must be released on exit

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet sched: fix kernel leak in act_police
Jeff Mahoney [Tue, 31 Aug 2010 13:21:42 +0000 (13:21 +0000)]
net sched: fix kernel leak in act_police

While reviewing commit 1c40be12f7d8ca1d387510d39787b12e512a7ce8, I
 audited other users of tc_action_ops->dump for information leaks.

 That commit covered almost all of them but act_police still had a leak.

 opt.limit and opt.capab aren't zeroed out before the structure is
 passed out.

 This patch uses the C99 initializers to zero everything unused out.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovhost: stop worker only if created
Eric Dumazet [Tue, 31 Aug 2010 02:05:57 +0000 (02:05 +0000)]
vhost: stop worker only if created

Its currently illegal to call kthread_stop(NULL)

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile...
Ingo Molnar [Wed, 1 Sep 2010 20:31:07 +0000 (22:31 +0200)]
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/urgent

13 years agoMAINTAINERS: Add ehea driver as Supported
Breno Leitao [Wed, 1 Sep 2010 20:10:53 +0000 (13:10 -0700)]
MAINTAINERS: Add ehea driver as Supported

This change just add the IBM eHEA 10Gb network drivers as supported.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agooprofile, x86: fix init_sysfs() function stub
Robert Richter [Wed, 1 Sep 2010 12:50:50 +0000 (14:50 +0200)]
oprofile, x86: fix init_sysfs() function stub

The use of the return value of init_sysfs() with commit

 10f0412 oprofile, x86: fix init_sysfs error handling

discovered the following build error for !CONFIG_PM:

 .../linux/arch/x86/oprofile/nmi_int.c: In function ‘op_nmi_init’:
 .../linux/arch/x86/oprofile/nmi_int.c:784: error: expected expression before ‘do’
 make[2]: *** [arch/x86/oprofile/nmi_int.o] Error 1
 make[1]: *** [arch/x86/oprofile] Error 2

This patch fixes this.

Reported-by: Ingo Molnar <mingo@elte.hu>
Cc: stable@kernel.org
Signed-off-by: Robert Richter <robert.richter@amd.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 1 Sep 2010 19:01:05 +0000 (12:01 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6