Commit Graph

506692 Commits

Author SHA1 Message Date
Ley Foon Tan
6347e2a10f nios2: mm: do not invoke OOM killer on kernel fault OOM
Follow commit 871341023c.

Kernel faults are expected to handle OOM conditions gracefully (gup,
uaccess etc.), so they should never invoke the OOM killer.  Reserve
this for faults triggered in user context when it is the only option.

Signed-off-by: Ley Foon Tan <lftan@altera.com>
2015-03-16 15:35:25 +08:00
Dan Carpenter
10640d3455 isdn: icn: use strlcpy() when parsing setup options
If you pass an invalid string here then you probably deserve the memory
corruption, but it annoys static analysis tools so lets fix it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-15 22:24:37 -04:00
Tobias Klauser
c105e86ace nios2: Remove ucontext.h from exported arch headers
Commit 92d5dd8cd6 ("nios2: update pt_regs") removed the nios2 specific
ucontext.h, replacing it with the version from asm-generic. Thus it's no
longer necessary to include ucontext.h in exported headers.

Cc: Chung-Ling Tang <cltang@codesourcery.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Ley Foon Tan <lftan@altera.com>
2015-03-16 10:20:41 +08:00
Al Viro
7d985ed1dc rxrpc: bogus MSG_PEEK test in rxrpc_recvmsg()
[I would really like an ACK on that one from dhowells; it appears to be
quite straightforward, but...]

MSG_PEEK isn't passed to ->recvmsg() via msg->msg_flags; as the matter of
fact, neither the kernel users of rxrpc, nor the syscalls ever set that bit
in there.  It gets passed via flags; in fact, another such check in the same
function is done correctly - as flags & MSG_PEEK.

