Commit Graph

334886 Commits

Author SHA1 Message Date
Bjørn Mork 1452df6f1b USB: option: blacklist net interface on ZTE devices
Based on information from the ZTE Windows drivers.

Cc: <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-18 08:27:20 -07:00
Greg Kroah-Hartman 6b7ced68f3 usb: fixes for v3.7-rc2
Here's the first set of fixes for v3.7-rc cycle.
 
 DesignWare Core USB3 Driver (dwc3) got two fixes. The first one fixes a long
 standing bug which would keep endpoint with BUSY flag set forever if we cancel
 a transfer which has already been started by the controller. The second fix
 will just switch PHYs back off when DWC3 driver is removed.
 
 MUSB fixed a bug which would cause a Kernel Oops at least on AM3517 when
 removing a device. For some reason that particular device can fall into a
 situation where you have both Disconnect and Endpoint IRQs happen
 simultaneously (have both bits set in IRQ_STATUS register) and, because
 Disconnect Interrupt is handled before Endpoint Interrupts, we would try to
 transfer data over a disconnected device, thus generating a kernel oops.
 
 Renensas' USB DRD driver got two fixes which are a) fixing an off-by-one bug on
 the pipe iterator implementation and b) fixing Interrupt Status Clear procedure
 in order to properly clear a single Interrupt event without clearing (and
 masking) other events we didn't handle yet.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQfTjDAAoJEIaOsuA1yqREB4cQAJRCe193d6GjuIeXKuZoMYPI
 0+dQs080fLzLTraQMVdqc84VUj+8/n9ThA7I89GivziQIwbx+hMjhoebcvteC6P/
 sn7RsWUTxVYrusXf2sE4bSCzvU8SPM/8HfW37oahFJLK2omcaiFSX/7Kpb6KdXPc
 fh92/heQIlTqU0kSgNYzxZ/hPFWwqAcMMX97K4Dcsg14jD65tC0NPSXeRyRNETPY
 Sn0Sarv7xR+swQ72u+Wu27En0GvT6e9Y58bNxHGL5lMgbDGLOnEyZf2BVowbYBpQ
 jXp8P31VRDl/VkPWFft6bLmNjdacX0Hftkad2a4QlB3lyKBxelAvrTS5wkSBT0OM
 lnkgk/j7k31jhI3+5QzxZpTOTZFrprkMKfEncrH6ay/zbO8K1mFP2jmaBN33pBji
 06aCoL83Y+u1ditAUGySYg1eTSEtMXHL8cKInf+DcMypP88RekRNUNFUJKF2rLDw
 TZoT2cE+MyMXwNlVM9TxCuHe3MU2C5YEyNSLtlKSI4RSgFinS5u7aeXHn6VCSByO
 cvj5Sd8kqqXc4BMHWLxB5o09svSOpwaC2CZ5vf7dnbj+QXckPqL+eYOJIcQI0clo
 rHXKI36YUlxSmhal3hr4eN5hHbab5kPqYIEYH+D2lisz4mGq0ODazxRQsaKo2cfr
 r9NFM8bKwKBJ2j97lG4Y
 =IlgT
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

usb: fixes for v3.7-rc2

Here's the first set of fixes for v3.7-rc cycle.

DesignWare Core USB3 Driver (dwc3) got two fixes. The first one fixes a long
standing bug which would keep endpoint with BUSY flag set forever if we cancel
a transfer which has already been started by the controller. The second fix
will just switch PHYs back off when DWC3 driver is removed.

MUSB fixed a bug which would cause a Kernel Oops at least on AM3517 when
removing a device. For some reason that particular device can fall into a
situation where you have both Disconnect and Endpoint IRQs happen
simultaneously (have both bits set in IRQ_STATUS register) and, because
Disconnect Interrupt is handled before Endpoint Interrupts, we would try to
transfer data over a disconnected device, thus generating a kernel oops.

Renensas' USB DRD driver got two fixes which are a) fixing an off-by-one bug on
the pipe iterator implementation and b) fixing Interrupt Status Clear procedure
in order to properly clear a single Interrupt event without clearing (and
masking) other events we didn't handle yet.
2012-10-18 08:14:10 -07:00
Alexis R. Cortes 470809741a usb: host: xhci: New system added for Compliance Mode Patch on SN65LVPE502CP
This minor change adds a new system to which the "Fix Compliance Mode
on SN65LVPE502CP Hardware" patch has to be applied also.

System added:
Vendor: Hewlett-Packard. System Model: Z1

Signed-off-by: Alexis R. Cortes <alexis.cortes@ti.com>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-18 08:13:04 -07:00
Johan Hovold 5d8c61bc28 USB: io_ti: fix sysfs-attribute creation
Make sure port data is initialised before creating sysfs attributes to
avoid a race.

A recent patch ("USB: io_ti: fix port-data memory leak") got the
sysfs-attribute creation and port-data initialisation ordering wrong.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-18 08:08:47 -07:00
Johan Hovold 0978c94999 USB: iuu_phoenix: fix sysfs-attribute creation
Make sure sysfs attributes are created at port probe.

