pandora-kernel.git
12 years agosky2: fix regression on Yukon Optima
stephen hemminger [Fri, 4 Nov 2011 12:17:17 +0000 (12:17 +0000)]
sky2: fix regression on Yukon Optima

Changes to support other Optima types, introduced an accidental
regression that caused 88E8059 to come up in 10Mbit/sec.

The Yukon Optima supports a reverse auto-negotiation feature that
was incorrectly setup, and not needed. The feature could be used to
allow wake-on-lan at higher speeds. But doing it correctly would require
other changes to initialization.

Reported-by: Pavel Mateja <pavel@netsafe.cz>
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: clarify attribute length check documentation
Johannes Berg [Thu, 3 Nov 2011 00:10:05 +0000 (00:10 +0000)]
netlink: clarify attribute length check documentation

The documentation for how the length of attributes
is checked is wrong ("Exact length" isn't true, the
policy checks are for "minimum length") and a bit
misleading. Make it more complete and explain what
really happens.

Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetlink: validate NLA_MSECS length
Johannes Berg [Thu, 3 Nov 2011 00:07:32 +0000 (00:07 +0000)]
netlink: validate NLA_MSECS length

L2TP for example uses NLA_MSECS like this:
policy:
        [L2TP_ATTR_RECV_TIMEOUT]        = { .type = NLA_MSECS, },
code:
        if (info->attrs[L2TP_ATTR_RECV_TIMEOUT])
                cfg.reorder_timeout = nla_get_msecs(info->attrs[L2TP_ATTR_RECV_TIMEOUT]);

As nla_get_msecs() is essentially nla_get_u64() plus the
conversion to a HZ-based value, this will not properly
reject attributes from userspace that aren't long enough
and might overrun the message.

Add NLA_MSECS to the attribute minlen array to check the
size properly.

Cc: Thomas Graf <tgraf@suug.ch>
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoi825xx:xscale:8390:freescale: Fix Kconfig dependancies
Jeff Kirsher [Wed, 2 Nov 2011 00:30:52 +0000 (00:30 +0000)]
i825xx:xscale:8390:freescale: Fix Kconfig dependancies

i825xx and xscale are "sub" Kconfigs to NET_VENDOR_INTEL, so
NET_VENDOR_INTEL should contain ALL the dependencies of the
"sub" Kconfigs.

Same with 8390 is a "sub" Kconfig to NET_VENDOR_NATSEMI, so
NET_VENDOR_NATSEMI needs to contains ALL the dependencies.

Freescale Kconfig only had fs_enet as a sub Kconfig, and already
contained the needed dependencies, just cleaned up the dependencies.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomacvlan: receive multicast with local address
stephen hemminger [Wed, 2 Nov 2011 12:11:53 +0000 (12:11 +0000)]
macvlan: receive multicast with local address

When implementing VRRP v2 using macvlan several problems were
discovered.  VRRP is weird in that all routers participating
in a redundant group use the same virtual MAC address.
Macvlan is a natural driver to use for this but it doesn't
work.  The problem is that packets with a macvlan device's
source address are not received.

The problem is actually a regression that date back almost 2 years now.
The original problems started with:

commit 618e1b7482f7a8a4c6c6e8ccbe140e4c331df4e9
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Thu Nov 26 06:07:10 2009 +0000

    macvlan: implement bridge, VEPA and private mode

This patches restores the original 2.6.32 behavior. Allowing multicast
packets received with the VRRP source address to be received.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Update version to 3.121
Matt Carlson [Fri, 4 Nov 2011 09:15:05 +0000 (09:15 +0000)]
tg3: Update version to 3.121

This patch updates the tg3 version to 3.121.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Eliminate timer race with reset_task
Matt Carlson [Fri, 4 Nov 2011 09:15:04 +0000 (09:15 +0000)]
tg3: Eliminate timer race with reset_task

During shutdown, it is impossible to reliably disable the timer and
reset_task threads.  Each thread can schedule the other, which leads to
shutdown code that chases its tail.

To fix the problem, this patch removes the ability of tg3_reset_task to
schedule a new timer thread.  To support this change, tg3_timer no
longer terminates itself, but rather goes into a polling mode.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Schedule at most one tg3_reset_task run
Matt Carlson [Fri, 4 Nov 2011 09:15:03 +0000 (09:15 +0000)]
tg3: Schedule at most one tg3_reset_task run

It is possible for multiple threads in the tg3 driver to each attempt to
schedule a run of tg3_reset_task().  The multiple tg3_reset_task
executions could all wind up on the same queue (and execute serially) or
wind up on the queues of another processor (which could execute in
parallel).  Either scenario is not what was truly desired.

This patch adds a new flag, TG3_FLAG_RESET_TASK_PENDING, and uses it to
determine whether or not to schedule another run of tg3_reset_task().
With the new flag comes two new functions to facilitate scheduling and
descheduling of tg3_reset_task().

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Obtain PCI function number from device
Matt Carlson [Fri, 4 Nov 2011 09:15:02 +0000 (09:15 +0000)]
tg3: Obtain PCI function number from device

This patch adds code to attempt to obtain the PCI function number from
the device rather than accept the number handed by the kernel.  In
pass-through scenarios, the function number handed by the kernel may not
reflect the true function of the device.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Fix irq alloc error cleanup path
Matt Carlson [Fri, 4 Nov 2011 09:15:01 +0000 (09:15 +0000)]
tg3: Fix irq alloc error cleanup path

This patch fixes a bug where the irq error cleanup path did not free all
the resources it allocated.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Ben Li <benli@broadcom.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Fix 4k skb error recovery path
Matt Carlson [Fri, 4 Nov 2011 09:15:00 +0000 (09:15 +0000)]
tg3: Fix 4k skb error recovery path

On the error recovery resource unwind path, it is possible for the
driver to attempt to unmap a fragment that hadn't been mapped.  This
patch fixes the problem by correcting the "last" parameter supplied.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Fix 4k tx bd segmentation code
Matt Carlson [Fri, 4 Nov 2011 09:14:59 +0000 (09:14 +0000)]
tg3: Fix 4k tx bd segmentation code

The new 4k tx bd segmentation code had a bug in the error cleanup path.
If the driver did not map all the physical fragments, the abort path
would wind up advancing the producer index beyond the point where the
setup code stopped.  This would ultimately turn into a tx recovery error
where the driver would expect the skb pointer to be set when it isn't.
This patch fixes the problem, and then makes the code a little easier to
understand.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Fix APE mutex init and use
Matt Carlson [Fri, 4 Nov 2011 09:14:58 +0000 (09:14 +0000)]
tg3: Fix APE mutex init and use

APE mutex register blocks are shared by all ports of multiport devices.
For some mutexing purposes, each function is assigned their own
register.  For other cases, each function is assigned its own request
and grant bits of a single register.  For the latter cases, the tg3
driver is incorrectly allowing each function to use the same set of
grant / request bits.  This patch fixes the code so that each function
uses the appropriate bitset.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoPM / Freezer: Revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_K...
Tejun Heo [Fri, 4 Nov 2011 00:04:52 +0000 (01:04 +0100)]
PM / Freezer: Revert 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake TASK_KILLABLE tasks too"

Commit 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake
TASK_KILLABLE tasks too" updated fake_signal_wake_up() used by freezer
to wake up KILLABLE tasks.  Sending unsolicited wakeups to tasks in
killable sleep is dangerous as there are code paths which depend on
tasks not waking up spuriously from KILLABLE sleep.