It had been that way (effectively disabled) for 8 years, though, so the patch
needs beating up - that case had never been tested.  If it is correct, it's
-stable fodder.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-15 22:20:09 -04:00
Al Viro
3eeff778e0 caif: fix MSG_OOB test in caif_seqpkt_recvmsg()
It should be checking flags, not msg->msg_flags.  It's ->sendmsg()
instances that need to look for that in ->msg_flags, ->recvmsg() ones
(including the other ->recvmsg() instance in that file, as well as
unix_dgram_recvmsg() this one claims to be imitating) check in flags.
Braino had been introduced in commit dcda13 ("caif: Bugfix - use MSG_TRUNC
in receive") back in 2010, so it goes quite a while back.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-15 22:19:17 -04:00
Linus Torvalds
06e5801b8c Linux 4.0-rc4 2015-03-15 17:38:20 -07:00
Linus Torvalds
08352086de Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fix from Dave Airlie:
 "An oops snuck in in an -rc3 patch, this fixes it"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  [PATCH] drm/mm: Fix support 4 GiB and larger ranges
2015-03-15 15:20:09 -07:00
Linus Torvalds
1ee89c519a The clk fixes for 4.0-rc4 comprise three themes. First are the usual
driver fixes for new regressions since v3.19. Second are fixes to the
 common clock divider type caused by recent changes to how we round clock
 rates. This affects many clock drivers that use this common code.
 Finally there are fixes for drivers that improperly compared struct clk
 pointers (drivers must not deref these pointers). While some of these
 drivers have done this for a long time, this did not cause a problem
 until we started generating unique struct clk pointers for every
 consumer. A new function, clk_is_match was introduced to get these
 drivers working again and they are fixed up to no longer deref the
 pointers themselves.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVBewEAAoJEKI6nJvDJaTUR2gP/2frIXCm/krwkDyofIGxxQ+F
 RwIXFTn9GG9QEUwKLUcxRUegHbWbZMXYp6W19hUcUdYz3pD+uEJSuH0NI8kW1Ohy
 32P5/ALuoTq7OVzBBz/9di9jBDdIM1wusLZGJfOWk9DXBLOS3VHuhN55D47dqWS/
 GsszeEpp8r1WBKFVmAkuQ5Jc0CqgS5GxvMOndXXVN3kDMhCT+9pBiqtUT0V3YV/J
 d5GCvfPlO/Xmjnpjf99MPButkfiW/o6YXt3H0QY6hhskS1Av8alyfabVctk8lqOW
 py8SQFY7MdRLZ84Zk87sqKCKUc/vHkTBT9vKWYm65l3yJ5OEFv60NaFMYY61HVlJ
 n6qWU6SbFZvkPnQTJn6Ii/v7BQ92bXjYpLNcBK8UY35jIjmHsPS/YXCbkmArtn1N
 /yAB4TIfH8uX93smFb3XEmZLSiKFuZAhU8YbjDzYgsGuQ9EwN3aNP9c5mzC7Soou
 tYnDqVic0i993qQTD2Db5dplGwxelCRJpazO2kK6NW/EJzE8XJaM6XVy1xIBKiDX
 bbWPdp53/eWV7gbUEZ8zzcS06G/DLw5/N45XyaWIx+2ThDjhOAlVHTAFDY+Oa743
 42Dkwtr5GZ6yORyXY1wI5HttUGU0gnPN0kM84GQG8O/GbzGureZSW1e6G7tJJljn
 JXhROl0w4aIPwUUxry7R
 =nc5C
 -----END PGP SIGNATURE-----

Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clock framework fixes from Michael Turquette:
 "The clk fixes for 4.0-rc4 comprise three themes.

  First are the usual driver fixes for new regressions since v3.19.

  Second are fixes to the common clock divider type caused by recent
  changes to how we round clock rates.  This affects many clock drivers
  that use this common code.

  Finally there are fixes for drivers that improperly compared struct
  clk pointers (drivers must not deref these pointers).  While some of
  these drivers have done this for a long time, this did not cause a
  problem until we started generating unique struct clk pointers for
  every consumer.  A new function, clk_is_match was introduced to get
  these drivers working again and they are fixed up to no longer deref
  the pointers themselves"

* tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  ASoC: kirkwood: fix struct clk pointer comparing
  ASoC: fsl_spdif: fix struct clk pointer comparing
  ARM: imx: fix struct clk pointer comparing
  clk: introduce clk_is_match
  clk: don't export static symbol
  clk: divider: fix calculation of initial best divider when rounding to closest
  clk: divider: fix selection of divider when rounding to closest
  clk: divider: fix calculation of maximal parent rate for a given divider
  clk: divider: return real rate instead of divider value
  clk: qcom: fix platform_no_drv_owner.cocci warnings
  clk: qcom: fix platform_no_drv_owner.cocci warnings
  clk: qcom: Add PLL4 vote clock
  clk: qcom: lcc-msm8960: Fix PLL rate detection
  clk: qcom: Fix slimbus n and m val offsets
  clk: ti: Fix FAPLL parent enable bit handling
2015-03-15 15:07:08 -07:00
Krzysztof Kolasa
046d669c62 [PATCH] drm/mm: Fix support 4 GiB and larger ranges
bad argument if(tmp)... in check_free_hole

fix oops: kernel BUG at drivers/gpu/drm/drm_mm.c:305!

[airlied: excellent, this was my task for today].

Signed-off-by: Krzysztof Kolasa <kkolasa@winsoft.pl>
Reviewed-by: Chris wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-03-16 06:28:50 +10:00
Linus Torvalds
6981e2af36 ARM: SoC fixes for 4.0-rc3
This is a rather unpleasantly large set of bug fixes for arm-soc,
 Most of them because of cross-tree dependencies for Exynos
 where we should have figured out the right path to merge things
 before the merge window, and then the maintainer being unable to
 sort things out in time during a business trip.
 
 The other changes contained here are the usual collection:
 
 MAINTAINERS file updates
  - Gregory Clement is now a co-maintainer for the legacy Marvell EBU
    platforms
  - A MAINTAINERS entry for the Freescale Vybrid platform that was
    added last year
  - Matt Porter no longer works as a maintainer on Broadcom SoCs
 
 Build-time issues
  - A compile-time error for at91
  - Several minor DT fixes on at91, imx, exynos, socfpga, and omap
  - The new digicolor platform was not correctly enabled at all
 
 Configuration issues
  - Two defconfig fix for regressions using USB on versatile
    express and on OMAP3
  - Enabling all 8 CPUs on Allwinner/SUNxi
  - Enabling the new STiH410 platform to be usable
 
 Bug fixes in platform code
  - A missing barrier for socfpga
  - Fixing LPDDR1 self-refresh mode on at91
  - Fixing RTC interrupt numbers on Exynos3250
  - Fixing a cache-coherency issues in CPU power-down
    on Exynos5
  - Multiple small OMAP power management fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAVQWt5GCrR//JCVInAQLsTBAApULd9gOg2YnSZWF6cZidZb4ZULB1XTL6
 o+vdrmLy+HunRZElMSAqlN8DCzJqLoBk6IfiwJjC10JhwHOwp7yElzIR3IMsBOMw
 jeUTpXUIUrMj/gDSsBSiLwJe80tH+orvsov2YKD4lYhjl+E6X2+K93jtFsIU+Tp2
 Tl/g6ZH4iQ8GIkRsVuwxCTDDPnA6s21jCNUsjvwYEXZG27V8Vefvb7X8/FO00n/W
 Q+HjPJXf9BDF4StAujIkRkalhfLTOLGPCaXdbZIZerRKlX9GzytiSXFLgFhDN/7G
 LXXPApYJN/kgvgPCbdixSOSfScs+RkT01w6ToR0TiY61QmYQq58XBFjN2rJtCpuz
 HS2uj9ppFJNj0WOygmiGLFO2r5O/8uXsHtDCvtGo/g7Jk3OmcSnSsLSv8sAiFUnB
 nBHQEwjWSY+ZS7WbbM733PWVarfTGSJCfpldHg/yE1heeg4NM5Q7ARx2zm6yQpkU
 At/MfnRyUpAHcPSDgPROfTkNQv8dcgVrgKtQe/7pbERX3QB3MtnTo9exUrWZDIK/
 8BBB8zfjOpBJFkK3uSKWrlhtJory0AFNa4+j/XfP8MJWzcRDIo+WL6SWwPOP+7tg
 HVKl10Kg4RGINu7kkI+6UH/MC/QJI0VwUstoAuZ0jkhLfpSEpT1gr0QsRGrmo5DC
 xpeaxOM00N0=
 =Lr/j
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "This is a rather unpleasantly large set of bug fixes for arm-soc, Most
  of them because of cross-tree dependencies for Exynos where we should
  have figured out the right path to merge things before the merge
  window, and then the maintainer being unable to sort things out in
  time during a business trip.

  The other changes contained here are the usual collection:

  MAINTAINERS file updates
   - Gregory Clement is now a co-maintainer for the legacy Marvell EBU
     platforms
   - A MAINTAINERS entry for the Freescale Vybrid platform that was
     added last year
   - Matt Porter no longer works as a maintainer on Broadcom SoCs

  Build-time issues
   - A compile-time error for at91
   - Several minor DT fixes on at91, imx, exynos, socfpga, and omap
   - The new digicolor platform was not correctly enabled at all

  Configuration issues
   - Two defconfig fix for regressions using USB on versatile express
     and on OMAP3
   - Enabling all 8 CPUs on Allwinner/SUNxi
   - Enabling the new STiH410 platform to be usable

  Bug fixes in platform code
   - A missing barrier for socfpga
   - Fixing LPDDR1 self-refresh mode on at91
   - Fixing RTC interrupt numbers on Exynos3250
   - Fixing a cache-coherency issues in CPU power-down on Exynos5
   - Multiple small OMAP power management fixes"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (69 commits)
  MAINTAINERS: Add myself as co-maintainer to the legacy support of the mvebu SoCs
  ARM: at91: pm_slowclock: fix the compilation error
  ARM: at91/dt: fix USB high-speed clock to select UTMI
  ARM: at91/dt: fix at91 udc compatible strings
  ARM: at91/dt: declare matrix node as a syscon device
  ARM: vexpress: update CONFIG_USB_ISP1760 option
  ARM: digicolor: add the machine directory to Makefile
  ARM: STi: Add STiH410 SoC support
  MAINTAINERS: add Freescale Vybrid SoC
  MAINTAINERS: Remove self as ARM mach-bcm co-maintainer
  ARM: imx6sl-evk: set swbst_reg as vbus's parent reg
  ARM: imx6qdl-sabresd: set swbst_reg as vbus's parent reg
  ARM: at91/dt: at91sam9261: fix clocks and clock-names in udc definition
  ARM: OMAP2+: Fix wl12xx on dm3730-evm with mainline u-boot
  ARM: OMAP: enable TWL4030_USB in omap2plus_defconfig
  ARM: dts: dra7x-evm: avoid possible contention while muxing on CAN lines
  ARM: dts: dra7x-evm: Don't use dcan1_rx.gpio1_15 in DCAN pinctrl
  ARM: dts: am43xx: fix SLEWCTRL_FAST pinctrl binding
  ARM: dts: am33xx: fix SLEWCTRL_FAST pinctrl binding
  ARM: dts: OMAP5: fix polling intervals for thermal zones
  ...
2015-03-15 10:49:38 -07:00
Linus Torvalds
71c87bd062 irqchip fixes for v4.0
- armada-370-xp
    - Chained per-cpu interrupts
 
 - gic{,-v3,v3-its}
    - Various fixes for safer operation
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJVBO4uAAoJEP45WPkGe8Zn8jAQAL0bbO4wTUf8eIAVMQ8gvpWT
 RmmPx806bctxWzCQdZeI+5SLbAoMGH4sGN2nvZjxs+gf1+8TDxcNbqpcJdng88+v
 KcYCBVAtNCae3ZScCIiqgbqOWO6EeCi2XoEdxKmmoY6xvw/S+392Gq5Yx6rRhTui
 SYuhq6ZEdeugfaFDZoJE4piBPQWsH6KTCZ2GbLeQbrPGYI1ChIz79bwn0vE3KNXH
 Ctlv3F9CdRgqXMvX5RbE0bqYlAfzV+qkZciIGLd1iLXxfve68HTQYeO1bfMXd2LT
 o3JQBivSU+RMYYXY/+xG3h4+poT9mOlMwArQyEFmYsLCADUkKY0XEkiSfYypcqtl
 RBrIxX1bbcjAFWQPGADP9x7MeR1fgHrPbSvfWRaKRM+R7+mPXyfidP4CNvhCdVoN
 37TpU+XKy/T+bTuciDPieqOHjIcCDZLFy4EHgs1T8KkcGlMr9/AC6noW5ce46zut
 L4CajpAuwsRVAEgERRLU0xdDcRJYHO6GIou4RS4aGyejjaK1bkq1n9/svDt3GmfI
 urUCNcjkkLsYqSBlYhmcUE6ijPnhvLCaaACfomUU2Jlk4YRhGhEpzN2l5sFDvbaA
 xr4DcPV7/XGqzNTwpk1MHKZaloaRhHF2HDjfyKv+23xMPeNu+nRovabHWP4Il2LI
 vowXFSS9ciCxnVOLfEXA
 =DqZ5
 -----END PGP SIGNATURE-----

Merge tag 'irqchip-fixes-4.0' of git://git.infradead.org/users/jcooper/linux

Pull irqchip fixes from Jason Cooper:
 "armada-370-xp:
   - Chained per-cpu interrupts

  gic{,-v3,v3-its}"
   - Various fixes for safer operation"

* tag 'irqchip-fixes-4.0' of git://git.infradead.org/users/jcooper/linux:
  irqchip: gicv3-its: Support safe initialization
  irqchip: gicv3-its: Define macros for GITS_CTLR fields
  irqchip: gicv3-its: Add limitation to page order
  irqchip: gicv3-its: Use 64KB page as default granule
  irqchip: gicv3-its: Zero itt before handling to hardware
  irqchip: gic-v3: Fix out of bounds access to cpu_logical_map
  irqchip: gic: Fix unsafe locking reported by lockdep
  irqchip: gicv3-its: Fix unsafe locking reported by lockdep
  irqchip: gicv3-its: Iterate over PCI aliases to generate ITS configuration
  irqchip: gicv3-its: Allocate enough memory for the full range of DeviceID
  irqchip: gicv3-its: Fix ITS CPU init
  irqchip: armada-370-xp: Fix chained per-cpu interrupts
2015-03-15 10:41:30 -07:00
Forest Wilkinson
9b028649b9 HID: tivo: enable all buttons on the TiVo Slide Pro remote
The linux kernel has supported the TiVo Slide remote control for some time, but
does not recognize the USB ID of the newer Slide Pro. This patch adds the
missing data structures so the newer remote will be recognized by the driver,
thereby allowing the TiVo, LiveTV, and Thumbs Up/Down buttons to be
mapped with a hwdb file.

Signed-off-by: Forest Wilkinson <web11.forest@tibit.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-03-15 10:04:27 -04:00
Jason Cooper
aaa95f7456 Merge branch 'irqchip/urgent-gic' into irqchip/urgent 2015-03-15 01:41:26 +00:00
Venkat Venkatsubra
4c906c2798 bridge: reset bridge mtu after deleting an interface
On adding an interface br_add_if() sets the MTU to the min of
all the interfaces. Do the same thing on removing an interface too
in br_del_if.

Signed-off-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-14 19:12:38 -04:00
Linus Torvalds
7cd9beb338 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Misc i915, vmwgfx and radeon fixes along with a fix for one of those
  recursive sleep mutex debug cases in the mst code"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/vmwgfx: Fix an issue with the device losing its irq line on module unload
  drm/vmwgfx: Correctly NULLify dma buffer pointer on failure
  drm/vmwgfx: Reorder device takedown somewhat
  drm/vmwgfx: Fix a couple of lock dependency violations
  drm/radeon: drop setting UPLL to sleep mode
  drm/radeon: fix wait to actually occur after the signaling callback
  drm/i915: Prevent TLB error on first execution on SNB
  drm/i915: Do both mt and gen6 style forcewake reset on ivb probe
  drm/i915: Make WAIT_IOCTL negative timeouts be indefinite again
  drm/i915: use in_interrupt() not in_irq() to check context
  drm/mst: fix recursive sleep warning on qlock
  drm: Don't assign fbs for universal cursor support to files
2015-03-14 14:54:25 -07:00
Linus Torvalds
60b3e7bd6a SCSI fixes on 20150314
This is a simple fix for a domain revalidation crash which has recently turned
 up in the libsas code (applies to mvsas, isc and aic94xx).
 
 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQEcBAABAgAGBQJVBHs/AAoJEDeqqVYsXL0M9AkH/3x305Mi8z4Lcf4ZT6ZY8Xik
 pSYXPzBEKSTKYYdVJ1sIWoi1lhGLTDQEEB1WrCCy5esJK0uJY656ZeQM7kEyDBiA
 ynfu5WWad4vRSEXUAOtWoqplHWBIjXIbhxv+DA4oeFOr6q02wxOHuAQO3s8yFLXi
 6hSPvH9Fu3EHQIF6NgJ3XSvnLfKyFeJsvwJwrPnFijsvKCOLzyRLup5w2W1EvWKz
 +dozzVoRBEmhllskIQaGECeQww44tPiDpiLayMIsRt7cqk7e+UBd+h5kZEOqSvQX
 pgJiCQFp2J9lRLCU8Er/xDx/BLcr+BFWi6IM46XqcoAWpRBwUYI9KLOZyCyxijk=
 =U7/F
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fix from James Bottomley:
 "This is a simple fix for a domain revalidation crash which has
  recently turned up in the libsas code (applies to mvsas, isc and
  aic94xx)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  libsas: Fix Kernel Crash in smp_execute_task
2015-03-14 14:23:50 -07:00
David S. Miller
07c2171570 linux-can-fixes-for-4.0-20150314
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJVA/DNAAoJECte4hHFiupUdfcP+gPLZHxkeuuGX5VyrHy3SNjG
 0CQheqG/gSGG72R3IIAHr1oW3RxUaCrZAYtZvY/tLlm/sSpyFiYeyVpx/gkNn1DB
 1z4HeNnj366aOrlTbfC0jCWcVxtuYj4L1Kz14/WMIqUK0o6AI3f8f+nI5uTp7a/a
 MAXhn/DVa1JZA4TwC69aSZYlGIqiJKPHouw/fwom9Rjg59U0txv7RM5hqporYQFW
 DcOWnvdBFyD9Zb8DNB5H22dMQpKICK3+K7+5lxsrli2pfhiU+dFXaf/mbNzyp9sq
 Co0EHJZMIwu3vbufYCdv1HMjNqlNEXJ3z5fFwDu/fhVKSqoyOhuU0aCLwmiY7gm0
 3M35MKWCWuv+rC+03MrmKlbEiBMyTCCne5p50QknV/tFSi9gqv1hKmoZydU6Pztk
 yJoZyvKePpHaoXptNGXFlP63cv8htcHNLEhTY4V+dG60ypXMJaxrQu0nhuGX5UgA
 xj9ReRe9HH8TBV12AW+3RrsOPFCEMt2d02MFnc+MxZPDUUoeIQVcXU/EOoELJtVe
 9tBwu6zYSEUd3nRBmI3pASC4r26Tz8BtgHWktCoII/NhilXFbJ34aVnw7pJj0A5n
 J3vWR37Chry4/xNJhaaQuj1sv85seqheAynu3/ewlYItuZhAaXhVAfq2Tja9lKox
 7kI4rMCT9USF1MZtHxWi
 =G4si
 -----END PGP SIGNATURE-----

Merge tag 'linux-can-fixes-for-4.0-20150314' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
Hello David, this is a pull request for net/master, consisting of two patches:

In the first patch Michal Simek enables the xilinx CAN driver for ARM64. The
second patch by Ahmed S. Darwish fixes a race condition in the tx-queue of the
kvaser_usb driver.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-14 14:35:26 -04:00
Linus Torvalds
0f0910a100 File locking related fix for v4.0 (#4)
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVBGaxAAoJEAAOaEEZVoIV9XgP/38ZN45ghfnkOCkJbWanlwQj
 E/zGcuVAuENwWFOjW1aWoOoZ010cy79cnygcr2pR6Rp0FXayLZYmfOaes0hDJt5M
 YiWE86B4vDsqhWqAehmvW4x/N0Q+LIMr1w3YwpZv8i/gr18vvvDaA4D60as7fdA5
 j0jI6KH7Dxk8xOduU5t9aSepZei+EgjIA7h/K/f7SNd3dVaSsIt5IGLPAzG0XVZl
 gsq2/R8LF9mEZgaUa8NZVzHlrwMk2hPn/JVT52nkuk/YXDYIkkLgtvYgI3RTq8Ob
 D2EI5RFhL+Qj4xTaZRcS2w+sElg4+VP0n5woSlqFGCIEa1xBOkGkXT5uT/XbDQF9
 z8m+ycscclMrr3xlzBlH+0UhyUqFGwj7wPPhkcqRJRUbL7+moI1k/14gOne/fkAU
 4hBEVu7RTADa0YcqeCiEq3EG/KGY8BIB/sf9XGOOfFd8gbro7zFfQEGaxCjjbNwA
 thwbBJueKO5Mps1oUkN7QUMXl+ElL3N7u4McdAthrOeRWt6+UQVhJpmCeukCPdSN
 EU2Ju8ZEFSuza5OiMjz8wuGPoHWadddiAnMtqxOHJUMoaL+ZuWExTvH0JzFg83Jv
 pNmaO0UC8JwFYpeJldkBlo9qJ/iqlmy2Rby4oiuCTJFbdOFdtW0hr9ZsvOuofGyt
 R8TgLrd+smcja1+bks6o
 =Qx9q
 -----END PGP SIGNATURE-----

Merge tag 'locks-v4.0-4' of git://git.samba.org/jlayton/linux

Pull file locking bugfix from Jeff Layton:
 "Just a small fix for a potential problem in one of the lease
  tracepoints"

* tag 'locks-v4.0-4' of git://git.samba.org/jlayton/linux:
  locks: fix generic_delete_lease tracepoint to use victim pointer
2015-03-14 10:02:21 -07:00
Linus Torvalds
0be952c13b VFIO fix for v4.0-rc4
- Add missing break to avoid clobbering ioctl (Alexey Kardashevskiy)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVBFvKAAoJECObm247sIsiGhsP/RRP65jdd1/5Uv57OhU0RrO7
 0MXWlX69w7GuR7zzLjmPSQqZRQnKiVx4KMcsGNzgwT6xCrWXMHOyyjOKlFKQL21Q
 iJrcsX0y4phPsah7ZYBcIeClFfG0HKkNsUhk7MhzV3kFI38qR5d38o+3Nb6wduVd
 pw27NO1qDi/kVFJhMbNZrVNFFyTJYdrSc8J9hUxJ2QBloW3fRlrHZzOkRcLZ1m/g
 Ec239ngFFBPARKg8QkHq+hJZ8IIK3MBQd/Sgp82w5BRF6fdnvAzpRtr2ZUvoYzlV
 Cv0bUlmd+0aP417h4iu26CKWMHOWJ+rieQIieyQUELlFpSIz8qYcW5iPwOgfXnUn
 DL6W7OxxAKx0cVNy5sWN7ONd22/TllmNaUpXB8lAYe6zTLRPBpSzx5WBHCqyzH69
 4qdhQTuS0WGBO83FXYh2/8slzEMwb8FSKa53VuYEHjoVIHvGP6yBnfhNCg+GD1Ho
 BBlC9v1CnrSppNKUqFfR6qWXHldZ2JfFH21i4thdbdoOlRM766EUZ1HAO7u6V7Ny
 0tbE40dsvW3AZuo39s9qLAAJsagtfQinyzZGncDjuMYedEAFg+svsopPggpW29q1
 eBJ6IrdXNaKzeWyscrGrea5d3rYs8p3GYTOLOqhDVoawprWSj68xmRd3IZmxIlCL
 8OGC9722d8NdIHnPyGtA
 =k+Ae
 -----END PGP SIGNATURE-----

Merge tag 'vfio-v4.0-rc4' of git://github.com/awilliam/linux-vfio

Pull VFIO fix from Alex Williamson:
 "Add missing break to avoid clobbering ioctl (Alexey Kardashevskiy)"

* tag 'vfio-v4.0-rc4' of git://github.com/awilliam/linux-vfio:
  vfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX
2015-03-14 09:36:10 -07:00
Linus Torvalds
9c987a33a8 arm64 fixes:
- add TLB invalidation for page table tear-down which was missed when
   support for CONFIG_HAVE_RCU_TABLE_FREE was added (assuming page table
   freeing was always deferred)
 - use UEFI for system and reset poweroff if available
 - fix asm label placement in relation to the alignment statement
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVBBghAAoJEGvWsS0AyF7xlPwP/jLWR0P9djqyr0XtPcQebKEu
 eGPR0qZiWantI8HgfS9lAp79VeZUoX6T7EkpM2lTVN/Usz3uVtEjMYQVIAj2JLNL
 uHn3Yd8bYLRokyd9Q/041J+sFGjvMIYJv78YAvgwKOxZ9Nmx20hoAsakQ1DDMSvc
 YgZA8w6a+jUZw8JcLkZzaGNZ+5aHOsI9zljVmus7RTXXPZKxnNFyK15p1C5kSw5O
 uoAPajxSg1UcjKvQdBQLK93zFxe+TsHOP3z72Vy/WCgWfnj/2eGQQOuLUDlj+zCy
 DHEwEJ8vALZKc1n4C2w3LMCFliCcUVkEfyOo+4vHUD427o9Z+SeXnzG6n6WzrlRF
 RcV2xh5R57wUGUXJNWHd1Gv1ypMbGV9WADrp/9nOxW86vnbONk+adKbDExatwpcj
 80gdaYh9XbTPQmXur97BPxtcfUaqKeVv16ssN0EBAnOlJ+2d4nfWaZuAgAuA2f5T
 qv5g31eXIPNV/IY+Tve5DhD4JsbCQi1f8WKu+hyue/on0CLsvX3IEajCrSqFbNp3
 NPjll9IoslKujyJIv88j7XuQGetI72YdNoeqtpKAMwmvWFh95FI6YcT6uUYgH/2n
 dUOTSHD/6G32+66tqhfNEBlNW3yOmFj+grrTZQoQl/1/mkBTCq1Dgw6u/FcgElD5
 A+QqeurFANrxqGOuGhoa
 =q1+X
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - add TLB invalidation for page table tear-down which was missed when
   support for CONFIG_HAVE_RCU_TABLE_FREE was added (assuming page table
   freeing was always deferred)

 - use UEFI for system and reset poweroff if available

 - fix asm label placement in relation to the alignment statement

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: put __boot_cpu_mode label after alignment instead of before
  efi/arm64: use UEFI for system reset and poweroff
  arm64: Invalidate the TLB corresponding to intermediate page table levels
2015-03-14 09:32:00 -07:00
Linus Torvalds
e6c2d9ce12 Kselftest fixes for Linux 4.0-rc4
selftests/exec: Check if the syscall exists and bail if not
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVAxU6AAoJEAsCRMQNDUMcFEMQAI4yi+TLfd4Eyv6EDPmwIcZL
 2oBRON3IaAHtmcaONdQHNgR3qcJwkOSe0/yHfpWH+0HbyBZxRSWjlyUyH7yTcEh+
 twq5tDSglamS0e0+616l4/WJkIBUgBqA+7gTXrvNOqWbmR3thijbXiOfDBsPAZ+S
 TjbkrQJKu1QAUFxNVP7LCYEmh9X/Z/4tzHKNXrrKLmkY4L/q7zvKdtwzLD/EAnFC
 R11CwzAMtWcpjcFreRveOxEb6MLs8z2XsbsVjdTNX9vC5RHhfGQqYrHBFwkEL+Bn
 JVknsaAlHRtKkGEDdqSCjwDU4+RalP1iDw+ZgtyBBql+cQMZ/xcoJ2/gVc5Ay7PD
 t3IN8LFbw0Sv9mBJp6GTVnWWSeAzOdH7K3C7NWTEmOP6U6PGhXBOQnYwCGyFlviI
 69CyUmbCTQLm70/uarVJowGFLvxatem/OX9mUuyI1tcurloqf3o5D1KQhAk7vY2+
 XTBHbftugZIOE9QQS1vb2I4rB4rKn2L2S2mdFO8iOsMIedZ7GeM/VfjnqzARv79T
 BIJUcEWz+Fd2NEn2aM8f32r4NJA9SVSn4uy6L356OG4BUUiBxLciZmm4HVweJjUi
 U3x3sVZvAGUYbC4cKXak6AQpVfuuujy8dH1jVe8J4IaoWmfjOprZBbmJ7P4NTUHQ
 arQGuA1eEnxLj8/jSPSW
 =WFmj
 -----END PGP SIGNATURE-----

Merge tag 'linux-kselftest-4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull Kselftest fix from Shuah Khan:
 "selftests/exec: Check if the syscall exists and bail if not"

* tag 'linux-kselftest-4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests/exec: Check if the syscall exists and bail if not
2015-03-14 09:26:23 -07:00
Jeff Layton
a9b1b455c5 locks: fix generic_delete_lease tracepoint to use victim pointer
It's possible that "fl" won't point at a valid lock at this point, so
use "victim" instead which is either a valid lock or NULL.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
2015-03-14 09:45:35 -04:00
Christoffer Dall
ae705930fc arm/arm64: KVM: Keep elrsr/aisr in sync with software model
There is an interesting bug in the vgic code, which manifests itself
when the KVM run loop has a signal pending or needs a vmid generation
rollover after having disabled interrupts but before actually switching
to the guest.

In this case, we flush the vgic as usual, but we sync back the vgic
state and exit to userspace before entering the guest.  The consequence
is that we will be syncing the list registers back to the software model
using the GICH_ELRSR and GICH_EISR from the last execution of the guest,
potentially overwriting a list register containing an interrupt.

This showed up during migration testing where we would capture a state
where the VM has masked the arch timer but there were no interrupts,
resulting in a hung test.

Cc: Marc Zyngier <marc.zyngier@arm.com>
Reported-by: Alex Bennee <alex.bennee@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-03-14 13:42:07 +01:00
Ard Biesheuvel
947bb7587f arm64: put __boot_cpu_mode label after alignment instead of before
Another one for the big head.S spring cleaning: the label should
be after the .align or it may point to the padding.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-03-14 11:02:26 +00:00
Ard Biesheuvel
60c0d45a7f efi/arm64: use UEFI for system reset and poweroff
If UEFI Runtime Services are available, they are preferred over direct
PSCI calls or other methods to reset the system.

For the reset case, we need to hook into machine_restart(), as the
arm_pm_restart function pointer may be overwritten by modules.

Tested-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-03-14 11:00:18 +00:00
Catalin Marinas
285994a62c arm64: Invalidate the TLB corresponding to intermediate page table levels
The ARM architecture allows the caching of intermediate page table
levels and page table freeing requires a sequence like:

	pmd_clear()
	TLB invalidation
	pte page freeing

With commit 5e5f6dc105 (arm64: mm: enable HAVE_RCU_TABLE_FREE logic),
the page table freeing batching was moved from tlb_remove_page() to
tlb_remove_table(). The former takes care of TLB invalidation as this is
also shared with pte clearing and page cache page freeing. The latter,
however, does not invalidate the TLBs for intermediate page table levels
as it probably relies on the architecture code to do it if required.
When the mm->mm_users < 2, tlb_remove_table() does not do any batching
and page table pages are freed before tlb_finish_mmu() which performs
the actual TLB invalidation.

This patch introduces __tlb_flush_pgtable() for arm64 and calls it from
the {pte,pmd,pud}_free_tlb() directly without relying on deferred page
table freeing.

Fixes: 5e5f6dc105 arm64: mm: enable HAVE_RCU_TABLE_FREE logic
Reported-by: Jon Masters <jcm@redhat.com>
Tested-by: Jon Masters <jcm@redhat.com>
Tested-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-03-14 10:48:30 +00:00
Ahmed S. Darwish
a9dc960c37 can: kvaser_usb: Fix tx queue start/stop race conditions
A number of tx queue wake-up events went missing due to the
outlined scenario below. Start state is a pool of 16 tx URBs,
active tx_urbs count = 15, with the netdev tx queue open.

CPU #1 [softirq]                         CPU #2 [softirq]
start_xmit()                             tx_acknowledge()
................                         ................

atomic_inc(&tx_urbs);
if (atomic_read(&tx_urbs) >= 16) {
                        -->
                                         atomic_dec(&tx_urbs);
                                         netif_wake_queue();
                                         return;
                        <--
    netif_stop_queue();
}

At the end, the correct state expected is a 15 tx_urbs count
value with the tx queue state _open_. Due to the race, we get
the same tx_urbs value but with the tx queue state _stopped_.
The wake-up event is completely lost.

Thus avoid hand-rolled concurrency mechanisms and use a proper
lock for contexts and tx queue protection.

Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-03-14 09:20:07 +01:00
Michal Simek
963a822b6d net: can: Enable xilinx driver for ARM64
Enable the xilinx driver for ARM64.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-03-14 09:01:16 +01:00
Linus Torvalds
5fb0f7fa7f Power management and ACPI fixes for v4.0-rc4
- Fix an ACPI LPSS (Low-Power Subsystem) driver issue causing the
    8250_dw driver to confuse an LPSS clock with another one it is
    supposed to handle due to the lack of identification allowing it
    to tell those clocks apart (Heikki Krogerus).
 
  - Revert a recent commit that was supposed to improve the usability
    of the cpupower tool, but clearly did the opposite (Josh Boyer).
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJVA1Z+AAoJEILEb/54YlRxEzYP/1Rb+BHBgDvvLxV7b8eURG5h
 d5xHvh8aJ68WuGSeftcG8PNGBfG1zYqQocRIaBngdxctyrWuT6A3x+58JWzH/C71
 CV4ic29vrJnQb8yoUNfUMVufIyiU58BjEDu88aBfJ4wr0lJVlG9uqruRUa3N6xGW
 rX6+/YSCZ05rv/2eV9e3/S4d2RdBd5b3ixiV06GMkcnlMIYiMFxvGw0iFYQOpYis
 k6aa8x9huGu2plWfJYrW0AUhUnpau27e3+XWIghNfciywlTDFttmq9NCPs4lPF18
 N1F2tuBs0lw+JjnbR/WyrLa5JkqrLfEckL+kHGK5VRE1AyShH+Ovmlj7i7ho9X0u
 KEP8Hg6H0YsWHmwW6PMXisXEJuXBcCxFpGLziYjFFGkYmZGFoxwYjhqMOAnbsnkx
 uof09aKx5pPle+D8ei+Hkdh8rD1tZ3rh1J+2vgGWynZW5Z+C+ERwg9V7awPTqOPB
 /OPoKYrW96/q6Kj+4e6t0yjri7j4wp37WgxHc7vFaxRVHNr1utm6sAlwRoZQwvlj
 bSY/Fn1IALbr8wvKA52L5mR90rlYyYLYQwPJT5/+Oihj8XFNy76EqFEbCkyO/+UL
 eIJtXOZP9+2vlindAojJSmdW+kpq2m2jcagObFNXAUMzbk/B2IfmykLKyxXoA9as
 9CvW9B1Lz4GEjSYDYE+i
 =VzKz
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management and ACPI fixes from Rafael Wysocki:
 "Just two fixes, one for an ACPI LPSS driver issue introduced during
  the 3.17 cycle and one revert of a recent commit that sort of broke
  the cpupower tool.

  Specifics:

   - Fix an ACPI LPSS (Low-Power Subsystem) driver issue causing the
     8250_dw driver to confuse an LPSS clock with another one it is
     supposed to handle due to the lack of identification allowing it to
     tell those clocks apart (Heikki Krogerus).

   - Revert a recent commit that was supposed to improve the usability
     of the cpupower tool, but clearly did the opposite (Josh Boyer)"

* tag 'pm+acpi-4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  Revert "cpupower Makefile change to help run the tool without 'make install'"
  ACPI / LPSS: provide con_id for the clkdev
2015-03-13 14:30:38 -07:00
Gregory CLEMENT
bfda403162 MAINTAINERS: Add myself as co-maintainer to the legacy support of the mvebu SoCs
I will also take care of the legacy support(not fully converted to DT)
of the mvebu SoCs.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-03-13 22:11:19 +01:00
Rafael J. Wysocki
b176023392 Merge branch 'pm-tools'
* pm-tools:
  Revert "cpupower Makefile change to help run the tool without 'make install'"
2015-03-13 21:43:08 +01:00
Linus Torvalds
f47e331042 xen: bug fixes for 4.0-rc3
- Fix a PV regression in 3.19.
 - Fix a dom0 crash on hosts with large numbers of PIRQs.
 - Prevent pcifront from disabling memory or I/O port access, which may
   trigger host crashes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJVAx7tAAoJEFxbo/MsZsTRBFwH/2Uoza52iMRhHkC6kLRSAhTQ
 HxRbObmweDQCqru25IgDsX+09TqCcWMtqnUTwJ5KPt0ZiwPA4GS0n4InJ9ZbrhBM
 9lXSWFfCKPUuhL6tyACQul5W4SDmZD0UHNl5uQYMH/C8UhktrdjF+CdUO3AvBAWU
 uMfwzNsI0HH0uPHhZv6npUoGgI7Pt2Vw7KOilZKCnRBztizQpLb+KUTTBKJT1YDN
 TsA10rQcmdVMd0Qjry0O0V2Hn3EWwA/1rMl29/6lf5dTcCdQVW1FK2X7B3DXh71D
 rZKkZYXkXRIcMRzy7JybumIuXfB21nw2jD32ItLFjYjrj7y0H3zxYuLEyocexkc=
 =pFjm
 -----END PGP SIGNATURE-----

Merge tag 'stable/for-linus-4.0-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen bug fixes from David Vrabel:

 - fix a PV regression in 3.19.

 - fix a dom0 crash on hosts with large numbers of PIRQs.

 - prevent pcifront from disabling memory or I/O port access, which may
   trigger host crashes.

* tag 'stable/for-linus-4.0-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen-pciback: limit guest control of command register
  xen/events: avoid NULL pointer dereference in dom0 on large machines
  xen: Remove trailing semicolon from xenbus_register_frontend() definition
  x86/xen: correct bug in p2m list initialization
2015-03-13 13:34:38 -07:00
Linus Torvalds
bbc54a00d8 sound fixes for 4.0-rc4
This is a round of HD-audio fixes: there are a long-standing
 regression fix and a few more device/codec-specific quirks.
 In addition, a couple of FireWire regression fixes, a USB-audio quirk
 for Roland UA-22 and a sanity check in API for user-defined control
 elements.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVApo5AAoJEGwxgFQ9KSmk938P/2DH0ndVhmYqlsmYwJ8K+quw
 VM5OmV17jM1AfLb1bEFDGzR/bmSgBxQEmJW1OtvEjyzhvprXHXlSphY8nt+VXPpi
 mkQVfq+AXP1U2SGFsYKxVG+1nHpT28jbvNHE7P5I2uDhKkglXZ07Zpeo9zfQef2U
 wIZ2cI0OKsUKcUAw+uDk4ZVr8RLuYRKhNSjp604DYcjgi7zCKuPItEKt96/+X8l/
 BWZAt0heRB8QtzpJWnSMpt6cNKpjCCSKqhhoA6QfkSNIdDjhjeKF69AO9FKeTRm0
 NsdYOXgtT5OoJgNQ6Emdg/Qq0FVap/KuSBl/jun3ufEIwTv8as9N+/syn+E5mcbD
 hAvmgzcToxEWcIlKS/zn5du4wYdbx8e6RsGKPswXco2O0iWNjH4tFads8BrACfE1
 MbWqO5WIunU7woD2R0sN2mg4mS5C+nohGP28aZ1Xme0nSN3/oCuYnHDLK4h/X09O
 haa+9GZlexix+gdwl1lF8AEUoG7SljaQ/zYbQhzLvkmuRHW2COnB8kZQUaAOeccU
 Av4igbow50jxTdEtgrtCogowUvepeqX8+wxl79Ahu1gLohQKoKkxEgnjDaz31DZT
 Ph3yhfU3/DkZzYjMWLVM9v9qsduPbrOIt9dSwO/6IxuuTGRaN4Nvz3CLJpvu9534
 BAA8xZui5elKl26n0x69
 =FIie
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This is a round of HD-audio fixes: there are a long-standing
  regression fix and a few more device/codec-specific quirks.

  In addition, a couple of FireWire regression fixes, a USB-audio quirk
  for Roland UA-22 and a sanity check in API for user-defined control
  elements"

* tag 'sound-4.0-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Don't access stereo amps for mono channel widgets
  ALSA: hda - Add workaround for MacBook Air 5,2 built-in mic
  ALSA: hda - Set single_adc_amp flag for CS420x codecs
  ALSA: snd-usb: add quirks for Roland UA-22
  ALSA: control: Add sanity checks for user ctl id name string
  ALSA: hda - Fix built-in mic on Compaq Presario CQ60
  ALSA: firewire-lib: leave unit reference counting completely
  Revert "ALSA: dice: fix wrong offsets for Dice interface"
  ALSA: hda - Fix regression of HD-audio controller fallback modes
2015-03-13 13:30:00 -07:00
Eric Dumazet
c8e2c80d7e inet_diag: fix possible overflow in inet_diag_dump_one_icsk()
inet_diag_dump_one_icsk() allocates too small skb.

Add inet_sk_attr_size() helper right before inet_sk_diag_fill()
so that it can be updated if/when new attributes are added.

iproute2/ss currently does not use this dump_one() interface,
this might explain nobody noticed this problem yet.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-13 15:54:27 -04:00
Linus Torvalds
3d52c5bdbe DeviceTree fixes for 4.0-rc:
- Fix for stdout-path option parsing with added unittest
 
 - Fix for stdout-path interaction with earlycon
 
 - Several DT unittest fixes
 
 - Fix Sparc allmodconfig build error on
   of_platform_register_reconfig_notifier
 
 - Several DT overlay kconfig and build warning fixes
 
 - Several DT binding documentation updates
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVAvyzAAoJEMhvYp4jgsXiKSAIALRxbtnjPu13+1vD6C8xcTsN
 TsD/GoIOtBjVlEPDFrKXOhRXkxXbgONDSveQYhm0iWr30ECloVoikIxF2NPty2nR
 B3xN7WbbmeEBl1ubGVw60xs/M1cF7d11UpjRabjlVqFpMll5LufX0+ZAbLQ+Brsl
 5zSGxIonG8pRxFy0yi6++76cyywn3XVYoUTMb+nKaiSzXvOBhGnm5MXruiynVH9m
 enVKop8rhizfUdvSHFfxxipFK9L3+EYx0yxaZWW9tvYh6yHhb/GZxQcuz1Rn5KUJ
 wY0Y4PJdusLOO0FNprZmLsi3GxEXOIBS0bcPCXQAqD/Kr46waVOETajyIItMYnY=
 =nyIQ
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-fixes-for-4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull DeviceTree fixes from Rob Herring:

 - fix for stdout-path option parsing with added unittest

 - fix for stdout-path interaction with earlycon

 - several DT unittest fixes

 - fix Sparc allmodconfig build error on of_platform_register_reconfig_notifier

 - several DT overlay kconfig and build warning fixes

 - several DT binding documentation updates

* tag 'devicetree-fixes-for-4.0' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  of/platform: Fix sparc:allmodconfig build
  of: unittest: Add options string testcase variants
  of: fix handling of '/' in options for of_find_node_by_path()
  of/unittest: Fix the wrong expected value in of_selftest_property_string
  of/unittest: remove the duplicate of_changeset_init
  dt: submitting-patches: clarify that DT maintainers are to be cced on bindings
  of: unittest: fix I2C dependency
  of/overlay: Remove unused variable
  Documentation: DT: Renamed of-serial.txt to 8250.txt
  of: Fix premature bootconsole disable with 'stdout-path'
  serial: add device tree binding documentation for ETRAX FS UART
  of/overlay: Directly include idr.h
  of: Drop superfluous dependance for OF_OVERLAY
  of: Add vendor prefix for Arasan
  of: Add prompt for OF_OVERLAY config
2015-03-13 11:10:10 -07:00
Linus Torvalds
f788baadbd Merge branch 'gadget' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull gadgetfs fixes from Al Viro:
 "Assorted fixes around AIO on gadgetfs: leaks, use-after-free, troubles
  caused by ->f_op flipping"

* 'gadget' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  gadgetfs: really get rid of switching ->f_op
  gadgetfs: get rid of flipping ->f_op in ep_config()
  gadget: switch ep_io_operations to ->read_iter/->write_iter
  gadgetfs: use-after-free in ->aio_read()
  gadget/function/f_fs.c: switch to ->{read,write}_iter()
  gadget/function/f_fs.c: use put iov_iter into io_data
  gadget/function/f_fs.c: close leaks
  move iov_iter.c from mm/ to lib/
  new helper: dup_iter()
2015-03-13 10:55:32 -07:00
Fabio Estevam
a2fe37b69d Revert "net: fec: fix the warning found by dma debug"
This reverts commit 2b995f6398.

Панов Андрей reported the following regression:

"Commit 2b995f6398 in 4.0.0-rc3 introduces a
nasty bug in transmit, corrupting packets.

To reproduce:

$ dd if=/dev/zero of=zeros bs=1M count=20
$ md5sum -b zeros
8f4e33f3dc3e414ff94e5fb6905cba8c *zeros

This checksum is correct.

Copy file "zeros" to another host with NFS, and it gets corrupted, checksum is
changed.
File should be big, small amounts of transmit isn't affected.

I use an i.MX6 Quad board.

If this commit is reverted, all works fine."

Reported-by: Панов Андрей <rockford@yandex.ru>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-13 13:10:37 -04:00
Alexey Kodanev
40fb70f3aa vxlan: fix wrong usage of VXLAN_VID_MASK
commit dfd8645ea1 wrongly assumes that VXLAN_VDI_MASK includes
eight lower order reserved bits of VNI field that are using for remote
checksum offload.

Right now, when VNI number greater then 0xffff, vxlan_udp_encap_recv()
will always return with 'bad_flag' error, reducing the usable vni range
from 0..16777215 to 0..65535. Also, it doesn't really check whether RCO
bits processed or not.

Fix it by adding new VNI mask which has all 32 bits of VNI field:
24 bits for id and 8 bits for other usage.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-13 13:08:07 -04:00
Ameen Ali
b57578b3d5 tulip_core.c : out-of-bounds check.
Array index 'j' is used before limits check.

Suggest put limit check before index use.

Signed-off-by : <Ameenali023@gmail.com>

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-13 12:43:25 -04:00
Guenter Roeck
a697c2efba of/platform: Fix sparc:allmodconfig build
sparc:allmodconfig fails to build with:

drivers/built-in.o: In function `platform_bus_init':
(.init.text+0x3684): undefined reference to `of_platform_register_reconfig_notifier'

of_platform_register_reconfig_notifier is only declared if both OF_ADDRESS
and OF_DYNAMIC are configured. Yet, the include file only declares a dummy
function if OF_DYNAMIC is not configured. The sparc architecture does not
configure OF_ADDRESS, but does configure OF_DYNAMIC, causing above error.

Fixes: 801d728c10 ("of/reconfig: Add OF_DYNAMIC notifier for platform_bus_type")
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rob Herring <robh@kernel.org>
2015-03-13 09:45:24 -05:00
Wincy Van
670125bda1 KVM: VMX: Set msr bitmap correctly if vcpu is in guest mode
In commit 3af18d9c5f ("KVM: nVMX: Prepare for using hardware MSR bitmap"),
we are setting MSR_BITMAP in prepare_vmcs02 if we should use hardware. This
is not enough since the field will be modified by following vmx_set_efer.

Fix this by setting vmx_msr_bitmap_nested in vmx_set_msr_bitmap if vcpu is
in guest mode.

Signed-off-by: Wincy Van <fanwenyi0529@gmail.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2015-03-13 09:24:51 -03:00
Oleg Nesterov
f4c3686386 x86/fpu: Drop_fpu() should not assume that tsk equals current
drop_fpu() does clear_used_math() and usually this is correct
because tsk == current.

However switch_fpu_finish()->restore_fpu_checking() is called before
__switch_to() updates the "current_task" variable. If it fails,
we will wrongly clear the PF_USED_MATH flag of the previous task.

So use clear_stopped_child_used_math() instead.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: <stable@vger.kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pekka Riikonen <priikone@iki.fi>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150309171041.GB11388@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-03-13 12:44:29 +01:00
Oleg Nesterov
a7c80ebcac x86/fpu: Avoid math_state_restore() without used_math() in __restore_xstate_sig()
math_state_restore() assumes it is called with irqs disabled,
but this is not true if the caller is __restore_xstate_sig().

This means that if ia32_fxstate == T and __copy_from_user()
fails, __restore_xstate_sig() returns with irqs disabled too.

This triggers:

  BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:41
   dump_stack
   ___might_sleep
   ? _raw_spin_unlock_irqrestore
   __might_sleep
   down_read
   ? _raw_spin_unlock_irqrestore
   print_vma_addr
   signal_fault
   sys32_rt_sigreturn

Change __restore_xstate_sig() to call set_used_math()
unconditionally. This avoids enabling and disabling interrupts
in math_state_restore(). If copy_from_user() fails, we can
simply do fpu_finit() by hand.

[ Note: this is only the first step. math_state_restore() should
        not check used_math(), it should set this flag. While
	init_fpu() should simply die. ]

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pekka Riikonen <priikone@iki.fi>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150307153844.GB25954@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-03-13 12:44:28 +01:00
Wei Yongjun
b52104e509 arm/arm64: KVM: fix missing unlock on error in kvm_vgic_create()
Add the missing unlock before return from function kvm_vgic_create()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
2015-03-13 11:40:57 +01:00
Stephan Mueller
ccfe8c3f7e crypto: aesni - fix memory usage in GCM decryption
The kernel crypto API logic requires the caller to provide the
length of (ciphertext || authentication tag) as cryptlen for the
AEAD decryption operation. Thus, the cipher implementation must
calculate the size of the plaintext output itself and cannot simply use
cryptlen.

The RFC4106 GCM decryption operation tries to overwrite cryptlen memory
in req->dst. As the destination buffer for decryption only needs to hold
the plaintext memory but cryptlen references the input buffer holding
(ciphertext || authentication tag), the assumption of the destination
buffer length in RFC4106 GCM operation leads to a too large size. This
patch simply uses the already calculated plaintext size.

In addition, this patch fixes the offset calculation of the AAD buffer
pointer: as mentioned before, cryptlen already includes the size of the
tag. Thus, the tag does not need to be added. With the addition, the AAD
will be written beyond the already allocated buffer.

Note, this fixes a kernel crash that can be triggered from user space
via AF_ALG(aead) -- simply use the libkcapi test application
from [1] and update it to use rfc4106-gcm-aes.

Using [1], the changes were tested using CAVS vectors to demonstrate
that the crypto operation still delivers the right results.

[1] http://www.chronox.de/libkcapi.html

CC: Tadeusz Struk <tadeusz.struk@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2015-03-13 21:32:21 +11:00
Leon Yu
d415a7f1c1 perf: Fix context leak in put_event()
Commit:

  a83fe28e2e ("perf: Fix put_event() ctx lock")

changed the locking logic in put_event() by replacing mutex_lock_nested()
with perf_event_ctx_lock_nested(), but didn't fix the subsequent
mutex_unlock() with a correct counterpart, perf_event_ctx_unlock().

Contexts are thus leaked as a result of incremented refcount
in perf_event_ctx_lock_nested().

Signed-off-by: Leon Yu <chianglungyu@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Fixes: a83fe28e2e ("perf: Fix put_event() ctx lock")
Link: http://lkml.kernel.org/r/1424954613-5034-1-git-send-email-chianglungyu@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-03-13 10:02:18 +01:00
Takashi Iwai
ef403edb75 ALSA: hda - Don't access stereo amps for mono channel widgets
The current HDA generic parser initializes / modifies the amp values
always in stereo, but this seems causing the problem on ALC3229 codec
that has a few mono channel widgets: namely, these mono widgets react
to actions for both channels equally.

In the driver code, we do care the mono channel and create a control
only for the left channel (as defined in HD-audio spec) for such a
node.  When the control is updated, only the left channel value is
changed.  However, in the resume, the right channel value is also
restored from the initial value we took as stereo, and this overwrites
the left channel value.  This ends up being the silent output as the
right channel has been never touched and remains muted.

This patch covers the places where unconditional stereo amp accesses
are done and converts to the conditional accesses.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94581
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-13 07:37:21 +01:00
Michael S. Tsirkin
a4994b810d uapi/virtio_scsi: allow overriding CDB/SENSE size
QEMU wants to use virtio scsi structures with
a different VIRTIO_SCSI_CDB_SIZE/VIRTIO_SCSI_SENSE_SIZE,
let's add ifdefs to allow overriding them.

Keep the old defines under new names:
VIRTIO_SCSI_CDB_DEFAULT_SIZE/VIRTIO_SCSI_SENSE_DEFAULT_SIZE,
since that's what these values really are:
defaults for cdb/sense size fields.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-03-13 15:55:43 +10:30
Michael S. Tsirkin
87e7bf1450 virtio_mmio: generation support
virtio_mmio currently lacks generation support which
makes multi-byte field access racy.
Fix by getting the value at offset 0xfc for version 2
devices. Nothing we can do for version 1, so return
generation id 0.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-03-13 15:55:43 +10:30
Michael S. Tsirkin
71e4b8bf04 virtio_rpmsg: set DRIVER_OK before using device
virtio spec requires that all drivers set DRIVER_OK
before using devices. While rpmsg isn't yet
included in the virtio 1 spec, previous spec versions
also required this.

virtio rpmsg violates this rule: is calls kick
before setting DRIVER_OK.

The fix isn't trivial since simply calling virtio_device_ready earlier
would mean we might get an interrupt in parallel with adding buffers.

Instead, split kick out to prepare+notify calls.  prepare before
virtio_device_ready - when we know we won't get interrupts. notify right
afterwards.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-03-13 15:55:42 +10:30