A recent patch ("USB: iuu_phoenix: fix port-data memory leak") removed
the sysfs-attribute creation by mistake.

Reported-by: Yuanhan Liu <yuanhan.liu@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-18 08:08:47 -07:00
jerin jacob 0cc40dac86 MIPS: CMP: Fix physical core number calculation logic
The CPUNum Field in EBase register is 10bit wide, so after 1 bit right
shift, the mask value should be 0x1ff.

Signed-off-by: jerin jacob <jerinjacobk@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4420/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-10-18 11:45:41 +02:00
Olof Johansson b55a7a5fbf Depends:
- Based on v3.7-rc1
 
 Adds:
  - missing break;s from converting if{}s to switch{}
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJQfu6DAAoJEAi3KVZQDZAe+UcIAIzjCYanLNeL35Y4CUB/sT0a
 JzGm39H2GCrDPQz1Wuv1paApfXAB6Fia8o2NjF6BZOsWXDayIGH/4H0qFRGZrQ+2
 p4NADdg3Lk5uL+Bn9kc0cyFiNIP1FktkUcleZSS2dQAZ/BY5EMj+urlttN5gSt5J
 8Aj6txYleMgEKqxdtXHiJXIregia6qaRM6uqEqF9ov/La9tLfBHZgjOJ1rGg6K6f
 TaUrgOMKFzn8fcp9NjXEuaHLazUM/x2QarqdSje+qoZpj+9jB4Su4bQdpblUw2TB
 YPecxQsD7hAjZmDzzTzvSsQq6ZT0xKWyqRJNcLO5caSY1lNxAm4v76anb697HSo=
 =3Nqp
 -----END PGP SIGNATURE-----

Merge tag 'mvebu_gpio_fixes_for_v3.7' of git://git.infradead.org/users/jcooper/linux into fixes

From Jason Cooper:
 - missing break;s from converting if{}s to switch{}

* tag 'mvebu_gpio_fixes_for_v3.7' of git://git.infradead.org/users/jcooper/linux:
  gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
2012-10-17 17:13:24 -07:00
Olof Johansson 327f81c455 Depends:
- Based against v3.7-rc1
  - Latest changes to arch/arm/mm/cache-tauros2.c
     c2b7e05 ARM: cache: add dt support for tauros2 cache
 
 Misc. fixes for latest changes to mach-dove/
 Fixes build breakage for mach-dove
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJQfutwAAoJEAi3KVZQDZAeJlYH/2n8rEqGCrZuU16XVl3Hwc5q
 mUkF0PexHDnGGNrgfOEAIaouG3rCTVVdj+NTqnz3gK8jaJHF06tfhpwZaxymDFzW
 m4Lt45IuDvU5jEuCBm1IDHWHLro/73YepZJJRt9yAwI1DdWAhUBYLS8cd7fIoLAJ
 th0TI7PObmHRVlY2mS+ByuU5wnqV5mJMMPN6oU4RzO91rNuhoQRm8WvjzEs+tSfU
 GluD05p/bm3dL9Aq6146h80CZn3W4SVIKeS2l/GdQV6bqaIUvsp0F3xfzggcrcLF
 rZxOom72BgnEzA1enu+adJwKY8dHxOAZ4Iuf4HUXI5DKVfVCOrmJmWfp0mS8oyc=
 =RP8E
 -----END PGP SIGNATURE-----

Merge tag 'mvebu_dove_late_fixes_for_v3.7' of git://git.infradead.org/users/jcooper/linux into fixes

From Jason Cooper:

Misc. fixes for latest changes to mach-dove/
Fixes build breakage for mach-dove

* tag 'mvebu_dove_late_fixes_for_v3.7' of git://git.infradead.org/users/jcooper/linux:
  ARM: dove: Add crypto engine to DT
  ARM: dove: Remove watchdog from DT
  ARM: dove: Restructure SoC device tree descriptor
  ARM: dove: Fix clock names of sata and gbe
  ARM: dove: Fix tauros2 device tree init
  ARM: dove: Add pcie clock support
