aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-06-17ARM: keystone requires ARM_PATCH_PHYS_VIRTArnd Bergmann1-0/+1
The dynamic relocation that the keystone platform performs only works if we can pick the phys offset at boot time. It's possible that there is another solution for this, but this is the easiest workaround. Kernels with ARM_PATCH_PHYS_VIRT are not portable across platforms, and I see no reason why anyone would run a kernel without ARM_PATCH_PHYS_VIRT on keystone. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Santosh Shilimkar <[email protected]>
2014-06-17ARM: omap2: fix am43xx dependency on l2x0 cacheArnd Bergmann3-1/+8
Commit d941f86fad41b ("ARM: l2c: AM43x: add L2 cache support") enabled the L2 cache support for the am43xx SoC, but caused a build regression when the driver for that cache controller is disabled: arch/arm/mach-omap2/built-in.o: In function `am43xx_init_early': :(.init.text+0xb20): undefined reference to `omap_l2_cache_init' This did not happen for OMAP4, which has the same call, but enables the l2x0 driver unconditionally. We could do the same thing for am43xx, but it seems better to allow turning it off and make the code work in either case. This adds an inline wrapper for omap_l2_cache_init for the disabled case, and removes the 'select' from OMAP4 so it becomes a user visible option. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Tony Lindgren <[email protected]> Cc: [email protected]
2014-06-17Merge tag 'v3.16-rc1' into i2c/for-nextWolfram Sang2435-46522/+105768
Merge a stable base (Linux 3.16-rc1) Signed-off-by: Wolfram Sang <[email protected]>
2014-06-17i2c: sun6-p2wi: fix call to snprintfBoris BREZILLON1-1/+1
Fixes possible issue in case pdev name contains formatting characters. Signed-off-by: Boris BREZILLON <[email protected]> Reported-by: Kees Cook <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
2014-06-17ACPI: use kstrto*() instead of simple_strto*()Christoph Jaeger3-3/+8
simple_strto*() are obsolete; use kstrto*() instead. Add proper error checking. Signed-off-by: Christoph Jaeger <[email protected]> Acked-by: David Rientjes <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-06-17ACPI / processor replace __attribute__((packed)) by __packedFabian Frederick1-5/+5
This patch fixes checkpatch warnings: "WARNING: __packed is preferred over __attribute__((packed))" Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-06-17ACPI / battery: add quirk for Acer Aspire V5-573GAlexander Mezin1-0/+24
On Acer Aspire V5-573G battery notifications are sometimes triggered too early. For example, when AC is unplugged and notification is triggered, battery state is still reported as "Full", and changes to "Discharging" only after short delay, without any notification. This patch solves the problem by adding 1 second sleep. Similar quirk is already implemented in AC driver for other laptop. Signed-off-by: Alexander Mezin <[email protected]> Acked-by: Lan Tianyu <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-06-17ACPI / battery: use callback for setting up quirksAlexander Mezin1-2/+8
Use callback for setting up quirk instead of checking return code of dmi_check_system(). This change will allow using bat_dmi_table for other quirks. Signed-off-by: Alexander Mezin <[email protected]> Acked-by: Lan Tianyu <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-06-17ACPI / LPSS: Take I2C host controllers out of resetMika Westerberg1-0/+15
On Intel Baytrail, some I2C host controllers are held in reset when the OS gets control. This causes the driver to fail to detect the hardware properly. Fix this so that we make sure that the I2C host controller is not in reset when the driver gets probe'd. Signed-off-by: Mika Westerberg <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-06-17Merge branch 'drm-next-3.16' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie4-17/+105
into drm-next two fixes for the deep color support in radeon. * 'drm-next-3.16' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: Bypass hw lut's for > 8 bpc framebuffer scanout. drm/radeon: use pixel formats instead of depth/bpp
2014-06-17Merge branch 'drm-nouveau-next' of ↵Dave Airlie25-763/+1088
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next This is bigger because it regenerates the internal firmwares after a fix. * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/doc: update the thermal documentation drm/nouveau/pwr: fix typo in fifo wrap handling drm/nv50/disp: fix a potential oops in supervisor handling drm/nouveau/disp/dp: don't touch link config after success drm/nouveau/kms: reference vblank for crtc during pageflip. drm/gk104/fb/ram: fixups from an earlier search+replace drm/nv50/gr: remove an unneeded write while initialising PGRAPH drm/nv50/gr: fix overlap while zeroing zcull regions drm/gf100-/gr: report class data to host on fwmthd failure drm/gk104/ibus: increase various random timeouts drm/gk104/clk: only touch divider for mode we'll be using
2014-06-17drm/nouveau/doc: update the thermal documentationMartin Peres1-3/+4
Changes: - Change the maintainer's address (the labri address will expire soon); - Drop the note about not all families supporting all fan modes; - Add a note about the reported RPM not being accurate when driven outside the vbios-defined PWM range. Signed-off-by: Martin Peres <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-06-17drm/nouveau/pwr: fix typo in fifo wrap handlingBen Skeggs5-5/+5
Signed-off-by: Ben Skeggs <[email protected]>
2014-06-17drm/nv50/disp: fix a potential oops in supervisor handlingBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <[email protected]>
2014-06-17drm/nouveau/disp/dp: don't touch link config after successBen Skeggs1-4/+3
I don't know of anything this fixes, but it seems wrong anyway. Signed-off-by: Ben Skeggs <[email protected]>
2014-06-17drm/nouveau/kms: reference vblank for crtc during pageflip.Mario Kleiner1-0/+7
Need to drm_vblank_get/put() the crtc involved in a pending pageflip, or we might not get vblank irqs and updates of vblank counts and timestamps for pageflip events and flip completion. Signed-off-by: Mario Kleiner <[email protected]> Signed-off-by: Ben Skeggs <[email protected]> Cc: [email protected]
2014-06-17drm/gk104/fb/ram: fixups from an earlier search+replaceBen Skeggs1-38/+38
Signed-off-by: Ben Skeggs <[email protected]>
2014-06-17drm/nv50/gr: remove an unneeded write while initialising PGRAPHPierre Moreau1-1/+0
The blob does not seem to write at that place for my NVAC, though it does for my NV96, agreeing with what is done in the if/else structure below. I guess someone forgot to remove the line when the if/else was put in place. Signed-off-by: Pierre Moreau <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-06-17drm/nv50/gr: fix overlap while zeroing zcull regionsPierre Moreau1-4/+4
The specified stride was not correct, resulting in erases overlapping and part of the zcull regions being not erased at all. Signed-off-by: Pierre Moreau <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2014-06-17drm/gf100-/gr: report class data to host on fwmthd failureBen Skeggs12-703/+1003
Signed-off-by: Ben Skeggs <[email protected]>
2014-06-17drm/gk104/ibus: increase various random timeoutsBen Skeggs1-1/+18
Fixes (at least) PTHERM accesses timing out at higher clock speeds. Values and registers taken from what the binary driver does. Signed-off-by: Ben Skeggs <[email protected]>
2014-06-17drm/gk104/clk: only touch divider for mode we'll be usingBen Skeggs1-3/+5
Signed-off-by: Ben Skeggs <[email protected]>
2014-06-16epoll: fix use-after-free in eventpoll_release_fileKonstantin Khlebnikov1-2/+2
This fixes use-after-free of epi->fllink.next inside list loop macro. This loop actually releases elements in the body. The list is rcu-protected but here we cannot hold rcu_read_lock because we need to lock mutex inside. The obvious solution is to use list_for_each_entry_safe(). RCU-ness isn't essential because nobody can change this list under us, it's final fput for this file. The bug was introduced by ae10b2b4eb01 ("epoll: optimize EPOLL_CTL_DEL using rcu") Signed-off-by: Konstantin Khlebnikov <[email protected]> Reported-by: Cyrill Gorcunov <[email protected]> Cc: Stable <[email protected]> # 3.13+ Cc: Sasha Levin <[email protected]> Cc: Jason Baron <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-06-16x86, kaslr: boot-time selectable with hibernationKees Cook4-6/+21
Changes kASLR from being compile-time selectable (blocked by CONFIG_HIBERNATION), to being boot-time selectable (with hibernation available by default) via the "kaslr" kernel command line. Signed-off-by: Kees Cook <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-06-16PM / hibernate: introduce "nohibernate" boot parameterKees Cook5-5/+40
To support using kernel features that are not compatible with hibernation, this creates the "nohibernate" kernel boot parameter to disable both hibernation and resume. This allows hibernation support to be a boot-time choice instead of only a compile-time choice. Signed-off-by: Kees Cook <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-06-16cpufreq: cpufreq-cpu0: fix CPU_THERMAL dependencyArnd Bergmann1-0/+2
5fbfbcd3e842d ("cpufreq: cpufreq-cpu0: remove dependency on THERMAL and REGULATOR") was a little too quick in completely removing the dependency on the THERMAL driver. The problem is that while there are inline wrappers to turn the thermal API calls into empty functions, those do not help if the cpu-thermal driver is a loadable module and cpufreq-cpu0 is builtin. Since CONFIG_CPU_THERMAL is a bool option that decides whether the cpu code is built into the thermal module or not, we have to use a dependency on the thermal driver itself. However, if CPU_THERMAL is disabled, we don't need the dependency, hence the strange '!CPU_THERMAL || THERMAL' construct. Fixes: 5fbfbcd3e842d ("cpufreq: cpufreq-cpu0: remove dependency on THERMAL and REGULATOR") Signed-off-by: Arnd Bergmann <[email protected]> Tested-by: Viresh Kumar <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-06-16ACPI / ia64 / sba_iommu: Restore the working initialization orderingRafael J. Wysocki1-27/+37
Commit 66345d5f79fc (ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery) changed the ordering of SBA (System Bus Adapter) IOMMU initialization with respect to the PCI host bridge initialization which broke things inadvertently, because the SBA IOMMU initialization code has to run after the PCI host bridge has been initialized. Fix that by reworking the SBA IOMMU ACPI scan handler so that it claims the discovered matching ACPI device objects without attempting to initialize anything and move the entire SBA IOMMU initialization to sba_init() that runs after the PCI bus has been enumerated. Link: https://bugzilla.kernel.org/show_bug.cgi?id=76691 Fixes: 66345d5f79fc (ACPI / ia64 / sba_iommu: Use ACPI scan handler for device discovery) Reported-and-tested-by: Émeric Maschino <[email protected]> Cc: Tony Luck <[email protected]> Cc: 3.11+ <[email protected]> # 3.11+ Signed-off-by: Rafael J. Wysocki <[email protected]>
2014-06-16OF: fix of_find_node_by_path() assumption that of_allnodes is rootFrank Rowand1-2/+2
of_find_node_by_path() is borked because of_allnodes is not guaranteed to contain the root of the tree after using any of the dynamic update functions because some other nodes ends up as of_allnodes. Fixes: c22e650e66b8 of: Make of_find_node_by_path() handle /aliases Reported-by: [email protected] Signed-off-by: Frank Rowand <[email protected]> Signed-off-by: Rob Herring <[email protected]>
2014-06-16of: avoid format string parsing in kobject namesKees Cook1-1/+2
This makes sure a format string cannot leak into the kobject name that is constructed. (And splits the >80 character line.) Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Rob Herring <[email protected]>
2014-06-16of/platform: Fix microblaze build failureGuenter Roeck1-4/+0
Commit bf5db2f (microblaze: Use generic device.h) removes the microblaze specific pdev_archdata and dma_mask. At the same time, commit 591c1ee (of: configure the platform device dma parameters) initializes the just removed field. This causes all microblaze builds to fail. Drop the unnecessary initialization. Cc: Michal Simek <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Michal Simek <[email protected]> Signed-off-by: Rob Herring <[email protected]>
2014-06-16null_blk: fix softirq completions for queue_mode == 1Jens Axboe1-1/+4
Only blk-mq completions have payload attached to the request, for request_fn mode we have stored it in req->special. This fixes an oops with queue_mode=1 and softirq completions. Signed-off-by: Jens Axboe <[email protected]>
2014-06-16Merge remote-tracking branches 'regulator/fix/as3722', ↵Mark Brown3-1/+5
'regulator/fix/ltc3589' and 'regulator/fix/palmas' into regulator-linus
2014-06-16Merge remote-tracking branch 'regulator/fix/core' into regulator-linusMark Brown1-0/+5
2014-06-16Merge remote-tracking branches 'asoc/fix/fsl-dma', 'asoc/fix/fsl-spdif', ↵Mark Brown10-76/+119
'asoc/fix/pxa', 'asoc/fix/rcar' and 'asoc/fix/sigmadsp' into asoc-linus
2014-06-16Merge remote-tracking branch 'asoc/fix/core' into asoc-linusMark Brown1-13/+16
2014-06-16regulator: ltc3589: Use of_get_child_by_nameAxel Lin1-1/+1
of_find_node_by_name() walks the allnodes list, and can thus walk outside of the parent node. Use of_get_child_by_name() instead. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-06-16Revert "offb: Add palette hack for little endian"Benjamin Herrenschmidt1-10/+1
This reverts commit e1edf18b20076da83dd231dbd2146cbbc31c0b14. This patch was a misguided attempt at fixing offb for LE ppc64 kernels on BE qemu but is just wrong ... it breaks real LE/LE setups, LE with real HW, and existing mixed endian systems that did the fight thing with the appropriate device-tree property. Bad reviewing on my part, sorry. The right fix is to either make qemu change its endian when the guest changes endian (working on that) or to use the existing foreign endian support. Signed-off-by: Benjamin Herrenschmidt <[email protected]> CC: <[email protected]> [v3.13+] ---
2014-06-16drm/i915, HD-audio: Don't continue probing when nomodeset is givenTakashi Iwai5-17/+24
When a machine is booted with nomodeset option, i915 driver skips the whole initialization. Meanwhile, HD-audio tries to bind wth i915 just by request_symbol() without knowing that the initialization was skipped, and eventually it hits WARN_ON() in i915_request_power_well() and i915_release_power_well() wrongly but still continues probing, even though it doesn't work at all. In this patch, both functions are changed to return an error in case of uninitialized state instead of WARN_ON(), so that HD-audio driver can give up HDMI controller initialization at the right time. Acked-by: Daniel Vetter <[email protected]> Cc: <[email protected]> [3.15] Signed-off-by: Takashi Iwai <[email protected]>
2014-06-16s390/ccwgroup: use ccwgroup_ungroup wrapperSebastian Ott1-12/+2
To ungroup and deregister the group device always use the ccwgroup_ungroup wrapper. Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2014-06-16s390/ccwgroup: fix an uninitialized return codeSebastian Ott1-4/+5
Since commit 0b60f9ead5d4816e7e3d6e28f4a0d22d4a1b2513 "s390: use device_remove_file_self() instead of device_schedule_callback()" the return code of ccwgroup_ungroup_store is uninitialized. Make sure the rc is always initialized. Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2014-06-16s390/ccwgroup: obtain extra reference for asynchronous processingSebastian Ott1-1/+4
Commit 0b60f9ead5d4816e7e3d6e28f4a0d22d4a1b2513 "s390: use device_remove_file_self() instead of device_schedule_callback()" changed ccwgroup to use an extra work queue instead of device_schedule_callback. This function obtained an extra device reference for its async work which is missing in the new implementation and results in a "freeing memory with a lock still held" BUG. Fix this by obtaining an extra reference for the async work. Reported-by: Stefan Raspl <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2014-06-16qdio: Keep device-specific dbf entriesStefan Raspl3-13/+77
Keep the per-device dbf entries until module is removed, with proper error checking for debug feature setup. Signed-off-by: Stefan Raspl <[email protected]> Reviewed-by: Steffen Maier <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2014-06-16s390/compat: correct ucontext layout for high gprsMartin Schwidefsky2-3/+9
The uc_sigmask definition in the kernel differs from the one in the glibc, the kernel uc_sigmask has 64 bits while the glibc verison is 1024 bits. The extension of the ucontext structure for 64-bit register support for 31-bit compat processes added a new field uc_gprs_high which starts 8 bytes after the uc_sigmask field. As the glibc view of the ucontext assumes a size of 128 bytes for uc_sigmask add a 120 byte padding to the kernel structure ucontext_extended after the 8 byte uc_sigmask. Signed-off-by: Martin Schwidefsky <[email protected]>
2014-06-16s390/cio: set device name as early as possibleSebastian Ott1-35/+36
Currently we set the device name at the time we call device_add after we receive the interrupt for the first I/O. When something is not working as expected during that first I/O (e.g. we don't receive an interrupt) we print a message including the device name which has not yet been initialized. Set the device name after calling device_initialize (prior to starting the first I/O) so that we have the name present if some unexpected error occurs during that first I/O. Reported-by: Cornelia Huck <[email protected]> Reported-by: Jason J. Herne <[email protected]> Reviewed-by: Peter Oberparleiter <[email protected]> Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2014-06-16rtmutex: Plug slow unlock raceThomas Gleixner1-6/+109
When the rtmutex fast path is enabled the slow unlock function can create the following situation: spin_lock(foo->m->wait_lock); foo->m->owner = NULL; rt_mutex_lock(foo->m); <-- fast path free = atomic_dec_and_test(foo->refcnt); rt_mutex_unlock(foo->m); <-- fast path if (free) kfree(foo); spin_unlock(foo->m->wait_lock); <--- Use after free. Plug the race by changing the slow unlock to the following scheme: while (!rt_mutex_has_waiters(m)) { /* Clear the waiters bit in m->owner */ clear_rt_mutex_waiters(m); owner = rt_mutex_owner(m); spin_unlock(m->wait_lock); if (cmpxchg(m->owner, owner, 0) == owner) return; spin_lock(m->wait_lock); } So in case of a new waiter incoming while the owner tries the slow path unlock we have two situations: unlock(wait_lock); lock(wait_lock); cmpxchg(p, owner, 0) == owner mark_rt_mutex_waiters(lock); acquire(lock); Or: unlock(wait_lock); lock(wait_lock); mark_rt_mutex_waiters(lock); cmpxchg(p, owner, 0) != owner enqueue_waiter(); unlock(wait_lock); lock(wait_lock); wakeup_next waiter(); unlock(wait_lock); lock(wait_lock); acquire(lock); If the fast path is disabled, then the simple m->owner = NULL; unlock(m->wait_lock); is sufficient as all access to m->owner is serialized via m->wait_lock; Also document and clarify the wakeup_next_waiter function as suggested by Oleg Nesterov. Reported-by: Steven Rostedt <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Steven Rostedt <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-06-15Linux 3.16-rc1Linus Torvalds1-2/+2
2014-06-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds10-34/+96
Pull networking fixes from David Miller: 1) Fix checksumming regressions, from Tom Herbert. 2) Undo unintentional permissions changes for SCTP rto_alpha and rto_beta sysfs knobs, from Denial Borkmann. 3) VXLAN, like other IP tunnels, should advertize it's encapsulation size using dev->needed_headroom instead of dev->hard_header_len. From Cong Wang. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: net: sctp: fix permissions for rto_alpha and rto_beta knobs vxlan: Checksum fixes net: add skb_pop_rcv_encapsulation udp: call __skb_checksum_complete when doing full checksum net: Fix save software checksum complete net: Fix GSO constants to match NETIF flags udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup vxlan: use dev->needed_headroom instead of dev->hard_header_len MAINTAINERS: update cxgb4 maintainer
2014-06-15Merge tag 'clk-for-linus-3.16-part2' of ↵Linus Torvalds30-265/+1836
git://git.linaro.org/people/mike.turquette/linux Pull more clock framework updates from Mike Turquette: "This contains the second half the of the clk changes for 3.16. They are simply fixes and code refactoring for the OMAP clock drivers. The sunxi clock driver changes include splitting out the one mega-driver into several smaller pieces and adding support for the A31 SoC clocks" * tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux: (25 commits) clk: sunxi: document PRCM clock compatible strings clk: sunxi: add PRCM (Power/Reset/Clock Management) clks support clk: sun6i: Protect SDRAM gating bit clk: sun6i: Protect CPU clock clk: sunxi: Rework clock protection code clk: sunxi: Move the GMAC clock to a file of its own clk: sunxi: Move the 24M oscillator to a file of its own clk: sunxi: Remove calls to clk_put clk: sunxi: document new A31 USB clock compatible clk: sunxi: Implement A31 USB clock ARM: dts: OMAP5/DRA7: use omap5-mpu-dpll-clock capable of dealing with higher frequencies CLK: TI: dpll: support OMAP5 MPU DPLL that need special handling for higher frequencies ARM: OMAP5+: dpll: support Duty Cycle Correction(DCC) CLK: TI: clk-54xx: Set the rate for dpll_abe_m2x2_ck CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic) dt:/bindings: DRA7 ATL (Audio Tracking Logic) clock bindings ARM: dts: dra7xx-clocks: Correct name for atl clkin3 clock CLK: TI: gate: add composite interface clock to OMAP2 only build ARM: OMAP2: clock: add DT boot support for cpufreq_ck CLK: TI: OMAP2: add clock init support ...
2014-06-15Merge git://git.infradead.org/users/willy/linux-nvmeLinus Torvalds5-110/+194
Pull NVMe update from Matthew Wilcox: "Mostly bugfixes again for the NVMe driver. I'd like to call out the exported tracepoint in the block layer; I believe Keith has cleared this with Jens. We've had a few reports from people who're really pounding on NVMe devices at scale, hence the timeout changes (and new module parameters), hotplug cpu deadlock, tracepoints, and minor performance tweaks" [ Jens hadn't seen that tracepoint thing, but is ok with it - it will end up going away when mq conversion happens ] * git://git.infradead.org/users/willy/linux-nvme: (22 commits) NVMe: Fix START_STOP_UNIT Scsi->NVMe translation. NVMe: Use Log Page constants in SCSI emulation NVMe: Define Log Page constants NVMe: Fix hot cpu notification dead lock NVMe: Rename io_timeout to nvme_io_timeout NVMe: Use last bytes of f/w rev SCSI Inquiry NVMe: Adhere to request queue block accounting enable/disable NVMe: Fix nvme get/put queue semantics NVMe: Delete NVME_GET_FEAT_TEMP_THRESH NVMe: Make admin timeout a module parameter NVMe: Make iod bio timeout a parameter NVMe: Prevent possible NULL pointer dereference NVMe: Fix the buffer size passed in GetLogPage(CDW10.NUMD) NVMe: Update data structures for NVMe 1.2 NVMe: Enable BUILD_BUG_ON checks NVMe: Update namespace and controller identify structures to the 1.1a spec NVMe: Flush with data support NVMe: Configure support for block flush NVMe: Add tracepoints NVMe: Protect against badly formatted CQEs ...
2014-06-15random: fix nasty entropy accounting bugTheodore Ts'o1-8/+9
Commit 0fb7a01af5b0 "random: simplify accounting code", introduced in v3.15, has a very nasty accounting problem when the entropy pool has has fewer bytes of entropy than the number of requested reserved bytes. In that case, "have_bytes - reserved" goes negative, and since size_t is unsigned, the expression: ibytes = min_t(size_t, ibytes, have_bytes - reserved); ... does not do the right thing. This is rather bad, because it defeats the catastrophic reseeding feature in the xfer_secondary_pool() path. It also can cause the "BUG: spinlock trylock failure on UP" for some kernel configurations when prandom_reseed() calls get_random_bytes() in the early init, since when the entropy count gets corrupted, credit_entropy_bits() erroneously believes that the nonblocking pool has been fully initialized (when in fact it is not), and so it calls prandom_reseed(true) recursively leading to the spinlock BUG. The logic is *not* the same it was originally, but in the cases where it matters, the behavior is the same, and the resulting code is hopefully easier to read and understand. Fixes: 0fb7a01af5b0 "random: simplify accounting code" Signed-off-by: Theodore Ts'o <[email protected]> Cc: Greg Price <[email protected]> Cc: [email protected] #v3.15