For example. sys_read() or page can sleep in TASK_KILLABLE assuming
that wait/down/whatever _killable can only fail if we can not return
to the usermode.  TASK_TRACED is another obvious example.

The previous patch updated wait_event_freezekillable() such that it
doesn't depend on the spurious wakeup.  This patch reverts the
offending commit.

Note that the spurious KILLABLE wakeup had other implicit effects in
KILLABLE sleeps in nfs and cifs and those will need further updates to
regain freezekillable behavior.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / Freezer: Reimplement wait_event_freezekillable using freezer_do_not_count/freeze...
Oleg Nesterov [Thu, 3 Nov 2011 23:07:49 +0000 (16:07 -0700)]
PM / Freezer: Reimplement wait_event_freezekillable using freezer_do_not_count/freezer_count

Commit 27920651fe "PM / Freezer: Make fake_signal_wake_up() wake
TASK_KILLABLE tasks too" updated fake_signal_wake_up() used by freezer
to wake up KILLABLE tasks.  Sending unsolicited wakeups to tasks in
killable sleep is dangerous as there are code paths which depend on
tasks not waking up spuriously from KILLABLE sleep.

For example. sys_read() or page can sleep in TASK_KILLABLE assuming
that wait/down/whatever _killable can only fail if we can not return
to the usermode.  TASK_TRACED is another obvious example.

The offending commit was to resolve freezer hang during system PM
operations caused by KILLABLE sleeps in network filesystems.
wait_event_freezekillable(), which depends on the spurious KILLABLE
wakeup, was added by f06ac72e92 "cifs, freezer: add
wait_event_freezekillable and have cifs use it" to be used to
implement killable & freezable sleeps in network filesystems.

To prepare for reverting of 27920651fe, this patch reimplements
wait_event_freezekillable() using freezer_do_not_count/freezer_count()
so that it doesn't depend on the spurious KILLABLE wakeup.  This isn't
very nice but should do for now.