2012-10-17 17:09:37 -07:00
Olof Johansson b5beb20d03 A boot problem fix for am33xx beaglebone caused by GPMC,
a regression fix for local timer, and a clockdomain locking fix.
 Also few minor fixes for boot time and sparse warnings.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQftwiAAoJEBvUPslcq6Vz0nAQANzNA5Ek5QOE3h77u+fUeYr2
 +zCltDpJdv5ICTYPTbHeckrnaVqK+0udV/Z98iJ4jlraslfAwaIdIx9WDXc+VVic
 grBhROiHx6OsqK0+hpkPM75RiYNJsVBzQ1BY5hdvJwVTiu7GnM+5KcKKPGEr52QA
 ugZmweaJZ5/8flqJKzmVkmYA0EtKcwBEM3YUvYHhIZDol96ec9LX2FT1bUo33duz
 fRq0uZvYgpSSVCiWedt74rzc4oYddMtIiYeQLLTz4bxsMjjgJT1zTEOlJ8TM5Ijl
 XGdwoC9pBhM6vjCGcS2tyUrA3483LvT8ngL8SX3HkrkKus2sdMEtmotskB5xSGSQ
 al9kMBu9EbJE/1I6AG15pUhP6SB+AiRwFOrBZbaavVbeA9b+KykxuYAUyhj/pEQj
 AaC+u46QlhqT4LX2sQPEhosJLRMNucFfs/dkoLM451YzcSA4SEDbHcoxMJMEqpNo
 iLzAuZJygGJlMqJ1OvLNTs86e+3rwZ0jS2T/7M6TUhjoiyUVXPIJooredlq+DTGT
 g6/sQfpqXqcl99a3snzvnS0VjmfSpErg31TD2hPBmmSCG0cw/24vDDHrDACKazzF
 bcCU/2kEfIH/IOKdSvHmIAlhGIFu6aj2HzxTyoOBdH8DMm44pGzasabZ/m9hBU8i
 AFJh28CYM2++pmHmkUF9
 =4meh
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.7-rc1/fixes-take5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren:

A boot problem fix for am33xx beaglebone caused by GPMC,
a regression fix for local timer, and a clockdomain locking fix.
Also few minor fixes for boot time and sparse warnings.

* tag 'omap-for-v3.7-rc1/fixes-take5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory
  ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable
  ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message
  ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
  ARM: OMAP: resolve sparse warning concerning debug_card_init()
  ARM: OMAP4: Fix twd_local_timer_register regression
2012-10-17 17:05:25 -07:00
Olof Johansson b08d48414e ARM: tegra: fixes for 3.7-rc2
This branch contains a couple small fixes for Tegra for 3.7.
 
 * A fix for another clock rate calculation overflow
 * A revert of a change that removed the "timer" clock on Tegra, coupled
   with a fix for the confusing symbol name clash that triggered it.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQfzn3AAoJEMzrak5tbycxAOEQAIWu3M+9SeKD68QE3yVSuyBL
 zKAQc5/aZINZxVpR54d8ywIJ7XlLkYatYvniv3x9tyiQ9VZ9b+G63NGHyolAFEjE
 4wOWpJ0UmKdEIkJIGTqiFoAifzSjRaoSZcB7Mu+HpY+COKcYeey6riPqNo8KtNTp
 u01qUg1iTwLiNHq79A/4LGs0XcVLDnsVK3xxuNYSeCGBRHXaAYeJgk6BmUJ6WMKv
 0lKdlGOQN5qKcwvJUkP6fqigcmAJ12MD1MLEDOAPh230h7tUzPLOqydcqPQG6E7M
 zQyiRzJBqxO/tbEkc3ZPaPAjgRARlU92PSqIcg4XTnr7B+TmBkgsfUS7L8n+1lXx
 UvPh4cmfj9QAjelwZkxqYU6AtKsLRXUijGfV/BWaHoUvfd/9Sz3VlL5octkLrKfl
 EzXJ7fG4nX9DRoszAEGAHl9Pv60bcdg0lMiHbY6Ot+AJPLccZqz9MkRTs/GLBhZq
 btxq3zi66pw1SX8MVH2Yn5fO6ZxXtOz1XnypAd/T3oBcuxPGkQqULXTLpmThPDYV
 OILg67mHHpzdF1LVLTZoRBateGFyiwTWpy8ChVTSepriUzdfbyT2fZwvo4n0ryY9
 lN2xzuuo+4upw2GWFT1+mJ8dpsA7MDo3TwTdIlSLzuN7gSW59U9C5zpJYDFXMscK
 C4FYIKmUra9G7dQC3xBr
 =Cjt7
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-3.7-fixes-for-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into fixes

From Stephen Warren: ARM: tegra: fixes for 3.7-rc2

This branch contains a couple small fixes for Tegra for 3.7.

* A fix for another clock rate calculation overflow
* A revert of a change that removed the "timer" clock on Tegra, coupled
  with a fix for the confusing symbol name clash that triggered it.

* tag 'tegra-for-3.7-fixes-for-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
  ARM: tegra: add tegra_timer clock
  ARM: tegra: rename tegra system timer
  ARM: tegra30: clk: Fix output_rate overflow

Signed-off-by: Olof Johansson <olof@lixom.net>
2012-10-17 17:04:42 -07:00
Deepthi Dharwar 83dac59409 cpuidle/powerpc: Fix snooze state problem in the cpuidle design on pseries.
Earlier without cpuidle framework on pseries, the native arch
idle routine comprised of both snooze and nap
states.  smt_snooze_delay variable was used to delay
the idle process entry to deeper idle state like  nap.
With the coming of cpuidle, this arch specific idle was replaced
by two different idle routines, one for supporting snooze and other
for nap. This enabled addition of more
low level idle states on pseries in the future.

On adopting the generic cpuidle framework for POWER systems,
the decision of which idle state to choose from,  given a predicted
idle time is taken by the menu governor based on
target_residency and  exit_latency of the idle states.
target_residency is the minimum time to be resident in that idle state.
Exit_latency is time taken to exit out of idle state.
Deeper the idle state, both the target residency and exit latency
would be higher.

