aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-12-05drm/i915: don't always do full mode sets when infoframes are enabledJesse Barnes1-4/+6
Partial revert of commit 206645910b9796bff13fcdb67bdca166b724ba62 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Wed Nov 5 14:26:09 2014 -0800 drm/i915: check for audio and infoframe changes across mode sets v2 References: https://bugs.freedesktop.org/show_bug.cgi?id=86683 Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-by: Li Xu <li.l.xu@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2014-12-04Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2-13/+11
Pull drm intel fixes from Dave Airlie: "Two intel stable fixes, that should be it from me for this round" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/i915: Unlock panel even when LVDS is disabled drm/i915: More cautious with pch fifo underruns
2014-12-04Merge tag 'pm+acpi-3.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pmLinus Torvalds1-1/+2
Pull ACPI backlight fix from Rafael Wysocki: "This is a simple fix for an ACPI backlight regression introduced by a recent commit that overlooked a corner case which should have been taken into account" * tag 'pm+acpi-3.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / video: update condition to check if device is in _DOD list
2014-12-05Merge tag 'drm-intel-fixes-2014-12-04' of git://anongit.freedesktop.org/drm-intel into drm-fixesDave Airlie2-13/+11
Silence some pch fifo underrun reports and panel locking backtraces, both cc: stable. * tag 'drm-intel-fixes-2014-12-04' of git://anongit.freedesktop.org/drm-intel: drm/i915: Unlock panel even when LVDS is disabled drm/i915: More cautious with pch fifo underruns
2014-12-05Merge tag 'drm-intel-next-fixes-2014-12-04' of git://anongit.freedesktop.org/drm-intel into drm-nextDave Airlie9-93/+230
Fixes for 3.20. I did stick the gen3/4 reset work from Ville in because we have an awful lot of gen4 mesa hangs, and with this reset should also work on vintage i965g/gm (we already have reset for g4x/gen4.5). So should help to appease users suffering from these hangs. Otherwise all over. This is the last 3.20 pull from me, from here on Jani will take over. By Ville Syrjälä (8) and others * tag 'drm-intel-next-fixes-2014-12-04' of git://anongit.freedesktop.org/drm-intel: drm/i915: Reject modeset when the same digital port is used more than once drm/i915: mask RPS IRQs properly when disabling RPS drm/i915: Tune down spurious CRC interrupt warning drm/i915: Fix context object leak for legacy contexts drm/i915/skl: Update in Gen9 multi-engine forcewake range drm/i915/eDP: When enabling panel VDD cancel pending disable worker drm/i915: Handle runtime pm in the CRC setup code drm/i915: Disable crtcs gracefully before GPU reset on gen3/4 drm/i915: Grab modeset locks for GPU rest on pre-ctg drm/i915: Implement GPU reset for g33 drm/i915: Implement GPU reset for 915/945 drm/i915: Restore the display config after a GPU reset on gen4 drm/i915: Fix gen4 GPU reset drm/i915: Stop gathering error states for CS error interrupts drm/i915: Disallow pin ioctl completely for kms drivers drm/i915: Only warn the first time we attempt to mmio whilst suspended drm/i915/chv: Enable AVI, SPD and HDMI infoframes for CHV. drm/i915: Don't clobber crtc->new_config when nothing changes
2014-12-05Merge branch 'amdkfd-next-3.19' of git://people.freedesktop.org/~gabbayo/linux into drm-nextDave Airlie3-4/+9
Just three more fixes for 3.19. This is the last request until -rc1. I will have our QA team run a full HSA stack test on 3.19-rc1 and if we find problems, I will send a fixes pull request. * 'amdkfd-next-3.19' of git://people.freedesktop.org/~gabbayo/linux: amdkfd: Set *buffer_ptr to NULL in case of error amdkfd: use atomic allocations within srcu callbacks amdkfd: use sizeof(long) granularity for the pasid bitmask
2014-12-05Merge branch 'drm-next-3.19-wip' of git://people.freedesktop.org/~agd5f/linux into drm-nextDave Airlie28-226/+324
- More cursor and hotspot handling fixes - Fix some typos in the new smc fan control code and enable on CI - VM and CS cleanups * 'drm-next-3.19-wip' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: enable smc fan control on CI drm/radeon: use pointers instead of indexes for CS chunks drm/radeon: remove duplicates check drm/ttm: optionally move duplicates to a separate list drm/radeon: check the right ring in radeon_evict_flags() drm/radeon: fix copy paste typos in fan control for si/ci drm/radeon: Hide cursor on CRTCs used by fbdev (v2) drm/radeon: add spinlock for BO_VA status protection (v2) drm/radeon: fence PT updates as shared drm/radeon: rename radeon_cs_reloc to radeon_bo_list drm/radeon: drop the handle from radeon_cs_reloc drm/radeon drop gobj from radeon_cs_reloc drm/radeon: fix typo in new fan control registers for SI/CI drm/radeon: sync all BOs involved in a CS drm/radeon: Move hotspot handling out of radeon_set_cursor drm/radeon: Re-show the cursor after a modeset
2014-12-04Merge tag 'media/v3.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds6-32/+28
Pull media fixes from Mauro Carvalho Chehab: "A core fix and some driver fixes: - regression fix in Remote Controller core affecting RC6 protocol handling - fix video buffer handling in cx23885 - race fix in solo6x10 - fix image selection in smiapp - fix reported payload size on s2255drv - two updates for MAINTAINERS file" * tag 'media/v3.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] rc-core: fix toggle handling in the rc6 decoder MAINTAINERS: Update mchehab's addresses [media] cx23885: use sg = sg_next(sg) instead of sg++ [media] s2255drv: fix payload size for JPG, MJPEG [media] Update MAINTAINERS for solo6x10 [media] solo6x10: fix a race in IRQ handler [media] smiapp: Only some selection targets are settable
2014-12-04uapi: fix to export linux/vm_sockets.hMasahiro Yamada1-1/+1
A typo "header=y" was introduced by commit 7071cf7fc435 ("uapi: add missing network related headers to kbuild"). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: David Miller <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-04i2c: cadence: Set the hardware time-out register to maximum valueVishnu Motghare1-0/+11
Cadence I2C controller has bug wherein it generates invalid read transactions after timeout in master receiver mode. This driver does not use the HW timeout and this interrupt is disabled but the feature itself cannot be disabled. Hence, this patch writes the maximum value (0xFF) to this register. This is one of the workarounds to this bug and it will not avoid the issue completely but reduces the chances of error. Signed-off-by: Vishnu Motghare <vishnum@xilinx.com> Signed-off-by: Harini Katakam <harinik@xilinx.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
2014-12-04i2c: davinci: generate STP always when NACK is receivedGrygorii Strashko1-5/+3
According to I2C specification the NACK should be handled as follows: "When SDA remains HIGH during this ninth clock pulse, this is defined as the Not Acknowledge signal. The master can then generate either a STOP condition to abort the transfer, or a repeated START condition to start a new transfer." [I2C spec Rev. 6, 3.1.6: http://www.nxp.com/documents/user_manual/UM10204.pdf] Currently the Davinci i2c driver interrupts the transfer on receipt of a NACK but fails to send a STOP in some situations and so makes the bus stuck until next I2C IP reset (idle/enable). For example, the issue will happen during SMBus read transfer which consists from two i2c messages write command/address and read data: S Slave Address Wr A Command Code A Sr Slave Address Rd A D1..Dn A P <--- write -----------------------> <--- read ---------------------> The I2C client device will send NACK if it can't recognize "Command Code" and it's expected from I2C master to generate STP in this case. But now, Davinci i2C driver will just exit with -EREMOTEIO and STP will not be generated. Hence, fix it by generating Stop condition (STP) always when NACK is received. This patch fixes Davinci I2C in the same way it was done for OMAP I2C commit cda2109a26eb ("i2c: omap: query STP always when NACK is received"). Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reported-by: Hein Tibosch <hein_tibosch@yahoo.es> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
2014-12-04ahci: disable MSI on SAMSUNG 0xa800 SSDTejun Heo1-0/+1
Just like 0x1600 which got blacklisted by 66a7cbc303f4 ("ahci: disable MSI instead of NCQ on Samsung pci-e SSDs on macbooks"), 0xa800 chokes on NCQ commands if MSI is enabled. Disable MSI. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Dominik Mierzejewski <dominik@greysector.net> Link: https://bugzilla.kernel.org/show_bug.cgi?id=89171 Cc: stable@vger.kernel.org
2014-12-04drm: Fix memory leak at error path of drm_read()Takashi Iwai1-0/+1
Note that the read manpages explicitly states that the read position is undefined on error. Since EFAULT is just a userspace bug we are therefore fine with just dropping the event on the floor. Signed-off-by: Takashi Iwai <tiwai@suse.de> [danvet: Add note that just dropping the event is ok.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-04amdkfd: Set *buffer_ptr to NULL in case of errorOded Gabbay1-1/+7
In function acquire_packet_buffer() we may return -ENOMEM. In that case, we should set the *buffer_ptr to NULL, so that calling functions which check the *buffer_ptr value as a criteria for success, will know that acquire_packet_buffer() failed. Reviewed-by: Alexey Skidanov <alexey.skidanov@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2014-12-04drm/Documentation: Fix rowspan value in drm-kms-propertiesSean Paul1-1/+1
The "DRM" rowspan wasn't updated in commit cc7096fb6d1d (drm/mode: document path property and function to set it. (v1.1)), so increment it by one to fix the table. Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-03context_tracking: Restore previous state in schedule_userAndy Lutomirski1-2/+6
It appears that some SCHEDULE_USER (asm for schedule_user) callers in arch/x86/kernel/entry_64.S are called from RCU kernel context, and schedule_user will return in RCU user context. This causes RCU warnings and possible failures. This is intended to be a minimal fix suitable for 3.18. Reported-and-tested-by: Dave Jones <davej@redhat.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-03drm/radeon: enable smc fan control on CIAlex Deucher1-1/+0
This seems to work well on CI boards after fixing the last few bugs noticed by Chernovsky Oleg. On boards with a high default fan speed this should reduce fan noise. Manual fan control is not enabled yet. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: use pointers instead of indexes for CS chunksChristian König9-55/+53
Nobody is interested at which index the chunk is. What's needed is a pointer to the chunk. Remove unused chunk_id field as well. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: remove duplicates checkChristian König6-34/+16
Completely unnecessary since the ww_mutex used to reserve a buffer can detect double reservations from the same thread anyway. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/ttm: optionally move duplicates to a separate listChristian König7-8/+26
This patch adds an optional list_head parameter to ttm_eu_reserve_buffers. If specified duplicates in the execbuf list are no longer reported as errors, but moved to this list instead. Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: check the right ring in radeon_evict_flags()Alex Deucher1-1/+1
Check the that ring we are using for copies is functional rather than the GFX ring. On newer asics we use the DMA ring for bo moves. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2014-12-03drm/radeon: fix copy paste typos in fan control for si/ciAlex Deucher2-6/+6
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linuxLinus Torvalds2-6/+6
Pull i2c bugfixes from Wolfram Sang: "A few driver bugfixes for 3.18" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: omap: fix i207 errata handling i2c: designware: prevent early stop on TX FIFO empty i2c: omap: fix NACK and Arbitration Lost irq handling
2014-12-03Merge tag 'pci-v3.18-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pciLinus Torvalds1-8/+20
Pull PCI fix from Bjorn Helgaas: "This fixes a Tegra20 regression that we introduced during the v3.18 merge window" * tag 'pci-v3.18-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: tegra: Use physical range for I/O mapping
2014-12-03Merge tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linuxLinus Torvalds1-2/+0
Pull devicetree bugfix from Grant Likely: "One more bug fix for v3.18. I debated whether or not to send you this merge request because we're at such a late rc. The bug isn't critical in that there is only one system known to be affected and the patch is easy to backport. The codepath is used by pretty much every DT based system, so there is risk a of regression (it /should/ be safe, but I've been bitten by stuff that should be safe before). I've had it in linux-next for a week and haven't received any complaints. I think it probably should just be merged right away rather than waiting for the merge window and backporting. It does fix a real bug and the code is theoretically safer after the change. I can't think of any situation where it would be dangerous to reserve the DT memory an extra time. Summary from tag: Single bugfix for boot failure seen in the wild. The memory reserve code tries to be clever about reserving the FDT, but it should just go ahead and reserve it unconditionally to avoid the problem of partial overlap described in the patch" * tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux: of/fdt: memblock_reserve /memreserve/ regions in the case of partial overlap
2014-12-03Merge branch 'for-linus' of git://git.kernel.dk/linux-blockLinus Torvalds1-6/+7
Pull block core regression fix from Jens Axboe: "Single fix for a regression introduced in this development cycle, where dm on top of dif/dix is broken. From Darrick Wong" * 'for-linus' of git://git.kernel.dk/linux-block: block: fix regression where bio_integrity_process uses wrong bio_vec iterator
2014-12-03Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds10-45/+88
Pull drm fixes from Dave Airlie: "Radeon and Nouveau fixes: So nouveau had a few regression introduced, Ben and Maarten finally tracked down the one that was causing problems on my MacBookPro, also nvidia gave some info on the an engine we were using incorrectly, so disable our use of it, and one regresion with pci hotplug affecting optimus users. Radeon has an oops fixs, sync fix, and one workaround to avoid broken functionality on 32-bit x86, this needs better root causing and a better fix, but the bandaid is a lot safer at this point" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon: kernel panic in drm_calc_vbltimestamp_from_scanoutpos with 3.18.0-rc6 drm/radeon: Ignore RADEON_GEM_GTT_WC on 32-bit x86 drm/radeon: sync all BOs involved in a CS v2 nouveau: move the hotplug ignore to correct place. drm/nouveau/gf116: remove copy1 engine drm/nouveau: prevent stale fence->channel pointers, and protect with rcu drm/nouveau/fifo/g84-: ack non-stall interrupt before handling it
2014-12-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds7-67/+73
Pull networking fixes from David Miller: 1) Fill in ethtool link parameters for all link types in cxgb4, from Hariprasad Shenai. 2) Fix probe regressions in stmmac driver, from Huacai Chen. 3) Network namespace leaks on errirs in rtnetlink, from Nicolas Dichtel. 4) Remove erroneous BUG check which can actually trigger legitimately, in xen-netfront. From Seth Forshee. 5) Validate length of IFLA_BOND_ARP_IP_TARGET netlink attributes, from Thomas Grag. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: cxgb4: Fill in supported link mode for SFP modules xen-netfront: Remove BUGs on paged skb data which crosses a page boundary sh_eth: Fix sleeping function called from invalid context stmmac: platform: Move plat_dat checking earlier sh_eth: Fix skb alloc size and alignment adjust rule. rtnetlink: release net refcnt on error in do_setlink() bond: Check length of IFLA_BOND_ARP_IP_TARGET attributes
2014-12-03drm/radeon: Hide cursor on CRTCs used by fbdev (v2)Michel Dänzer1-1/+31
Since we are now preserving the cursor across modesets, the cursor could be left over in console if e.g. X crashed. v2: add comment about universal plane support Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: add spinlock for BO_VA status protection (v2)Christian König2-6/+33
Stop using the VM mutex for this v2: fix typo in comment Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: fence PT updates as sharedChristian König1-9/+19
The BO_VA contains everything necessary. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: rename radeon_cs_reloc to radeon_bo_listChristian König12-42/+42
Better match what it is actually doing. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: drop the handle from radeon_cs_relocChristian König3-6/+3
It's only used for duplicate check and that can be done on the original as well. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon drop gobj from radeon_cs_relocChristian König3-9/+9
It's only used once after initializing and that ptr can be calculated from the BO as well. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: fix typo in new fan control registers for SI/CIAlex Deucher2-8/+8
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: sync all BOs involved in a CSChristian König1-12/+7
Not just the userspace relocs, otherwise we won't wait for a swapped out page tables to be swapped in again. Signed-off-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: Move hotspot handling out of radeon_set_cursorMichel Dänzer1-19/+17
It's only needed in radeon_crtc_cursor_set2. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03drm/radeon: Re-show the cursor after a modesetMichel Dänzer4-24/+68
Setting a mode seems to clear the cursor registers, so we need to re-program them to make sure the cursor is visible. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-12-03Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-securityLinus Torvalds5-34/+36
Pull keyring/nfs fixes from James Morris: "From David Howells: The first one fixes the handling of maximum buffer size for key descriptions, fixing the size at 4095 + NUL char rather than whatever PAGE_SIZE happens to be and permits you to read back the full description without it getting clipped because some extra information got prepended. The second and third fix a bug in NFS idmapper handling whereby a key representing a mapping between an id and a name expires and causing EKEYEXPIRED to be seen internally in NFS (which prevents the mapping from happening) rather than re-looking up the mapping" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: KEYS: request_key() should reget expired keys rather than give EKEYEXPIRED KEYS: Simplify KEYRING_SEARCH_{NO,DO}_STATE_CHECK flags KEYS: Fix the size of the key description passed to/from userspace
2014-12-03Merge branch 'akpm' (patches from Andrew Morton)Linus Torvalds11-41/+55
Merge misc fixes from Andrew Morton: "10 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: slab: fix nodeid bounds check for non-contiguous node IDs lib/genalloc.c: export devm_gen_pool_create() for modules mm: fix anon_vma_clone() error treatment mm: fix swapoff hang after page migration and fork fat: fix oops on corrupted vfat fs ipc/sem.c: fully initialize sem_array before making it visible drivers/input/evdev.c: don't kfree() a vmalloc address mm/vmpressure.c: fix race in vmpressure_work_fn() mm: frontswap: invalidate expired data on a dup-store failure mm: do not overwrite reserved pages counter at show_mem()
2014-12-03slab: fix nodeid bounds check for non-contiguous node IDsPaul Mackerras1-1/+1
The bounds check for nodeid in ____cache_alloc_node gives false positives on machines where the node IDs are not contiguous, leading to a panic at boot time. For example, on a POWER8 machine the node IDs are typically 0, 1, 16 and 17. This means that num_online_nodes() returns 4, so when ____cache_alloc_node is called with nodeid = 16 the VM_BUG_ON triggers, like this: kernel BUG at /home/paulus/kernel/kvm/mm/slab.c:3079! Call Trace: .____cache_alloc_node+0x5c/0x270 (unreliable) .kmem_cache_alloc_node_trace+0xdc/0x360 .init_list+0x3c/0x128 .kmem_cache_init+0x1dc/0x258 .start_kernel+0x2a0/0x568 start_here_common+0x20/0xa8 To fix this, we instead compare the nodeid with MAX_NUMNODES, and additionally make sure it isn't negative (since nodeid is an int). The check is there mainly to protect the array dereference in the get_node() call in the next line, and the array being dereferenced is of size MAX_NUMNODES. If the nodeid is in range but invalid (for example if the node is off-line), the BUG_ON in the next line will catch that. Fixes: 14e50c6a9bc2 ("mm: slab: Verify the nodeid passed to ____cache_alloc_node") Signed-off-by: Paul Mackerras <paulus@samba.org> Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> Reviewed-by: Pekka Enberg <penberg@kernel.org> Acked-by: David Rientjes <rientjes@google.com> Cc: Christoph Lameter <cl@linux.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-03lib/genalloc.c: export devm_gen_pool_create() for modulesMichal Simek1-0/+1
Modules can use this function for creating pool. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Olof Johansson <olof@lixom.net> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-03mm: fix anon_vma_clone() error treatmentDaniel Forrest2-5/+11
Andrew Morton noticed that the error return from anon_vma_clone() was being dropped and replaced with -ENOMEM (which is not itself a bug because the only error return value from anon_vma_clone() is -ENOMEM). I did an audit of callers of anon_vma_clone() and discovered an actual bug where the error return was being lost. In __split_vma(), between Linux 3.11 and 3.12 the code was changed so the err variable is used before the call to anon_vma_clone() and the default initial value of -ENOMEM is overwritten. So a failure of anon_vma_clone() will return success since err at this point is now zero. Below is a patch which fixes this bug and also propagates the error return value from anon_vma_clone() in all cases. Fixes: ef0855d334e1 ("mm: mempolicy: turn vma_set_policy() into vma_dup_policy()") Signed-off-by: Daniel Forrest <dan.forrest@ssec.wisc.edu> Reviewed-by: Michal Hocko <mhocko@suse.cz> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Rik van Riel <riel@redhat.com> Cc: Tim Hartrick <tim@edgecast.com> Cc: Hugh Dickins <hughd@google.com> Cc: Michel Lespinasse <walken@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: <stable@vger.kernel.org> [3.12+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-03mm: fix swapoff hang after page migration and forkHugh Dickins1-13/+13
I've been seeing swapoff hangs in recent testing: it's cycling around trying unsuccessfully to find an mm for some remaining pages of swap. I have been exercising swap and page migration more heavily recently, and now notice a long-standing error in copy_one_pte(): it's trying to add dst_mm to swapoff's mmlist when it finds a swap entry, but is doing so even when it's a migration entry or an hwpoison entry. Which wouldn't matter much, except it adds dst_mm next to src_mm, assuming src_mm is already on the mmlist: which may not be so. Then if pages are later swapped out from dst_mm, swapoff won't be able to find where to replace them. There's already a !non_swap_entry() test for stats: move that up before the swap_duplicate() and the addition to mmlist. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Kelley Nielsen <kelleynnn@gmail.com> Cc: <stable@vger.kernel.org> [2.6.18+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-03fat: fix oops on corrupted vfat fsAl Viro1-9/+11
a) don't bother with ->d_time for positives - we only check it for negatives anyway. b) make sure to set it at unlink and rmdir time - at *that* point soon-to-be negative dentry matches then-current directory contents c) don't go into renaming of old alias in vfat_lookup() unless it has the same parent (which it will, unless we are seeing corrupted image) [hirofumi@mail.parknet.co.jp: make change minimum, don't call d_move() for dir] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Cc: <stable@vger.kernel.org> [3.17.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-03ipc/sem.c: fully initialize sem_array before making it visibleManfred Spraul1-7/+8
ipc_addid() makes a new ipc identifier visible to everyone. New objects start as locked, so that the caller can complete the initialization after the call. Within struct sem_array, at least sma->sem_base and sma->sem_nsems are accessed without any locks, therefore this approach doesn't work. Thus: Move the ipc_addid() to the end of the initialization. Signed-off-by: Manfred Spraul <manfred@colorfullife.com> Reported-by: Rik van Riel <riel@redhat.com> Acked-by: Rik van Riel <riel@redhat.com> Acked-by: Davidlohr Bueso <dave@stgolabs.net> Acked-by: Rafael Aquini <aquini@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-03drivers/input/evdev.c: don't kfree() a vmalloc addressAndrew Morton1-1/+1
If kzalloc() failed and then evdev_open_device() fails, evdev_open() will pass a vmalloc'ed pointer to kfree. This might fix https://bugzilla.kernel.org/show_bug.cgi?id=88401, where there was a crash in kfree(). Reported-by: Christian Casteyde <casteyde.christian@free.fr> Belatedly-Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Henrik Rydberg <rydberg@euromail.se> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-12-03drm/edid: Restore kerneldoc consistencyThierry Reding1-1/+1
Commit 18df89fef2d5 ("drm: Decouple EDID parsing from I2C adapter") renamed the adapter parameter of the drm_do_probe_ddc_edid function to data but didn't update the kerneldoc accordingly. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-03amdkfd: use atomic allocations within srcu callbacksSasha Levin1-1/+1
srcu callbacks are running in atomic context, we can't allocate using __GFP_WAIT. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
2014-12-03amdkfd: use sizeof(long) granularity for the pasid bitmaskSasha Levin1-2/+1
All the bit operations (such as find_first_zero_bit()) read sizeof(long) bytes at a time. If we allocated less than sizeof(long) bytes for the bitmask we would be accessing invalid memory when working with the bitmask. Change the allocator to allocate sizeof(long) multiples for the bitmask. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>