[tj: Refreshed patch to apply to linus/master and updated commit
    description on Rafael's request.]

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoUSB: Update last_busy time after autosuspend fails
Alan Stern [Thu, 3 Nov 2011 23:52:46 +0000 (00:52 +0100)]
USB: Update last_busy time after autosuspend fails

Originally, the runtime PM core would send an idle notification
whenever a suspend attempt failed.  The idle callback routine could
then schedule a delayed suspend for some time later.

However this behavior was changed by commit
f71648d73c1650b8b4aceb3856bebbde6daa3b86 (PM / Runtime: Remove idle
notification after failing suspend).  No notifications were sent, and
there was no clear mechanism to retry failed suspends.

This caused problems for the usbhid driver, because it fails
autosuspend attempts as long as a key is being held down.  A companion
patch changes the PM core's behavior, but we also need to change the
USB core.  In particular, this patch (as1493) updates the device's
last_busy time when an autosuspend fails, so that the PM core will
retry the autosuspend in the future when the delay time expires
again.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Henrik Rydberg <rydberg@euromail.se>
Cc: <stable@kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / Runtime: Automatically retry failed autosuspends
Alan Stern [Thu, 3 Nov 2011 22:39:18 +0000 (23:39 +0100)]
PM / Runtime: Automatically retry failed autosuspends

Originally, the runtime PM core would send an idle notification
whenever a suspend attempt failed.  The idle callback routine could
then schedule a delayed suspend for some time later.

However this behavior was changed by commit
f71648d73c1650b8b4aceb3856bebbde6daa3b86 (PM / Runtime: Remove idle
notification after failing suspend).  No notifications were sent, and
there was no clear mechanism to retry failed suspends.

This caused problems for the usbhid driver, because it fails
autosuspend attempts as long as a key is being held down.  Therefore
this patch (as1492) adds a mechanism for retrying failed
autosuspends.  If the callback routine updates the last_busy field so
that the next autosuspend expiration time is in the future, the
autosuspend will automatically be rescheduled.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Henrik Rydberg <rydberg@euromail.se>
Cc: <stable@kernel.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / QoS: Remove redundant check
Guennadi Liakhovetski [Thu, 3 Nov 2011 09:12:36 +0000 (10:12 +0100)]
PM / QoS: Remove redundant check

Remove an "if" check, that repeats an equivalent one 6 lines above.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / OPP: Fix build when CONFIG_PM_OPP is not set
Tony Lindgren [Thu, 3 Nov 2011 09:12:27 +0000 (10:12 +0100)]
PM / OPP: Fix build when CONFIG_PM_OPP is not set

Commit 03ca370fbf7b76d6d002380dbdc2cdc2319f9c80 (PM / OPP: Add
OPP availability change notifier) does not compile if CONFIG_PM_OPP
is not set:

arch/arm/plat-omap/omap-pm-noop.o: In function `opp_get_notifier':
include/linux/opp.h:103: multiple definition of `opp_get_notifier'
include/linux/opp.h:103: first defined here

Also fix incorrect comment.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / Runtime: Fix runtime accounting calculation error
venu byravarasu [Thu, 3 Nov 2011 09:12:14 +0000 (10:12 +0100)]
PM / Runtime: Fix runtime accounting calculation error

With delta type being int, its value is made zero
for all values of now > 0x80000000.
Hence fixing it.

Signed-off-by: venu byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / Sleep: Update freezer documentation
Srivatsa S. Bhat [Wed, 2 Nov 2011 23:59:52 +0000 (00:59 +0100)]
PM / Sleep: Update freezer documentation

This patch:
 * Substitutes some obsolete references to kernel/power/process.c by
   kernel/freezer.c.
 * Mentions kernel/freezer.c as being part of the "freezer" code along
   with the rest of the files.
 * Fixes a trivial typo.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / Sleep: Remove unused symbol 'suspend_cpu_hotplug'
Srivatsa S. Bhat [Wed, 2 Nov 2011 23:59:40 +0000 (00:59 +0100)]
PM / Sleep: Remove unused symbol 'suspend_cpu_hotplug'

Remove the suspend_cpu_hotplug declaration, which doesn't correspond
to an existing variable.

[rjw: Added the changelog.]

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / Sleep: Fix race between CPU hotplug and freezer
Srivatsa S. Bhat [Wed, 2 Nov 2011 23:59:25 +0000 (00:59 +0100)]
PM / Sleep: Fix race between CPU hotplug and freezer

The CPU hotplug notifications sent out by the _cpu_up() and _cpu_down()
functions depend on the value of the 'tasks_frozen' argument passed to them
(which indicates whether tasks have been frozen or not).
(Examples for such CPU hotplug notifications: CPU_ONLINE, CPU_ONLINE_FROZEN,
CPU_DEAD, CPU_DEAD_FROZEN).

Thus, it is essential that while the callbacks for those notifications are
running, the state of the system with respect to the tasks being frozen or
not remains unchanged, *throughout that duration*. Hence there is a need for
synchronizing the CPU hotplug code with the freezer subsystem.

Since the freezer is involved only in the Suspend/Hibernate call paths, this
patch hooks the CPU hotplug code to the suspend/hibernate notifiers
PM_[SUSPEND|HIBERNATE]_PREPARE and PM_POST_[SUSPEND|HIBERNATE] to prevent
the race between CPU hotplug and freezer, thus ensuring that CPU hotplug
notifications will always be run with the state of the system really being
what the notifications indicate, _throughout_ their execution time.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoACPI / PM: Add Sony VPCEB17FX to nonvs blacklist
Dave Jones [Wed, 2 Nov 2011 23:58:59 +0000 (00:58 +0100)]
ACPI / PM: Add Sony VPCEB17FX to nonvs blacklist

Another entry for the nonvs blacklist, as noted by a user in
https://bugzilla.redhat.com/show_bug.cgi?id=641789#c12

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Fri, 4 Nov 2011 21:14:34 +0000 (17:14 -0400)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless

12 years agoMerge branch 'for-linus' of git://github.com/cmetcalf-tilera/linux-tile
Linus Torvalds [Fri, 4 Nov 2011 19:33:34 +0000 (12:33 -0700)]
Merge branch 'for-linus' of git://github.com/cmetcalf-tilera/linux-tile

* 'for-linus' of git://github.com/cmetcalf-tilera/linux-tile:
  arch/tile: factor out <arch/opcode.h> header
  arch/tile: add the <arch> headers to the set of installed kernel headers
  arch/tile: avoid exporting a symbol no longer used by gcc
  arch/tile: avoid ISO namespace pollution with <asm/sigcontext.h>

12 years agoMerge branch 'nfs-for-3.2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Fri, 4 Nov 2011 19:27:43 +0000 (12:27 -0700)]
Merge branch 'nfs-for-3.2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

* 'nfs-for-3.2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (25 commits)
  nfs: set vs_hidden on nfs4_callback_version4 (try #2)
  pnfs-obj: Support for RAID5 read-4-write interface.
  pnfs-obj: move to ore 03: Remove old raid engine
  pnfs-obj: move to ore 02: move to ORE
  pnfs-obj: move to ore 01: ore_layout & ore_components
  pnfs-obj: Rename objlayout_io_state => objlayout_io_res
  pnfs-obj: Get rid of objlayout_{alloc,free}_io_state
  pnfs-obj: Return PNFS_NOT_ATTEMPTED in case of read/write_pagelist
  pnfs-obj: Remove redundant EOF from objlayout_io_state
  nfs: Remove unused variable from write.c
  nfs: Fix unused variable warning from file.c
  NFS: Remove no-op less-than-zero checks on unsigned variables.
  NFS: Clean up nfs4_xdr_dec_secinfo()
  NFS: Fix documenting comment for nfs_create_request()
  NFS4: fix cb_recallany decode error
  nfs4: serialize layoutcommit
  SUNRPC: remove rpcbind clients destruction on module cleanup
  SUNRPC: remove rpcbind clients creation during service registering
  NFSd: call svc rpcbind cleanup explicitly
  SUNRPC: cleanup service destruction
  ...

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Fri, 4 Nov 2011 19:14:11 +0000 (12:14 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/qib: Fix panic in RC error flushing logic
  IB/iser: DMA unmap TX bufs used for iSCSI/iSER headers
  IB/iser: Use separate buffers for the login request/response
  IB/mthca: Fix buddy->num_free allocation size

12 years agoDocumentation: drop as block elevator reference in switching-sched.txt
Wang Sheng-Hui [Fri, 4 Nov 2011 18:22:33 +0000 (11:22 -0700)]
Documentation: drop as block elevator reference in switching-sched.txt

Remove 'as' for as is no longer supported, and we can not use
'elevator=as' any more.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: fix leds-class.txt duplicated word
Bryan Wu [Fri, 4 Nov 2011 18:22:29 +0000 (11:22 -0700)]
Documentation: fix leds-class.txt duplicated word

Fix a typo (duplicated word) in Documentation/leds/leds-class.txt

Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Acked-by: Richard Purdie <rchard.purdie@linuxfoundation.org>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: Computone ip2 is orphaned
Marcos Paulo Souza [Fri, 4 Nov 2011 18:22:26 +0000 (11:22 -0700)]
Documentation: Computone ip2 is orphaned

Removed the email for support and fixes for orphaned ip2 driver.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: HFS is orphaned
Marcos Paulo de Souza [Fri, 4 Nov 2011 18:22:22 +0000 (11:22 -0700)]
Documentation: HFS is orphaned

Removed the reference of Roman Zippel, last maintainer, of orphaned
HFS filesystem.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: update CodingStyle use of braces
Antonio Ospite [Fri, 4 Nov 2011 18:22:19 +0000 (11:22 -0700)]
Documentation: update CodingStyle use of braces

After commit 38829dc9d7b4 ("Documentation/CodingStyle: flesh out if-else
examples") highlight that if _only_one_ branch of a conditional
statement is a single statement, then braces are to be used on both
branches.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: fix inotify source file paths
Marcos Paulo de Souza [Fri, 4 Nov 2011 18:22:14 +0000 (11:22 -0700)]
Documentation: fix inotify source file paths

Fixes the path to find the source files of the inotify subsystem.

Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: thinkpad-acpi grammo fixes
Kumar Appaiah [Fri, 4 Nov 2011 18:22:09 +0000 (11:22 -0700)]
Documentation: thinkpad-acpi grammo fixes

This adds minor grammatical fixes to the description of the keys in the
thinkpad-acpi documentation.

Signed-off-by: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation: update cgroups notes
Li Zefan [Fri, 4 Nov 2011 18:22:05 +0000 (11:22 -0700)]
Documentation: update cgroups notes

- ns cgroup has been removed.
- it's true moving a task to another cgroup can fail.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <paul@paulmenage.org>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Fri, 4 Nov 2011 18:46:34 +0000 (14:46 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem

12 years agomac80211: warn only once about not finding a rate
Johannes Berg [Fri, 4 Nov 2011 17:07:43 +0000 (18:07 +0100)]
mac80211: warn only once about not finding a rate

The warning really shouldn't happen, but until we
find the reason why it does don't spew it all the
time, just once is enough to know we've hit it.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branches 'iser', 'mthca' and 'qib' into for-next
Roland Dreier [Fri, 4 Nov 2011 16:36:04 +0000 (09:36 -0700)]
Merge branches 'iser', 'mthca' and 'qib' into for-next

12 years agoIB/qib: Fix panic in RC error flushing logic
Mike Marciniszyn [Fri, 4 Nov 2011 12:26:52 +0000 (08:26 -0400)]
IB/qib: Fix panic in RC error flushing logic

The following panic can occur when flushing a QP:

    RIP: 0010:[<ffffffffa0168e8b>]  [<ffffffffa0168e8b>] qib_send_complete+0x3b/0x190 [ib_qib]
    RSP: 0018:ffff8803cdc6fc90  EFLAGS: 00010046
    RAX: 0000000000000000 RBX: ffff8803d84ba000 RCX: 0000000000000000
    RDX: 0000000000000005 RSI: ffffc90015a53430 RDI: ffff8803d84ba000
    RBP: ffff8803cdc6fce0 R08: ffff8803cdc6fc90 R09: 0000000000000001
    R10: 00000000ffffffff R11: 0000000000000000 R12: ffff8803d84ba0c0
    R13: ffff8803d84ba5cc R14: 0000000000000800 R15: 0000000000000246
    FS:  0000000000000000(0000) GS:ffff880036600000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
    CR2: 0000000000000034 CR3: 00000003e44f9000 CR4: 00000000000406f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process qib/0 (pid: 1350, threadinfo ffff8803cdc6e000, task ffff88042728a100)
    Stack:
     53544c5553455201 0000000100000005 0000000000000000 ffff8803d84ba000
     0000000000000000 0000000000000000 0000000000000000 0000000000000000
     0000000000000000 0000000000000001 ffff8803cdc6fd30 ffffffffa0165d7a
    Call Trace:
     [<ffffffffa0165d7a>] qib_make_rc_req+0x36a/0xe80 [ib_qib]
     [<ffffffffa0165a10>] ?  qib_make_rc_req+0x0/0xe80 [ib_qib]
     [<ffffffffa01698b3>] qib_do_send+0xf3/0xb60 [ib_qib]
     [<ffffffff814db757>] ? thread_return+0x4e/0x777
     [<ffffffffa01697c0>] ? qib_do_send+0x0/0xb60 [ib_qib]
     [<ffffffff81088bf0>] worker_thread+0x170/0x2a0
     [<ffffffff8108e530>] ?  autoremove_wake_function+0x0/0x40
     [<ffffffff81088a80>] ? worker_thread+0x0/0x2a0
     [<ffffffff8108e1c6>] kthread+0x96/0xa0
     [<ffffffff8100c1ca>] child_rip+0xa/0x20
     [<ffffffff8108e130>] ? kthread+0x0/0xa0
     [<ffffffff8100c1c0>] ? child_rip+0x0/0x20
    RIP  [<ffffffffa0168e8b>] qib_send_complete+0x3b/0x190 [ib_qib]

The RC error state flush logic in qib_make_rc_req() could return all
of the acked wqes and potentially have emptied the queue.  It would
then unconditionally try return a flush completion via
qib_send_complete() for an invalid wqe, or worse a valid one that is
not queued. The panic results when the completion code tries to
maintain an MR reference count for a NULL MR.

This fix modifies logic to only send one completion per
qib_make_rc_req() call and changing the completion status from
IB_WC_SUCCESS to IB_WC_WR_FLUSH_ERR as the completions progress.

The outer loop will call as many times as necessary to flush the queue.

Reviewed-by: Ram Vepa <ram.vepa@qlogic.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoMerge branch 'process_vm' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux
Linus Torvalds [Fri, 4 Nov 2011 16:35:24 +0000 (09:35 -0700)]
Merge branch 'process_vm' of git://git./linux/kernel/git/aegl/linux

* 'process_vm' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  [IA64] Wire up cross memory attach syscalls

12 years agoIB/iser: DMA unmap TX bufs used for iSCSI/iSER headers
Or Gerlitz [Thu, 3 Nov 2011 22:21:27 +0000 (00:21 +0200)]
IB/iser: DMA unmap TX bufs used for iSCSI/iSER headers

The current driver never does DMA unmapping on these buffers.  Fix that
by adding DMA unmapping to the task cleanup callback, and DMA mapping to
the task init function (drop the headers_initialized micro-optimization).

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoIB/iser: Use separate buffers for the login request/response
Or Gerlitz [Thu, 3 Nov 2011 22:19:46 +0000 (00:19 +0200)]
IB/iser: Use separate buffers for the login request/response

The driver counted on the transactional nature of iSCSI login/text
flows and used the same buffer for both the request and the response.
We also went further and did DMA mapping only once, with
DMA_FROM_DEVICE, which violates the DMA mapping API.  Fix that by
using different buffers, one for requests and one for responses, and
use the correct DMA mapping direction for each.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoARM: mach-shmobile: ag5evm needs CONFIG_I2C
Guennadi Liakhovetski [Tue, 30 Aug 2011 16:19:13 +0000 (16:19 +0000)]
ARM: mach-shmobile: ag5evm needs CONFIG_I2C

ag5evm implements a backlight control, using an I2C controller, therefore
it needs CONFIG_I2C to fix this make failure

arch/arm/mach-shmobile/built-in.o: In function `lcd_on':
pfc-sh73a0.c:(.text+0x2334): undefined reference to `i2c_get_adapter'
pfc-sh73a0.c:(.text+0x2370): undefined reference to `i2c_transfer'

(ignore pfc-sh73a0.c) and to build successfully.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: sh73a0 and AG5EVM PINT support
Magnus Damm [Mon, 17 Oct 2011 09:00:52 +0000 (18:00 +0900)]
ARM: mach-shmobile: sh73a0 and AG5EVM PINT support

Support PINT on sh73a0 and AG5EVM using INTC PINT macros.

With this patch applied the AG5EVM ethernet is handled
through one of the chained sh73a0 PINT interrupt controllers.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: Add support for PINT though INTC macros
Magnus Damm [Mon, 17 Oct 2011 09:00:35 +0000 (18:00 +0900)]
ARM: mach-shmobile: Add support for PINT though INTC macros

Add a INTC_PINT() macro with various helper bits to allow SoCs
like sh73a0 to suppor the PINT hardware using regular INTC tables.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: SDHI0 GPIO hotplug for AG5EVM
Magnus Damm [Wed, 12 Oct 2011 07:21:50 +0000 (16:21 +0900)]
ARM: mach-shmobile: SDHI0 GPIO hotplug for AG5EVM

Implement GPIO hotplugging via TMIO_MMC_HAS_COLD_CD for
AG5EVM SDHI0. This is possible now when INTCA is used for
IRQ triggering on sh73a0. Without INTCA IRQ support we are
left with the GIC hardware block that does not support
dealing with active low interrupt sources.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: Use common INTC IRQ code on sh73a0
Magnus Damm [Wed, 12 Oct 2011 07:21:42 +0000 (16:21 +0900)]
ARM: mach-shmobile: Use common INTC IRQ code on sh73a0

Improve IRQ triggering support by making use of the macro
INTC_IRQ_PINS_32() for INTCA on sh73a0. Unfortunately it
is not as easy as just using the macro as-is, we need to
do mask and unmaks in the GIC but configure other bits
and ack in INTCA. Update GPIO IRQ mappings while at it.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: Use common INTC IRQ code on sh7372
Magnus Damm [Wed, 12 Oct 2011 07:21:34 +0000 (16:21 +0900)]
ARM: mach-shmobile: Use common INTC IRQ code on sh7372

Make use of INTC_IRQ_PINS_32() for INTCA on sh7372.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: Use common INTC IRQ code on sh7377
Magnus Damm [Wed, 12 Oct 2011 07:21:26 +0000 (16:21 +0900)]
ARM: mach-shmobile: Use common INTC IRQ code on sh7377

Make use of INTC_IRQ_PINS_32() for INTCA on sh7377.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: Use common INTC IRQ code on sh7367
Magnus Damm [Wed, 12 Oct 2011 07:21:16 +0000 (16:21 +0900)]
ARM: mach-shmobile: Use common INTC IRQ code on sh7367

Make use of INTC_IRQ_PINS_16() for INTCA on sh7367.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: sh73a0 GPIO IRQ support
Magnus Damm [Wed, 28 Sep 2011 07:55:45 +0000 (16:55 +0900)]
ARM: mach-shmobile: sh73a0 GPIO IRQ support

This patch adds support for sh73a0 GPIO IRQs by making use
of the PFC GPIO IRQ feature. Only IRQ pins are  supported
at this time. In the future when PINT interrupts also are
supported properly we can easily extend the table with such
information. Also, the sh73a0 is currently making use of
the GIC for external interrupt which is rather unflexible
when it comes to triggering configuration at this point.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: sh7372 ap4evb NOR Flash USB boot fix
Bastian Hecht [Tue, 27 Sep 2011 11:23:04 +0000 (13:23 +0200)]
ARM: sh7372 ap4evb NOR Flash USB boot fix

Always use CS0 shadow area for NOR flash instead of regular CS0
memory area on ap4evb.

When booting from CS0 NOR Flash the regular CS0 memory area is
available, but when booting via USB the MASK ROM gets mapped to
0x0 which gets in the way for the NOR Flash. Always using CS0
shadow area works well for both NOR Flash boot and USB boot.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: sh7372 Mackerel NOR Flash USB boot fix
Magnus Damm [Tue, 27 Sep 2011 09:29:31 +0000 (18:29 +0900)]
ARM: mach-shmobile: sh7372 Mackerel NOR Flash USB boot fix

Always use CS0 shadow area for NOR flash instead of regular CS0
memory area on Mackerel.

When booting from CS0 NOR Flash the regular CS0 memory area is
available, but when booting via USB the MASK ROM gets mapped to
0x0 which gets in the way for the NOR Flash. Always using CS0
shadow area works well for both NOR Flash boot and USB boot.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agosh: intc: Allow triggering on both edges for ARM SoCs
Magnus Damm [Wed, 12 Oct 2011 07:21:08 +0000 (16:21 +0900)]
sh: intc: Allow triggering on both edges for ARM SoCs

Enable IRQ_TYPE_EDGE_BOTH on all R/SH-Mobile ARM SoCs.
This hardware feature is supported by sh7367, sh7377,
sh7372 and sh73a0.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoARM: mach-shmobile: Break out INTC IRQ code
Magnus Damm [Wed, 12 Oct 2011 07:21:00 +0000 (16:21 +0900)]
ARM: mach-shmobile: Break out INTC IRQ code

Add INTC_IRQ_PINS_16() and INTC_IRQ_PINS_32() to mach/intc.h.
These macros define 16 or 32 external IRQ pins on a certain
memory base address. Can be used with INTCA or INTCS.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
12 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Fri, 4 Nov 2011 14:58:25 +0000 (07:58 -0700)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (144 commits)
  [media] saa7134.h: Suppress compiler warnings when CONFIG_VIDEO_SAA7134_RC is not set
  [media] it913x [VER 1.07] Support for single ITE 9135 devices
  [media] Support for Terratec G1
  [media] cx25821: off by one in cx25821_vidioc_s_input()
  [media] media: tea5764: reconcile Kconfig symbol and macro
  [media] omap_vout: Add poll() support
  [media] omap3isp: preview: Add crop support on the sink pad
  [media] omap3isp: preview: Rename min/max input/output sizes defines
  [media] omap3isp: preview: Remove horizontal averager support
  [media] omap3isp: Report the ISP revision through the media controller API
  [media] omap3isp: ccdc: remove redundant operation
  [media] omap3isp: Fix memory leaks in initialization error paths
  [media] omap3isp: Add missing mutex_destroy() calls
  [media] omap3isp: Move *_init_entities() functions to the init/cleanup section
  [media] omap3isp: Move media_entity_cleanup() from unregister() to cleanup()
  [media] MFC: Change MFC firmware binary name
  [media] vb2: add vb2_get_unmapped_area in vb2 core
  [media] v4l: Add v4l2 subdev driver for S5K6AAFX sensor
  [media] v4l: Add AUTO option for the V4L2_CID_POWER_LINE_FREQUENCY control
  [media] media: ov6650: stylistic improvements
  ...

12 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Fri, 4 Nov 2011 14:53:16 +0000 (07:53 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (w83627ehf) Add support for the W83627UHG
  hwmon: (w83627ehf) Clean up probe function
  hwmon: (w83627ehf) Properly report PECI and AMD-SI sensor types
  hwmon: Use i2c_smbus_{read,write}_word_swapped
  hwmon: (smsc47b397) Fix checkpatch errors
  hwmon: (lm90) Make code more readable
  hwmon: (lm90) Fix warnings
  hwmon: (ibmaem) Avoid repeated memory allocations
  hwmon: (ibmaem) Make instance initializations independent
  hwmon: (ibmaem) Fix error paths
  hwmon: (lm73) Make detection less problematic
  hwmon: Avoid building drivers for powerpc that read/write ISA addresses

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 4 Nov 2011 14:51:43 +0000 (07:51 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (24 commits)
  ALSA: hda/realtek - Skip invalid digital out pins
  ALSA: hda/sigmatel - Automatically retrieve digital I/O widgets
  ALSA: hda - Remove unused variables
  ALSA: hda/realtek - Don't create alt-stream for capture when unnecessary
  ALSA: hda - Add support for 92HD65 / 92HD66 family of codecs
  ALSA: hda - Disable power-widget control for IDT 92HD83/93 as default
  ALSA: hda - Check NO_PRESENCE pincfg default bit
  ASoC: Ensure we always delay for WM8962 FLL when starting from SYSCLK
  ASoC: Ensure the WM8962 oscillator and PLLs start up disabled
  ASoC: Ensure WM8962 PLL registers are reset
  ALSA: intel8x0 - Fix inclusion of kvm_para.h
  ALSA: hda_hwdep: Fix possible buffer overflow
  ASoC: Fix return value of wm5100_gpio_direction_out()
  ASoC: WM8904: Set `invert' bit for Capture Switch
  ASoC: Leave input audio data bit length settings untouched in wm8711_set_dai_fmt
  ASoC: wm8711: Fix wrong mask for setting input audio data bit length select
  ALSA: intel8x0: Improve performance in virtual environment
  ALSA: hdspm - Enable all firmware ranges for PCI MADI/AES cards
  ALSA: hdsp - Correct HDSP_VERSION_BIT constant, thus partly fixing RPM detection
  ALSA: hdspm - Fix MADI channel format in the status ioctl
  ...

12 years agoMerge branch 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Fri, 4 Nov 2011 14:49:29 +0000 (07:49 -0700)]
Merge branch 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6

* 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6:
  dt: add empty of_machine_is_compatible
  ahci: add DT binding for Calxeda AHCI controller
  dt/platform: minor cleanup
  dt: add empty of_alias_get_id() for non-dt builds

12 years agoMerge branch 'rmobile/kota2' into rmobile-latest
Paul Mundt [Fri, 4 Nov 2011 14:17:38 +0000 (23:17 +0900)]
Merge branch 'rmobile/kota2' into rmobile-latest

12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
Paul Mundt [Fri, 4 Nov 2011 14:15:29 +0000 (23:15 +0900)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux into rmobile-latest

12 years agonfs: set vs_hidden on nfs4_callback_version4 (try #2)
Jeff Layton [Fri, 4 Nov 2011 11:04:10 +0000 (07:04 -0400)]
nfs: set vs_hidden on nfs4_callback_version4 (try #2)

This service should not be registered with or unregistered from rpcbind.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agohwmon: (w83627ehf) Add support for the W83627UHG
Jean Delvare [Fri, 4 Nov 2011 11:00:48 +0000 (12:00 +0100)]
hwmon: (w83627ehf) Add support for the W83627UHG

This is essentially a stripped down version of the W83627DHG. Noticeable
difference is that it is still powered with +5V, as older models, even
though the ADC resolution is 8 mV as newer models have.

Thanks to Ulf Bruman (Saab Group) for doing all the testing.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (w83627ehf) Clean up probe function
Jean Delvare [Fri, 4 Nov 2011 11:00:47 +0000 (12:00 +0100)]
hwmon: (w83627ehf) Clean up probe function

The probe function has grown pretty large, I think it's time for some
cleanups, starting with these two simple ones:
* Move temp3/in6 check for the W83667HG later in the function, where
  it is done for all other chip types.
* Move temperature register setting to a separate function, to avoid
  code duplication.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (w83627ehf) Properly report PECI and AMD-SI sensor types
Jean Delvare [Fri, 4 Nov 2011 11:00:47 +0000 (12:00 +0100)]
hwmon: (w83627ehf) Properly report PECI and AMD-SI sensor types

When temperature sources are PECI or AMD-SI agents, it makes no sense
to report their type as diode or thermistor. Instead we must report
their digital nature.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: Use i2c_smbus_{read,write}_word_swapped
Jean Delvare [Fri, 4 Nov 2011 11:00:47 +0000 (12:00 +0100)]
hwmon: Use i2c_smbus_{read,write}_word_swapped

Make use of the new i2c_smbus_{read,write}_word_swapped functions.
This makes the driver code more compact and readable. It also ensures
proper error handling.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Guillaume Ligneul <guillaume.ligneul@gmail.com>
12 years agohwmon: (smsc47b397) Fix checkpatch errors
Jean Delvare [Fri, 4 Nov 2011 11:00:47 +0000 (12:00 +0100)]
hwmon: (smsc47b397) Fix checkpatch errors

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (lm90) Make code more readable
Jean Delvare [Fri, 4 Nov 2011 11:00:47 +0000 (12:00 +0100)]
hwmon: (lm90) Make code more readable

Clean up the code to make it more readable:
* Remove reg_ and new_ prefixes from variable names, they made the
  names longer, causing extra line breaks, while not adding much
  value.
* Introduce struct device dev* = &client->dev in two functions, to
  avoid repeating client->dev everywhere in these functions.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (lm90) Fix warnings
Jean Delvare [Fri, 4 Nov 2011 11:00:46 +0000 (12:00 +0100)]
hwmon: (lm90) Fix warnings

With some configuration option combinations, we get the following
warnings:

drivers/hwmon/lm90.c: In function 'lm90_detect':
drivers/hwmon/lm90.c:1114: warning: 'chip_id' may be used uninitialized
in this function
drivers/hwmon/lm90.c:1114: warning: 'reg_config1' may be used
uninitialized in this function
drivers/hwmon/lm90.c:1114: warning: 'reg_convrate' may be used
uninitialized in this function
drivers/hwmon/lm90.c:1187: warning: 'reg_emerg2' may be used
uninitialized in this function
drivers/hwmon/lm90.c:1187: warning: 'reg_status2' may be used
uninitialized in this function

We can solve these easily by reading the register values first and
checking for errors later. These errors should be very rare, even in
the case of failed detection, so this change has no impact on
performance. And this makes checkpatch.pl happier.

Reported-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (ibmaem) Avoid repeated memory allocations
Jean Delvare [Fri, 4 Nov 2011 11:00:46 +0000 (12:00 +0100)]
hwmon: (ibmaem) Avoid repeated memory allocations

Preallocate a buffer for the response to sensor reads, and reuse it
for each read instead of allocating a new one each time. This should
be faster and should also avoid memory fragmentation.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (ibmaem) Make instance initializations independent
Jean Delvare [Fri, 4 Nov 2011 11:00:46 +0000 (12:00 +0100)]
hwmon: (ibmaem) Make instance initializations independent

There is no good reason that I can see why the failure to initialize
one instance should prevent other instances from being initialized.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (ibmaem) Fix error paths
Jean Delvare [Fri, 4 Nov 2011 11:00:46 +0000 (12:00 +0100)]
hwmon: (ibmaem) Fix error paths

I am under the impression that error paths in functions
aem_init_aem1_inst() and aem_init_aem2_inst() are incorrect. In
several cases, the function returns 0 on error, which I suspect is
not intended. Fix this by properly tracking error codes.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (lm73) Make detection less problematic
Jean Delvare [Fri, 4 Nov 2011 11:00:46 +0000 (12:00 +0100)]
hwmon: (lm73) Make detection less problematic

Word reads can cause trouble with some I2C devices, so do as much
detection as we can using only byte reads, and only use a word read in
the end to confirm the positive match. Also properly handle read
errors.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Robert Casanova <robertcasanova@nanometrics.ca>
12 years agohwmon: Avoid building drivers for powerpc that read/write ISA addresses
Dean Nelson [Fri, 4 Nov 2011 11:00:45 +0000 (12:00 +0100)]
hwmon: Avoid building drivers for powerpc that read/write ISA addresses

A modprobe of hwmon drivers that read/write ISA addresses on a powerpc results
in a kernel Oops. These reads/writes are being done via the inb()/in_8() and
outb()/out_8() macros.

Prevent these drivers from being built for powerpc.

Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agotarget: use ->exectute_task for all CDB emulation
Christoph Hellwig [Thu, 3 Nov 2011 21:50:45 +0000 (17:50 -0400)]
target: use ->exectute_task for all CDB emulation

Instead of calling into transport_emulate_control_cdb from
__transport_execute_tasks for some CDBs always set up ->exectute_tasks
in the command sequence and use it uniformly.

(nab: Add default passthrough break for SERVICE_ACTION_IN)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
12 years agotarget: remove SCF_EMULATE_CDB_ASYNC
Christoph Hellwig [Thu, 3 Nov 2011 21:50:44 +0000 (17:50 -0400)]
target: remove SCF_EMULATE_CDB_ASYNC

All ->execute_task instances now need to complete the I/O explicitly,
which can either happen synchronously or asynchronously.

Note that a lot of the CDB emulations appear to return success even if
some lowlevel operations failed.  Given that this is an existing issue
this patch doesn't change that fact.

(nab: Adding missing switch breaks in PR-IN + PR_OUT)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
12 years agodrm/radeon/kms: consolidate GART code, fix segfault after GPU lockup V2
Jerome Glisse [Thu, 3 Nov 2011 15:16:49 +0000 (11:16 -0400)]
drm/radeon/kms: consolidate GART code, fix segfault after GPU lockup V2

After GPU lockup VRAM gart table is unpinned and thus its pointer
becomes unvalid. This patch move the unpin code to a common helper
function and set pointer to NULL so that page update code can check
if it should update GPU page table or not. That way bo still bound
to GART can be unbound (pci_unmap_page for all there page) properly
while there is no need to update the GPU page table.

V2 move the test for null gart out of the loop, small optimization

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agotarget: refactor transport_emulate_control_cdb
Christoph Hellwig [Thu, 3 Nov 2011 21:50:43 +0000 (17:50 -0400)]
target: refactor transport_emulate_control_cdb

Encapsulate each CDB emulation into a function of its own, to prepare
setting ->exectute_task to these routines.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
12 years agotarget: pass the se_task to the CDB emulation callback
Christoph Hellwig [Thu, 3 Nov 2011 21:50:42 +0000 (17:50 -0400)]
target: pass the se_task to the CDB emulation callback

We want to be able to handle all CDBs through it and remove hacks like
always using the first task in a CDB in target_report_luns.

Also rename the callback to ->execute_task to better describe its use.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
12 years agotarget: split core_scsi3_emulate_pr
Christoph Hellwig [Thu, 3 Nov 2011 21:50:41 +0000 (17:50 -0400)]
target: split core_scsi3_emulate_pr

Split core_scsi2_emulate_crh into one routine each for the
PERSISTENT_RESERVE_IN and PERSISTENT_RESERVE_OUT side.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
12 years agotarget: split core_scsi2_emulate_crh
Christoph Hellwig [Thu, 3 Nov 2011 21:50:40 +0000 (17:50 -0400)]
target: split core_scsi2_emulate_crh

Split core_scsi2_emulate_crh into one routine each for the reserve and
release side.  The common code now is in a helper called by both
routines.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
12 years agotarget: Add generic active I/O shutdown logic
Nicholas Bellinger [Thu, 3 Nov 2011 04:52:08 +0000 (21:52 -0700)]
target: Add generic active I/O shutdown logic

This patch adds the initial pieces of generic active I/O shutdown logic.
This is intended to be a 'opt-in' feature for fabric modules that
includes the following functions to provide a mechinism for fabric
modules to track se_cmd via se_session->sess_cmd_list:

*) target_get_sess_cmd() - Add se_cmd to sess->sess_cmd_list, called
   from fabric module incoming I/O path.
*) target_put_sess_cmd() - Check for completion or drop se_cmd from
   ->sess_cmd_list
*) target_splice_sess_cmd_list() - Splice active I/O list from
   ->sess_cmd_list to ->sess_wait_list, can called with HW fabric
   lock held.
*) target_wait_for_sess_cmds() - Walk ->sess_wait_list waiting on
   individual ->cmd_wait_comp.  Optional transport_wait_for_tasks()
   call.

target_splice_sess_cmd_list() is allowed to be called under HW fabric
lock, and performs the splice into se_sess->sess_wait_list and set
se_cmd->cmd_wait_set.  Then target_wait_for_sess_cmds() walks the list
waiting for individual target_put_sess_cmd() fabric callbacks to
complete.

It also adds TFO->check_release_cmd() to split the completion and memory
release calls, where a fabric module uses target_put_sess_cmd() to check
for I/O completion during session shutdown.  This is currently pushed out
into fabric modules as current fabric code may sleep here waiting for
TFO->check_stop_free() to complete in main response path, and because
target_wait_for_sess_cmds() calling TFO->release_cmd() to free fabric
descriptor memory directly.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
12 years agoCIFS: Cleanup byte-range locking code style
Pavel Shilovsky [Sat, 29 Oct 2011 13:17:59 +0000 (17:17 +0400)]
CIFS: Cleanup byte-range locking code style

Reorder parms of cifs_lock_init, trivially simplify getlk code and
remove extra {} in cifs_lock_add_if.

Cc: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jeff Layton <jlayton@samba.org>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
12 years agoCIFS: Simplify setlk error handling for mandatory locking
Pavel Shilovsky [Sat, 29 Oct 2011 13:17:58 +0000 (17:17 +0400)]
CIFS: Simplify setlk error handling for mandatory locking

Now we allocate a lock structure at first, then we request to the server
and save the lock if server returned OK though void function - it prevents
the situation when we locked a file on the server and then return -ENOMEM
from setlk.

Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Acked-by: Jeff Layton <jlayton@samba.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
12 years agodt: add empty of_machine_is_compatible
Stephen Warren [Tue, 25 Oct 2011 12:01:26 +0000 (14:01 +0200)]
dt: add empty of_machine_is_compatible

The patch adds an empty function for non-dt build, so that
drivers migrating to dt can save some '#ifdef CONFIG_OF'.

v3: New patch

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoMerge git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 4 Nov 2011 04:07:58 +0000 (21:07 -0700)]
Merge git://git.samba.org/sfrench/cifs-2.6

* git://git.samba.org/sfrench/cifs-2.6:
  cifs: Assume passwords are encoded according to iocharset (try #2)
  CIFS: Fix the VFS brlock cache usage in posix locking case
  [CIFS] Update cifs version to 1.76
  CIFS: Remove extra mutex_unlock in cifs_lock_add_if

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 4 Nov 2011 04:05:43 +0000 (21:05 -0700)]
Merge git://git./linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (45 commits)
  be2net: Add detect UE feature for Lancer
  be2net: Prevent CQ full condition for Lancer
  be2net: Fix disabling multicast promiscous mode
  be2net: Fix endian issue in RX filter command
  af_packet: de-inline some helper functions
  MAINTAINERS: Add can-gw include to maintained files
  net: Add back alignment for size for __alloc_skb
  net: add missing bh_unlock_sock() calls
  l2tp: fix race in l2tp_recv_dequeue()
  ixgbevf: Update release version
  ixgbe: DCB, return max for IEEE traffic classes
  ixgbe: fix reading of the buffer returned by the firmware
  ixgbe: Fix compiler warnings
  ixgbe: fix smatch splat due to missing NULL check
  ixgbe: fix disabling of Tx laser at probe
  ixgbe: Fix link issues caused by a reset while interface is down
  igb: Fix for I347AT4 PHY cable length unit detection
  e100: make sure vlan support isn't advertised on old adapters
  e1000e: demote a debugging WARN to a debug log message
  net: fix typo in drivers/net/ethernet/xilinx/ll_temac_main.c
  ...

12 years agoMerge branch 'for-grant' of git://sources.calxeda.com/kernel/linux into devicetree...
Grant Likely [Fri, 4 Nov 2011 03:32:20 +0000 (23:32 -0400)]
Merge branch 'for-grant' of git://sources.calxeda.com/kernel/linux into devicetree/merge

12 years agobe2net: Add detect UE feature for Lancer
Padmanabh Ratnakar [Thu, 3 Nov 2011 01:50:08 +0000 (01:50 +0000)]
be2net: Add detect UE feature for Lancer

Add code to detect UE in case of Lancer.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Prevent CQ full condition for Lancer
Padmanabh Ratnakar [Thu, 3 Nov 2011 01:49:55 +0000 (01:49 +0000)]
be2net: Prevent CQ full condition for Lancer

Indicate to HW that the CQ is cleaned up before posting new RX buffers.
This prevents the HW to go into CQ full error condition.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix disabling multicast promiscous mode
Padmanabh Ratnakar [Thu, 3 Nov 2011 01:49:27 +0000 (01:49 +0000)]
be2net: Fix disabling multicast promiscous mode

If user tries to disable multicast promiscous mode, the adapter remains
in this mode as resetting the multicast promiscous mode was missing
in RX filter command. Fixed this.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix endian issue in RX filter command
Padmanabh Ratnakar [Thu, 3 Nov 2011 01:49:13 +0000 (01:49 +0000)]
be2net: Fix endian issue in RX filter command

Use cpu_to_le32() for mcast_num field in RX filter command as this
field is of type u32.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net
David S. Miller [Fri, 4 Nov 2011 01:52:51 +0000 (21:52 -0400)]
Merge git://git./linux/kernel/git/jkirsher/net

12 years agoIB/mthca: Fix buddy->num_free allocation size
Roland Dreier [Fri, 4 Nov 2011 00:48:25 +0000 (17:48 -0700)]
IB/mthca: Fix buddy->num_free allocation size

The num_free field of mthca_buddy has a type of array of unsigned int
while it was allocated as an array of pointers.  On 64-bit platforms
this allocates twice more than required.  Fix this by allocating the
correct size for the type.

This is the same bug just fixed in mlx4 by Eli Cohen <eli@mellanox.co.il>.

Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoaf_packet: de-inline some helper functions
Olof Johansson [Wed, 2 Nov 2011 11:00:49 +0000 (11:00 +0000)]
af_packet: de-inline some helper functions

This popped some compiler errors due to mismatched prototypes. Just
remove most manual inlines, the compiler should be able to figure out
what makes sense to inline and not.

net/packet/af_packet.c:252: warning: 'prb_curr_blk_in_use' declared inline after being called
net/packet/af_packet.c:252: warning: previous declaration of 'prb_curr_blk_in_use' was here
net/packet/af_packet.c:258: warning: 'prb_queue_frozen' declared inline after being called
net/packet/af_packet.c:258: warning: previous declaration of 'prb_queue_frozen' was here
net/packet/af_packet.c:248: warning: 'packet_previous_frame' declared inline after being called
net/packet/af_packet.c:248: warning: previous declaration of 'packet_previous_frame' was here
net/packet/af_packet.c:251: warning: 'packet_increment_head' declared inline after being called
net/packet/af_packet.c:251: warning: previous declaration of 'packet_increment_head' was here

Signed-off-by: Olof Johansson <olof@lixom.net>
Cc: Chetan Loke <loke.chetan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMAINTAINERS: Add can-gw include to maintained files
Oliver Hartkopp [Wed, 2 Nov 2011 10:55:13 +0000 (10:55 +0000)]
MAINTAINERS: Add can-gw include to maintained files

Commit c1aabdf379bc2feeb0df7057ed5bad96f492133e (can-gw: add netlink based
CAN routing) added a new include file that's neither referenced by any of
the CAN maintainers.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Add back alignment for size for __alloc_skb
Tony Lindgren [Wed, 2 Nov 2011 13:40:28 +0000 (13:40 +0000)]
net: Add back alignment for size for __alloc_skb

Commit 87fb4b7b533073eeeaed0b6bf7c2328995f6c075 (net: more
accurate skb truesize) changed the alignment of size. This
can cause problems at least on some machines with NFS root:

Unhandled fault: alignment exception (0x801) at 0xc183a43a
Internal error: : 801 [#1] PREEMPT
Modules linked in:
CPU: 0    Not tainted  (3.1.0-08784-g5eeee4a #733)
pc : [<c02fbba0>]    lr : [<c02fbb9c>]    psr: 60000013
sp : c180fef8  ip : 00000000  fp : c181f580
r10: 00000000  r9 : c044b28c  r8 : 00000001
r7 : c183a3a0  r6 : c1835be0  r5 : c183a412  r4 : 000001f2
r3 : 00000000  r2 : 00000000  r1 : ffffffe6  r0 : c183a43a
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005317f  Table: 10004000  DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc180e270)
Stack: (0xc180fef8 to 0xc1810000)
fee0:                                                       00000024 00000000
ff00: 00000000 c183b9c0 c183b8e0 c044b28c c0507ccc c019dfc4 c180ff2c c0503cf8
ff20: c180ff4c c180ff4c 00000000 c1835420 c182c740 c18349c0 c05233c0 00000000
ff40: 00000000 c00e6bb8 c180e000 00000000 c04dd82c c0507e7c c050cc18 c183b9c0
ff60: c05233c0 00000000 00000000 c01f34f4 c0430d70 c019d364 c04dd898 c04dd898
ff80: c04dd82c c0507e7c c180e000 00000000 c04c584c c01f4918 c04dd898 c04dd82c
ffa0: c04ddd28 c180e000 00000000 c0008758 c181fa60 3231d82c 00000037 00000000
ffc0: 00000000 c04dd898 c04dd82c c04ddd28 00000013 00000000 00000000 00000000
ffe0: 00000000 c04b2224 00000000 c04b21a0 c001056c c001056c 00000000 00000000
Function entered at [<c02fbba0>] from [<c019dfc4>]
Function entered at [<c019dfc4>] from [<c01f34f4>]
Function entered at [<c01f34f4>] from [<c01f4918>]
Function entered at [<c01f4918>] from [<c0008758>]
Function entered at [<c0008758>] from [<c04b2224>]
Function entered at [<c04b2224>] from [<c001056c>]
Code: e1a00005 e3a01028 ebfa7cb0 e35a0000 (e5858028)

Here PC is at __alloc_skb and &shinfo->dataref is unaligned because
skb->end can be unaligned without this patch.

As explained by Eric Dumazet <eric.dumazet@gmail.com>, this happens
only with SLOB, and not with SLAB or SLUB:

* Eric Dumazet <eric.dumazet@gmail.com> [111102 15:56]:
>
> Your patch is absolutely needed, I completely forgot about SLOB :(
>
> since, kmalloc(386) on SLOB gives exactly ksize=386 bytes, not nearest
> power of two.
>
> [   60.305763] malloc(size=385)->ffff880112c11e38 ksize=386 -> nsize=2
> [   60.305921] malloc(size=385)->ffff88007c92ce28 ksize=386 -> nsize=2
> [   60.306898] malloc(size=656)->ffff88007c44ad28 ksize=656 -> nsize=272
> [   60.325385] malloc(size=656)->ffff88007c575868 ksize=656 -> nsize=272
> [   60.325531] malloc(size=656)->ffff88011c777230 ksize=656 -> nsize=272
> [   60.325701] malloc(size=656)->ffff880114011008 ksize=656 -> nsize=272
> [   60.346716] malloc(size=385)->ffff880114142008 ksize=386 -> nsize=2
> [   60.346900] malloc(size=385)->ffff88011c777690 ksize=386 -> nsize=2

Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: add missing bh_unlock_sock() calls
Eric Dumazet [Wed, 2 Nov 2011 12:42:56 +0000 (12:42 +0000)]
net: add missing bh_unlock_sock() calls

Simon Kirby reported lockdep warnings and following messages :

[104661.897577] huh, entered softirq 3 NET_RX ffffffff81613740
preempt_count 00000101, exited with 00000102?

[104661.923653] huh, entered softirq 3 NET_RX ffffffff81613740
preempt_count 00000101, exited with 00000102?

Problem comes from commit 0e734419
(ipv4: Use inet_csk_route_child_sock() in DCCP and TCP.)

If inet_csk_route_child_sock() returns NULL, we should release socket
lock before freeing it.

Another lock imbalance exists if __inet_inherit_port() returns an error
since commit 093d282321da ( tproxy: fix hash locking issue when using
port redirection in __inet_inherit_port()) a backport is also needed for
>= 2.6.37 kernels.

Reported-by: Simon Kirby <sim@hostway.ca>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Balazs Scheidler <bazsi@balabit.hu>
CC: KOVACS Krisztian <hidden@balabit.hu>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Simon Kirby <sim@hostway.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agol2tp: fix race in l2tp_recv_dequeue()
Eric Dumazet [Wed, 2 Nov 2011 22:47:44 +0000 (22:47 +0000)]
l2tp: fix race in l2tp_recv_dequeue()

Misha Labjuk reported panics occurring in l2tp_recv_dequeue()

If we release reorder_q.lock, we must not keep a dangling pointer (tmp),
since another thread could manipulate reorder_q.

Instead we must restart the scan at beginning of list.

Reported-by: Misha Labjuk <spiked.yar@gmail.com>
Tested-by: Misha Labjuk <spiked.yar@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>