In the current design, smt_snooze_delay is used as target_residency
for the  snooze state which is incorrect, as it is not the
minimum but the maximum duration to be in snooze state.
This would  result in the governor in taking bad decision,
as presently target_residency of nap < target_residency of snooze
inspite of nap being deeper idle state.

This patch aims to fix this problem by replacing the smt_snooze_delay loop
in snooze state, with the need_resched()  as the governor is aware of
entry and exit of various idle transitions based on which
next idle time prediction.

The governor is intelligent enough to determine the idle state the needs to
be transitioned to and maintains a whole of heuristics including
io load, previous idle states predictions etc for the same, based on
which idle state entry decision is taken.

With this fix, of setting target_residency of snooze to 0
					     nap to smt_snooze_delay
if the predicted idle time is less
than smt_snooze_delay (target_residency of nap)
value governor would pick snooze state, else nap. This adhers to the
previous native idle design.

Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-10-18 10:57:25 +11:00
Deepthi Dharwar 8ea959a17f cpuidle/powerpc: Fix smt_snooze_delay functionality.
smt_snooze_delay was designed to  delay idle loop's nap entry
in the native idle code before it got  ported over to use as part of
the cpuidle framework.

A -ve value  assigned to smt_snooze_delay should result in
busy looping, in other words disabling the entry to nap state.

	- https://lists.ozlabs.org/pipermail/linuxppc-dev/2010-May/082450.html

This particular functionality can be achieved currently by
echo 1 > /sys/devices/system/cpu/cpu*/state1/disable
but it is broken when one assigns -ve value to  the smt_snooze_delay
variable either via sysfs entry or ppc64_cpu util.

This patch aims to fix this, by disabling nap state when smt_snooze_delay
variable is set to -ve value.

Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-10-18 10:57:24 +11:00
Deepthi Dharwar 817deb05df cpuidle/powerpc: Fix target residency initialisation in pseries cpuidle
Remove the redundant target residency initialisation in pseries_cpuidle_driver_init().
This is currently over-writing the residency time updated as part of the static
table, resulting in  all the idle states having the same target
residency of 100us which is incorrect. This may result in the menu governor making
wrong state decisions.

Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-10-18 10:57:24 +11:00
Aneesh Kumar K.V ce236ab576 powerpc: Build fix for powerpc KVM
Fix build failure for powerpc KVM by adding missing VPN_SHIFT definition
and the ';'

arch/powerpc/kvm/book3s_32_mmu_host.c: In function 'kvmppc_mmu_map_page':
arch/powerpc/kvm/book3s_32_mmu_host.c:176: error: 'VPN_SHIFT' undeclared (first use in this function)
arch/powerpc/kvm/book3s_32_mmu_host.c:176: error: (Each undeclared identifier is reported only once
arch/powerpc/kvm/book3s_32_mmu_host.c:176: error: for each function it appears in.)
arch/powerpc/kvm/book3s_32_mmu_host.c:178: error: expected ';' before 'next_pteg'
arch/powerpc/kvm/book3s_32_mmu_host.c:190: error: label 'next_pteg' used but not defined
make[1]: *** [arch/powerpc/kvm/book3s_32_mmu_host.o] Error 1

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-10-18 10:37:52 +11:00
Benjamin Herrenschmidt 72523d8082 Revert "powerpc/perf: Use pmc_overflow() to detect rolled back events"
This reverts commit 813312110b.

This revert was requested by the author of the patch as it seems
to cause system hangs with some low frequency events
2012-10-18 10:36:11 +11:00
John Johansen 43c422eda9 apparmor: fix apparmor OOPS in audit_log_untrustedstring+0x1c/0x40
The capability defines have moved causing the auto generated names
of capabilities that apparmor uses in logging to be incorrect.

Fix the autogenerated table source to uapi/linux/capability.h

Reported-by: YanHong <clouds.yan@gmail.com>
Reported-by: Krzysztof Kolasa <kkolasa@winsoft.pl>
Analyzed-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-17 16:29:46 -07:00
Bill Pemberton 178e485a0e staging: dgrp: check return value of alloc_tty_driver
alloc_tty_driver was always assumed to succeed.  Add code to check the
return value and return -ENOMEM if alloc_tty_driver fails.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 14:10:10 -07:00
Bill Pemberton d7c4660c12 staging: dgrp: check for NULL pointer in (un)register_proc_table
register_proc_table and unregister_proc_table didn't deal with the
possibility that the *table pointer could be NULL.  Check for this and
return if table is NULL.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 14:10:10 -07:00
Greg Kroah-Hartman 367ff459e5 UAPI Disintegration 2012-10-09
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUHPmXBOxKuMESys7AQI40A//Qq3+EH/17l6y8FzX61U4Mvq7ZvSI+3uo
 0T7Mc68WkXeOjQtm31VpvqNa+XxIBu0T8QS8Qp7N1U3beM8x95/SQLeukQLjow5/
 Rn2vjcMfiVvJ/YODZmlrDLZrEoEM8cfXoL+aJZHzm63eapIkdqztLJ140ej4SN+i
 aCIu8eU99SH490byuqWce22RaqA78VpU3dEDi5LxQvUxdFz6ZcGqpegCmGr8bQxa
 cQXZTH/9BokkGpxOchDPZte6REct/2PHO+vfOOuruhpQPw9V3LuanM4T41dmdRpM
 yPosARQZSPB/3lL2mOGGRY3jG8z6IrfjoWaPOPBjmLFHYpscLl22cgPr3bzNaBZF
 UXV+on3bB4e1JgT1XOXygBpODoTz1bhqaIUNc83sjCSilc8xEbCkyVF3JptZkMkq
 z7jU8uhnnKxt9WLVdkiTKHUsQZ14gy/zWrNagkbE+yj+ncXrsmcbtxeQUlYHtgI8
 6oqLAKW9BuQL3/CglMfKf/yKr1umYQyOYollAAm1DQzGgd73aggXVwQwUOHGkSoi
 T8hREXwqRPmapMCHdtSjbP/IvVoUbAnu5HZpDhuFVxZ1eI/WEf4hZmjbdq5tSTcy
 Sy00Rk8jMzOu4rTidFalgJ6HPVa9s1Vxfnvr8NfQur/Ln5H2VUbXfc1BVLY9pl6M
 rsufR0J/DDY=
 =Wa/z
 -----END PGP SIGNATURE-----

Merge tag 'disintegrate-tty-20121009' of git://git.infradead.org/users/dhowells/linux-headers into tty-linus

UAPI Disintegration 2012-10-09
2012-10-17 14:07:56 -07:00
Stephen Warren 205a8eb7ce dtc: fix for_each_*() to skip first object if deleted
The previous definition of for_each_*() would always include the very
first object within the list, irrespective of whether it was marked
deleted, since the deleted flag was not checked on the first object,
but only on any "next" object.

Fix for_each_*() to check the deleted flag in the loop body every
iteration to correct this.

(upstream dtc commit 1762ab42ef77db7ab2776d0d6cba3515150f518a)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2012-10-17 15:53:04 -05:00
Kim Phillips 24fb530f99 of/platform: sparse fix
drivers/of/platform.c:110:59: warning: incorrect type in argument 2 (different base types)
drivers/of/platform.c:110:59:    expected restricted __be32 const [usertype] *addr
drivers/of/platform.c:110:59:    got unsigned int const [usertype] *[assigned] reg

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2012-10-17 15:53:03 -05:00
Kim Phillips d2e4151821 of/irq: sparse fixes
drivers/of/irq.c:195:57: warning: restricted __be32 degrades to integer
drivers/of/irq.c:196:51: warning: restricted __be32 degrades to integer
drivers/of/irq.c:199:57: warning: restricted __be32 degrades to integer
drivers/of/irq.c:201:58: warning: restricted __be32 degrades to integer
drivers/of/irq.c:470:37: warning: incorrect type in assignment (different modifiers)
drivers/of/irq.c:470:37:    expected int ( *[usertype] irq_init_cb )( ... )
drivers/of/irq.c:470:37:    got void const *const data
drivers/of/irq.c:96:5: error: symbol 'of_irq_map_raw' redeclared with different type (originally declared at include/linux/of_irq.h:61) - incompatible argument 2 (different base types)

drivers/of/of_pci_irq.c:91:40: warning: incorrect type in argument 2 (different base types)
drivers/of/of_pci_irq.c:91:40:    expected unsigned int const [usertype] *intspec
drivers/of/of_pci_irq.c:91:40:    got restricted __be32 *<noident>
drivers/of/of_pci_irq.c:91:53: warning: incorrect type in argument 4 (different base types)
drivers/of/of_pci_irq.c:91:53:    expected unsigned int const [usertype] *addr
drivers/of/of_pci_irq.c:91:53:    got restricted __be32 *<noident>

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2012-10-17 15:53:02 -05:00
Kim Phillips 47b1e689db of/address: sparse fixes
drivers/of/address.c:66:29: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:66:29:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:66:29:    got unsigned int [usertype] *addr
drivers/of/address.c:87:32: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:87:32:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:87:32:    got unsigned int [usertype] *addr
drivers/of/address.c:91:30: warning: incorrect type in assignment (different base types)
drivers/of/address.c:91:30:    expected unsigned int [unsigned] [usertype] <noident>
drivers/of/address.c:91:30:    got restricted __be32 [usertype] <noident>
drivers/of/address.c:92:22: warning: incorrect type in assignment (different base types)
drivers/of/address.c:92:22:    expected unsigned int [unsigned] [usertype] <noident>
drivers/of/address.c:92:22:    got restricted __be32 [usertype] <noident>
drivers/of/address.c:147:35: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:147:35:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:147:35:    got unsigned int [usertype] *addr
drivers/of/address.c:157:34: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:157:34:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:157:34:    got unsigned int [usertype] *
drivers/of/address.c:256:29: warning: restricted __be32 degrades to integer
drivers/of/address.c:256:36: warning: restricted __be32 degrades to integer
drivers/of/address.c:262:34: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:262:34:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:262:34:    got unsigned int [usertype] *
drivers/of/address.c:372:41: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:372:41:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:372:41:    got unsigned int [usertype] *addr
drivers/of/address.c:395:53: warning: incorrect type in argument 2 (different base types)
drivers/of/address.c:395:53:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:395:53:    got unsigned int [usertype] *addr
drivers/of/address.c:443:50: warning: incorrect type in argument 2 (different base types)
drivers/of/address.c:443:50:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:443:50:    got unsigned int *<noident>
drivers/of/address.c:455:49: warning: incorrect type in argument 1 (different base types)
drivers/of/address.c:455:49:    expected restricted __be32 const [usertype] *cell
drivers/of/address.c:455:49:    got unsigned int *<noident>
drivers/of/address.c:480:60: warning: incorrect type in argument 2 (different base types)
drivers/of/address.c:480:60:    expected restricted __be32 const [usertype] *addr
drivers/of/address.c:480:60:    got unsigned int *<noident>
drivers/of/address.c:412:5: warning: symbol '__of_translate_address' was not declared. Should it be static?
drivers/of/address.c:520:14: error: symbol 'of_get_address' redeclared with different type (originally declared at include/linux/of_address.h:22) - different base types

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2012-10-17 15:53:01 -05:00
Olof Johansson 25c040c99b of: add stub of_get_child_by_name for non-OF builds
Fixes build error on s3c6400_defconfig, introduced by commit
06455bbcab, "dt/s3c64xx/spi: Use
of_get_child_by_name to get a named child".

drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata':
drivers/spi/spi-s3c64xx.c:838:2: error: implicit declaration of function
    'of_get_child_by_name' [-Werror=implicit-function-declaration]

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2012-10-17 15:53:00 -05:00
Johan Hovold bf90ff5f3b USB: spcp8x5: fix port-data memory leak
Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:48:00 -07:00
Johan Hovold 638b9e1523 USB: ssu100: fix port-data memory leak
Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:59 -07:00
Johan Hovold 51ef847df7 USB: ti_usb_3410_5052: fix port-data memory leak
Fix port-data memory leak by moving port data allocation and
deallocation to port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:59 -07:00
Johan Hovold 289b076f89 USB: oti6858: fix port-data memory leak
Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:59 -07:00
Johan Hovold 53636555b9 USB: iuu_phoenix: fix port-data memory leak
Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:59 -07:00
Johan Hovold 99a6f73c49 USB: kl5kusb105: fix port-data memory leak
Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Note that the write waitqueue was initialised but never used.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:59 -07:00
Johan Hovold 003615302a USB: io_ti: fix port-data memory leak
Fix port-data memory leak by moving port data allocation and
deallocation to port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:58 -07:00
Johan Hovold 94ab71ce28 USB: keyspan_pda: fix port-data memory leak
Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Note that the write waitqueue was initialised but never used.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:58 -07:00
Johan Hovold 3124d1d71d USB: f81232: fix port-data memory leak
Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:58 -07:00
Johan Hovold c27f3efc56 USB: io_edgeport: fix port-data memory leak
Fix port-data memory leak by moving port data allocation and
deallocation to port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:58 -07:00
Johan Hovold 95940a04bf USB: kobil_sct: fix port-data memory leak
Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:58 -07:00
Johan Hovold 5c1a0f418d USB: cypress_m8: fix port-data memory leak
Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:47:57 -07:00
Nicolas Boullis 301a29da6e usb: acm: fix the computation of the number of data bits
The current code assumes that CSIZE is 0000060, which appears to be
wrong on some arches (such as powerpc).

Signed-off-by: Nicolas Boullis <nboullis@debian.org>
Acked-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:45:49 -07:00
Tony Prisk 6e1babb3ff usb: Missing dma_mask in ehci-vt8500.c when probed from device-tree
Device-tree probed devices don't get a dev.dma_mask set. This patch
sets a default 32bit mask on arch-vt8500 when using devicetree.

Without this patch, arch-vt8500 cannot detect ehci attached devices.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:42:29 -07:00
Tony Prisk 09eeffb70c usb: Missing dma_mask in uhci-platform.c when probed from device-tree
Device-tree probed devices don't get a dev.dma_mask set. This patch
sets a default 32bit mask on platforms using devicetree.

Without this patch, arch-vt8500 cannot detect uhci attached devices.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:42:29 -07:00
Ming Lei c5211187f7 USB: cdc-acm: fix pipe type of write endpoint
If the write endpoint is interrupt type, usb_sndintpipe() should
be passed to usb_fill_int_urb() instead of usb_sndbulkpipe().

Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:41:34 -07:00
Henrik Rydberg 014639003c usbdevfs: Fix broken scatter-gather transfer
The handling of large output bulk transfers is broken; the same user
page is read over and over again. Fixed with this patch.

Cc: stable <stable@vger.kernel.org>
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 13:41:34 -07:00
Linus Torvalds 985c9e615a UAPI fixes 2012-10-17
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUH60qBOxKuMESys7AQKQkw/+OB9DOP86qLEpNBNt5Ue4Ee8G6F6oj32M
 eUIH71iD9HWVbEsWwwhXZmZcGOJzLbfX4cN2FIiFl4Jxxj3NwDE7GJMRY2sOBp+q
 SYrUVahcpHM4CDaFX6778pSAicM7cb7F5FyPPF7C0y39bor/Znm9SMmP83oyYcwo
 smYO6NVl3Qi9b0xlHIYLE3BadO7SIGHt5crqDqZMNue1jiTox/4lliIIGer4rr3q
 NaJjW2P19pG+ok0HNzHmhBKp+wpila9+TgQHsZjE+u6DizGsxxq6fiPi6A8EWAA/
 mEPJQW73qeNA/kzEwjmvEoVNoOd+X3kT+cpaMegKT4BQdLyi6LtAlhw5RMXLPucd
 KvmYTFxcMxxNlQbD28hCdm1kTj6cOaZS96bpz4mwYXMOlljLyi49XEceh7G9ue1S
 0fOds/maCLPNcxyThcrP12pIn3Ou9ZpL7UjQKvNeZirVed25hi2lkbza9UeRRYRu
 y13ELZKges9I2BQ3moMOSZ7TnUGepP8ohnVJnE8w7hegrz2L7WkNPdbuYEV5lqoP
 jJVtf5pjvjhLAGUPvzWWgH2sbV12U+Fi35A5+YELoqd+OXU/gCSU1YeeeotAFdst
 gka9HloiYQHSWLbj/1SXUo058WI6/dNwZcj1KznJrBkk87V48SM4BPsZ4zbt7nww
 19Fr3cD7YMY=
 =UV14
 -----END PGP SIGNATURE-----

Merge tag 'uapi-fixes-20121017' of git://git.infradead.org/users/dhowells/linux-headers

Pull misc UAPI fixes from David Howells:
 "They do a number of things:

  (1) Import a patch from Catalin Marinas to extend the generic-y in
      Kbuild facility to uapi directories.

  (2) Make arch/tile's ucontext.h file use (1) and remove the header-y
      line from the kernel internal side of things.

  (3) Remove some now-empty conditional bits from include/linux/Kbuild.
      The contents got moved to the UAPI side of things along with new
      conditionals.

  (4) Deal with now-empty files:

     (a) Empty Kbuild files under include/ get removed.

     (b) Empty Kbuild files under arch/ get comments to hold them as
         they are likely to end up with generic-y or genhdr-y lines.
         Deleting them appears to work if we want to go that route.

     (c) Put a comment into uapi/asm-generic/kvm_para.h to prevent the
         patch program from deleting that, and made the arches with
         empty kvm_para.h uapi files use that instead of having their
         own files.

     (d) Put comments into four other empty uapi/ headers to prevent the
         patch program from deleting them.

  A question: Is this the right way to deal with the now-empty Kbuild
  files?

  The ones under include/ are unlikely to be used - even for generated
  files, I think - so getting rid of them is probably okay.  Once all
  the bits are in, we can probably remove all the Kbuild files under
  include/ that aren't also under include/uapi/.

  The ones under arch/ are more of an issue because of the potential for
  generic-y and genhdr-y."

* tag 'uapi-fixes-20121017' of git://git.infradead.org/users/dhowells/linux-headers:
  UAPI: Make arch/sparc/include/uapi/asm/sigcontext.h non-empty
  UAPI: Make arch/sh/include/uapi/asm/hw_breakpoint.h non-empty
  UAPI: Make arch/mn10300/include/uapi/asm/setup.h non-empty
  UAPI: Put a comment into uapi/asm-generic/kvm_para.h and use it from arches
  UAPI: The tile arch uses the generic ucontext.h file
  UAPI: Place comments in empty arch Kbuilds to make them non-empty
  UAPI: Remove empty non-UAPI Kbuild files
  UAPI: Remove empty conditionals from include/linux/Kbuild
  UAPI: Make uapi/linux/irqnr.h non-empty
  uapi: Allow automatic generation of uapi/asm/ header files
2012-10-17 13:40:22 -07:00
Mauro Carvalho Chehab 2c76a12ae9 [media] Kconfig: Fix dependencies for driver autoselect options
This option is a merge of both analog TV and DVB CUSTOMISE.

At the merge, the dependencies were not done right: the menu
currently appears only for analog TV. It should also be opened
for digital TV. As there are other I2C devices there (flash
devices, etc) that aren't related to either one, it is better
to make it generic enough to open for all media devices with
video.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-17 16:45:56 -03:00
Linus Torvalds 1867353325 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) Fix regression in /proc/net/if_inet6, sometimes devices do not get
    listed.  From Eric Dumazet.

 2) Add IPSEC networking sub-section to MAINTAINERS.

 3) S390 networking fixes from Hendrik Brueckner and Stefan Raspl.

 4) Fix enslavement of devices that can't do VLAN properly, from Jiri
    Pirko.

 5) SCTP sack handling fix from Zijie Pan.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  ipv6: addrconf: fix /proc/net/if_inet6
  bnx2x: fix handling mf storage modes
  qeth: fix deadlock between recovery and bonding driver
  smsgiucv: reestablish IUCV path after resume
  sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()
  vlan: fix bond/team enslave of vlan challenged slave/port
  MAINTAINERS: Add explicit section for IPSEC networking.
2012-10-17 12:41:18 -07:00
Linus Torvalds ccbfddb78c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller:
 "Two sparc64 perf bug fixes and add a sysrq facility so I can diagnose
  these kinds of problems more quickly in the future."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix bit twiddling in sparc_pmu_enable_event().
  sparc64: Add global PMU register dumping via sysrq.
  sparc64: Like x86 we should check current->mm during perf backtrace generation.
2012-10-17 12:40:44 -07:00
Rodrigo Vivi 0a3af26864 drm/i915: Insert i915_preliminary_hw_support variable.
On the worst scenario, users with new hardwares and old kernel from
enabling times can get black screens.  So, from now on, this
perliminary_hw_support module parameter shall be used by all upcoming
platforms that are still under enabling. The second option would be to
merge the pci ids after basic modeset works, but that makes testing
and development while bringing up hw a rather tedious afair.

Although it is uncomfortable for developers use this extra variable it
brings more stability for end users.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
[danvet: dropped the i915_ param prefix, i915.i915_ is just tedious.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-17 21:21:45 +02:00
Sasha Levin 212ba90696 SUNRPC: Prevent kernel stack corruption on long values of flush
The buffer size in read_flush() is too small for the longest possible values
for it. This can lead to a kernel stack corruption:

[   43.047329] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff833e64b4
[   43.047329]
[   43.049030] Pid: 6015, comm: trinity-child18 Tainted: G        W    3.5.0-rc7-next-20120716-sasha #221
[   43.050038] Call Trace:
[   43.050435]  [<ffffffff836c60c2>] panic+0xcd/0x1f4
[   43.050931]  [<ffffffff833e64b4>] ? read_flush.isra.7+0xe4/0x100
[   43.051602]  [<ffffffff810e94e6>] __stack_chk_fail+0x16/0x20
[   43.052206]  [<ffffffff833e64b4>] read_flush.isra.7+0xe4/0x100
[   43.052951]  [<ffffffff833e6500>] ? read_flush_pipefs+0x30/0x30
[   43.053594]  [<ffffffff833e652c>] read_flush_procfs+0x2c/0x30
[   43.053596]  [<ffffffff812b9a8c>] proc_reg_read+0x9c/0xd0
[   43.053596]  [<ffffffff812b99f0>] ? proc_reg_write+0xd0/0xd0
[   43.053596]  [<ffffffff81250d5b>] do_loop_readv_writev+0x4b/0x90
[   43.053596]  [<ffffffff81250fd6>] do_readv_writev+0xf6/0x1d0
[   43.053596]  [<ffffffff812510ee>] vfs_readv+0x3e/0x60
[   43.053596]  [<ffffffff812511b8>] sys_readv+0x48/0xb0
[   43.053596]  [<ffffffff8378167d>] system_call_fastpath+0x1a/0x1f

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2012-10-17 14:59:10 -04:00
Daniel J Blueman 21c5e50e15 x86, amd, mce: Avoid NULL pointer reference on CPU northbridge lookup
When booting on a federated multi-server system (NumaScale), the
processor Northbridge lookup returns NULL; add guards to prevent this
causing an oops.

On those systems, the northbridge is accessed through MMIO and the
"normal" northbridge enumeration in amd_nb.c doesn't work since we're
generating the northbridge ID from the initial APIC ID and the last
is not unique on those systems. Long story short, we end up without
northbridge descriptors.

Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com>
Cc: stable@vger.kernel.org # 3.6
Link: http://lkml.kernel.org/r/1349073725-14093-1-git-send-email-daniel@numascale-asia.com
[ Boris: beef up commit message ]
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-10-17 11:25:32 -07:00
Greg Kroah-Hartman 2c78040c3e USB: usb.h: remove dbg() macro
There are no users of this macro anymore in the kernel tree, so finally
delete it.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-17 11:16:13 -07:00
Jacob Shin 1bbbbe779a x86: Exclude E820_RESERVED regions and memory holes above 4 GB from direct mapping.
On systems with very large memory (1 TB in our case), BIOS may report a
reserved region or a hole in the E820 map, even above the 4 GB range. Exclude
these from the direct mapping.

[ hpa: this should be done not just for > 4 GB but for everything above the legacy
  region (1 MB), at the very least.  That, however, turns out to require significant
  restructuring.  That work is well underway, but is not suitable for rc/stable. ]

Cc: stable@kernel.org   # > 2.6.32
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Link: http://lkml.kernel.org/r/1319145326-13902-1-git-send-email-jacob.shin@amd.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2012-10-17 10:59:39 -07:00