aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devices.txt (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2014-12-14Input: gpio_keys - fix warning regarding uninitialized 'button' variableFabio Estevam1-2/+3
Commit af906faabcf91eb1 ("Input: gpio_keys - fix warning regarding uninitialized 'irq' variable") introduced the following build warning: drivers/input/keyboard/gpio_keys.c:625:16: warning: 'button' may be used uninitialized in this function [-Wmaybe-uninitialized] Move the 'button' initialization to a proper location to avoid such warning. Reported-by: Olof's autobuilder <build@lixom.net> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-07Input: add support for Elan eKTH I2C touchscreensScott Liu4-0/+1317
This driver supports Elan eKTH I2C touchscreen controllers. Note that these are using custom protocol, as opposed to other Elan parts that use HID-over-I2C and are supported by the standard HID-multitouch driver. Signed-off-by: Scott Liu <scott.liu@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-07Input: gpio_keys - fix warning regarding uninitialized 'irq' variableDmitry Torokhov1-4/+2
Commit f2d347ff70be453e ("Input: gpio_keys - add device tree support for interrupt only keys") caused the following build warning: drivers/input/keyboard/gpio_keys.c: In function 'gpio_keys_probe': drivers/input/keyboard/gpio_keys.c:647:15: warning: 'irq' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/input/keyboard/gpio_keys.c:622:7: note: 'irq' was declared here Move button->irq initialization into proper branch and get rid of the temporary. Reported-by: Olof's autobuilder <build@lixom.net> Reported-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-04Input: cyapa - use 'error' for error codesDudley Du1-47/+47
Let's use 'error' variable instead of 'ret' when we need to store erro codes. Signed-off-by: Dudley Du <dudley.dulixin@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-03Input: cyapa - fix resuming the deviceDudley Du1-4/+3
Chage b1cfa7b4388285c0f0b486f152ab0cb18612c779 tried to get away form using irq in cyapa structure and use client->irq instead, but missed a couple of spots making the touchpad inoperative after resume. Reported-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Dudley Du <dudley.dulixin@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-03Input: gpio_keys - add device tree support for interrupt only keysAlexander Stein2-15/+29
This features already exists for board config setups. Add support for device tree based systems. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-03Input: amikbd - allocate temporary keymap buffer on the stackGeert Uytterhoeven1-1/+2
Allocate the temporary buffer needed for initialization of the console keyboard maps (512 bytes, as NR_KEYS = 256) on the stack instead of statically, to reduce kernel size. add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-512 (-512) function old new delta temp_map 512 - -512 Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-03Input: amikbd - fix build if !CONFIG_HW_CONSOLEGeert Uytterhoeven1-17/+29
If CONFIG_HW_CONSOLE is not set: drivers/built-in.o: In function `amikbd_probe': amikbd.c:(.init.text+0x3e4e): undefined reference to `key_maps' amikbd.c:(.init.text+0x3dd4): undefined reference to `key_maps' To fix this, extract the initialization of the console keyboard maps into amikbd_init_console_keymaps(), protected by #ifdef CONFIG_HW_CONSOLE. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-03Input: lm8323 - missing error check in lm8323_set_disable()Dan Carpenter1-0/+2
The missing error handling here is not especially harmful but static checkers complain that "i" can be used uninitialized. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-03Input: initialize device counter variables with -1Aniroop Mathur5-12/+12
Let's initialize atomic_t variables keeping track of number of various devices created so far with -1 in order to avoid extra subtraction operation. Signed-off-by: Aniroop Mathur <aniroop.mathur@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-02Input: initialize input_no to -1 to avoid subtractionAniroop Mathur1-2/+2
Let's initializes input_no to -1 in order to avoid extra subtraction operation performed every time we allocate an input device. Signed-off-by: Aniroop Mathur <aniroop.mathur@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-02Input: i8042 - do not try to load on Intel NUC D54250WYKTodor Minchev1-0/+10
The Intel NUC D54250WYK has no PS/2 controller, however the DSDT declares PS/2 devices which trigger the loading of the i8042 driver. Signed-off-by: Todor Minchev <todor.minchev@intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-16Input: atkbd - correct MSC_SCAN events for force_release keysStefan Brüns1-2/+4
Without the change either no scancode would be reported on release of force_release keys, or - if the key is marked as force_release erroneously - the release event and the scancode would be reported in separate reports to the input layer. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-09Input: cyapa - switch to using managed resourcesDudley Du1-79/+105
Use of managed resources simplifies error handling and device removal code. Signed-off-by: Dudley Du <dudl@cypress.com> [Dmitry: added open/close methods so cyapa_remove is no longer needed.] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-09Input: lifebook - use "static inline" instead of "inline" in lifebook.hChen Gang1-3/+3
For functions defined in header files we should use static inline rather than inline, which breaks under the latest upstream gcc (which is really gcc issue, but static inline is better suited regardless). The related error (with allmodconfig under tile): MODPOST 4002 modules ERROR: "lifebook_detect" [drivers/input/mouse/psmouse.ko] undefined! Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-02Input: touchscreen - use __maybe_unused instead of ifdef around suspend/resumeJingoo Han19-78/+38
Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-02Input: mouse - use __maybe_unused instead of ifdef around suspend/resumeJingoo Han3-12/+6
Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-02Input: misc - use __maybe_unused instead of ifdef around suspend/resumeJingoo Han19-71/+35
Use __maybe_unused instead of ifdef guards around suspend/resume functions, in order to increase build coverage and fix build warnings. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-02Input: cap11xx - support for irq-active-high optionMatt Ranostay2-0/+12
Some applications need to use the irq-active-high push-pull option. This allows it be enabled in the device tree child node. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-02Input: cap11xx - add support for various cap11xx devicesMatt Ranostay2-24/+53
There are variants of the cap11xx device with a varying number of capacitance detection channels. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-11-02Input: rename cap1106 driver to cap11xxMatt Ranostay5-355/+355
There are several devices in cap11xx family besides cap1106. The driver can be made to support all of them, so let's give it more generic name. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Reviewed-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-31Input: altera_ps2 - switch to using managed resourcesTobias Klauser1-57/+24
Use them devm_ managed resources API to simplify error handling in altera_ps2_probe() and to reduce the size of altera_ps2_remove() and the ps2if struct. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-31Input: add driver for the Goodix touchpanelBastien Nocera4-0/+415
Add a driver for the Goodix touchscreen panel found in Onda v975w tablets. The driver is based off the Android driver gt9xx.c found in some Android code dumps, but now bears no resemblance to the original driver. The driver was tested on the aforementioned tablet. Signed-off-by: Bastien Nocera <hadess@hadess.net> Tested-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-24Input: add driver for Elan I2C/SMbus touchpadDuson Lin8-0/+2418
This driver supports Elan I2C/SMbus touchpads found in some laptops and also in many Chromebooks. Signed-off-by: Duson Lin <dusonlin@emc.com.tw> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-22Input: lpc32xx-keys - switch to using managed resourcesPramod Gurav1-72/+20
This change switches to using devm_* managed resources APIs to request the resources in probe to simplify probe error path and module unloading. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-22Input: pxa27x_keypad - switch to using managed resourcesPramod Gurav1-64/+20
This change switches ithe driver to use devm_* APIs to allocate resources. This helps to simplify failure path in probe function and module unloading and does away with remove function. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-22Input: mpr121 - switch to using managed resourcesPramod Gurav1-30/+12
This change switches the driver to use devm_* managed resources APIs to request the resources in probe to simplify probe error path and module unloading and does away with remove function. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-11Input: i8042 - disable active multiplexing by defaultDmitry Torokhov3-275/+10
Active multiplexing is a nice feature as it allows several pointing devices (such as touchpad and external mouse) use their native protocols at the same time. Unfortunately many manufacturers do not implement the feature properly even though they advertise it. The problematic implementations are never fixed, since Windows by default does not use this mode, and move from one BIOS/model of laptop to another. When active multiplexing is broken turning it on usually results in touchpad, keyboard, or both unresponsive. With PS/2 usage on decline (most of PS/2 devices in use nowadays are internal laptop touchpads), I expect number of users who have laptops with working MUX implementation, docking stations with external PS/2 ports, and who are still using external PS/2 mice, to be rather small. Let's flip the default to be OFF and allow activating it through i8042.nomux=0 kernel option. We'll also keep DMI table where we can record known good models. Acked-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-11Input: i8042 - add noloop quirk for Asus X750LNHans de Goede1-0/+6
Without this the aux port does not get detected, and consequently the touchpad will not work. https://bugzilla.redhat.com/show_bug.cgi?id=1110011 Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-11Input: synaptics - gate forcepad support by DMI checkDmitry Torokhov2-7/+23
Unfortunately, ForcePad capability is not actually exported over PS/2, so we have to resort to DMI checks. Cc: stable@vger.kernel.org Reported-by: Nicole Faerber <nicole.faerber@kernelconcepts.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-09Input: Add Microchip AR1021 i2c touchscreenChristian Gmeiner3-0/+194
This patch adds support for the ar1021 i2c based touchscreen. The driver is quite simple and only supports the Touch Reporting Protocol. This is the final version for an RFC patch send a while ago. http://www.spinics.net/lists/linux-input/msg29419.html Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-09Input: cros_ec_keyb - add of match tableSjoerd Simons1-0/+9
To enable the cros_ec_keyb driver to be auto-loaded when build as module add an of match table (and export it) to match the modalias information passed on to userspace as the Cros EC MFD driver registers the MFD subdevices with an of_compatibility string. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-09Input: serio - avoid negative serio device numbersRichard Leitner1-2/+2
Fix the format string for serio device name generation to avoid negative device numbers when the id exceeds the maximum signed integer value. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-09Input: avoid negative input device numbersRichard Leitner1-1/+1
Fix the format string for input device name generation to avoid negative device numbers when the id exceeds the maximum signed integer value. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-08Input: automatically set EV_ABS bit in input_set_abs_paramsDmitry Torokhov1-1/+2
Let's automatically set EV_ABS bit in device's event type list when calling input_set_abs_params() so that drivers do not have to do it explicitly. These calls are never in a hot paths so we won't lose much time by setting the same bit several times. Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-07Input: adp5588-keys - cancel workqueue in failure pathPramod Gurav1-0/+1
In case we start with the device not fully quiesced we should make sure we cancel the workqueue after freeing interrupt. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-07Input: opencores-kbd - switch to using managed resourcesPramod Gurav1-55/+17
This change switch to managed resources to simplifies error handling and module unloading and does away with platform_driver remove function. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-07Input: evdev - fix EVIOCG{type} ioctlDmitry Torokhov1-5/+8
The 'max' size passed into the function is measured in number of bits (KEY_MAX, LED_MAX, etc) so we need to convert it accordingly before trying to copy the data out, otherwise we will try copying too much and end up with up with a page fault. Reported-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-10-05Linux 3.17Linus Torvalds1-1/+1
2014-10-03init/Kconfig: Fix HAVE_FUTEX_CMPXCHG to not break up the EXPERT menuJosh Triplett1-0/+1
commit 03b8c7b623c80af264c4c8d6111e5c6289933666 ("futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test") added the HAVE_FUTEX_CMPXCHG symbol right below FUTEX. This placed it right in the middle of the options for the EXPERT menu. However, HAVE_FUTEX_CMPXCHG does not depend on EXPERT or FUTEX, so Kconfig stops placing items in the EXPERT menu, and displays the remaining several EXPERT items (starting with EPOLL) directly in the General Setup menu. Since both users of HAVE_FUTEX_CMPXCHG only select it "if FUTEX", make HAVE_FUTEX_CMPXCHG itself depend on FUTEX. With this change, the subsequent items display as part of the EXPERT menu again; the EMBEDDED menu now appears as the next top-level item in the General Setup menu, which makes General Setup much shorter and more usable. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Cc: stable <stable@vger.kernel.org>
2014-10-03init/Kconfig: Hide printk log config if CONFIG_PRINTK=nJosh Triplett1-0/+2
The buffers sized by CONFIG_LOG_BUF_SHIFT and CONFIG_LOG_CPU_MAX_BUF_SHIFT do not exist if CONFIG_PRINTK=n, so don't ask about their size at all. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Cc: stable <stable@vger.kernel.org>
2014-10-03[SCSI] uas: disable use of blk-mq I/O pathChristoph Hellwig1-0/+7
The uas driver uses the block layer tag for USB3 stream IDs. With blk-mq we can get larger tag numbers that the queue depth, which breaks this assumption. A fix is under way for 3.18, but sits on top of large changes so can't easily be backported. Set the disable_blk_mq path so that a uas device can't easily crash the system when using blk-mq for SCSI. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-10-03i2c: qup: Fix order of runtime pm initializationAndy Gross1-4/+8
The runtime pm calls need to be done before populating the children via the i2c_add_adapter call. If this is not done, a child can run into issues trying to do i2c read/writes due to the pm_runtime_sync failing. Signed-off-by: Andy Gross <agross@codeaurora.org> Reviewed-by: Felipe Balbi <balbi@ti.com> Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
2014-10-03i2c: rk3x: fix 0 length write transfersAlexandru M Stan1-1/+1
i2cdetect -q was broken (everything was a false positive, and no transfers were actually being sent over i2c). The way it works is by sending a 0 length write request and checking for NACK. This patch fixes the 0 length writes and actually sends them. Reported-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Alexandru M Stan <amstan@chromium.org> Tested-by: Doug Anderson <dianders@chromium.org> Tested-by: Max Schwarz <max.schwarz@online.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
2014-10-02mm: page_alloc: fix zone allocation fairness on UPJohannes Weiner1-4/+3
The zone allocation batches can easily underflow due to higher-order allocations or spills to remote nodes. On SMP that's fine, because underflows are expected from concurrency and dealt with by returning 0. But on UP, zone_page_state will just return a wrapped unsigned long, which will get past the <= 0 check and then consider the zone eligible until its watermarks are hit. Commit 3a025760fc15 ("mm: page_alloc: spill to remote nodes before waking kswapd") already made the counter-resetting use atomic_long_read() to accomodate underflows from remote spills, but it didn't go all the way with it. Make it clear that these batches are expected to go negative regardless of concurrency, and use atomic_long_read() everywhere. Fixes: 81c0a2bb515f ("mm: page_alloc: fair zone allocator policy") Reported-by: Vlastimil Babka <vbabka@suse.cz> Reported-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Mel Gorman <mgorman@suse.de> 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-10-02perf: fix perf bug in fork()Peter Zijlstra2-3/+6
Oleg noticed that a cleanup by Sylvain actually uncovered a bug; by calling perf_event_free_task() when failing sched_fork() we will not yet have done the memset() on ->perf_event_ctxp[] and will therefore try and 'free' the inherited contexts, which are still in use by the parent process. This is bad.. Suggested-by: Oleg Nesterov <oleg@redhat.com> Reported-by: Oleg Nesterov <oleg@redhat.com> Reported-by: Sylvain 'ythier' Hitier <sylvain.hitier@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-02MAINTAINERS: change git URL for mpc5xxx treeAnatolij Gustschin1-1/+1
The repository for mpc5xxx has been moved, update git URL to new location. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-02mm: memcontrol: do not iterate uninitialized memcgsJohannes Weiner1-5/+31
The cgroup iterators yield css objects that have not yet gone through css_online(), but they are not complete memcgs at this point and so the memcg iterators should not return them. Commit d8ad30559715 ("mm/memcg: iteration skip memcgs not yet fully initialized") set out to implement exactly this, but it uses CSS_ONLINE, a cgroup-internal flag that does not meet the ordering requirements for memcg, and so the iterator may skip over initialized groups, or return partially initialized memcgs. The cgroup core can not reasonably provide a clear answer on whether the object around the css has been fully initialized, as that depends on controller-specific locking and lifetime rules. Thus, introduce a memcg-specific flag that is set after the memcg has been initialized in css_online(), and read before mem_cgroup_iter() callers access the memcg members. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Tejun Heo <tj@kernel.org> Acked-by: Michal Hocko <mhocko@suse.cz> Cc: Hugh Dickins <hughd@google.com> Cc: Peter Zijlstra <peterz@infradead.org> 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-10-02ocfs2/dlm: should put mle when goto kill in dlm_assert_master_handleralex chen1-0/+4
In dlm_assert_master_handler, the mle is get in dlm_find_mle, should be put when goto kill, otherwise, this mle will never be released. Signed-off-by: Alex Chen <alex.chen@huawei.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Reviewed-by: joyce.xue <xuejiufei@huawei.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-10-02ring-buffer: Fix infinite spin in reading bufferSteven Rostedt (Red Hat)1-1/+1
Commit 651e22f2701b "ring-buffer: Always reset iterator to reader page" fixed one bug but in the process caused another one. The reset is to update the header page, but that fix also changed the way the cached reads were updated. The cache reads are used to test if an iterator needs to be updated or not. A ring buffer iterator, when created, disables writes to the ring buffer but does not stop other readers or consuming reads from happening. Although all readers are synchronized via a lock, they are only synchronized when in the ring buffer functions. Those functions may be called by any number of readers. The iterator continues down when its not interrupted by a consuming reader. If a consuming read occurs, the iterator starts from the beginning of the buffer. The way the iterator sees that a consuming read has happened since its last read is by checking the reader "cache". The cache holds the last counts of the read and the reader page itself. Commit 651e22f2701b changed what was saved by the cache_read when the rb_iter_reset() occurred, making the iterator never match the cache. Then if the iterator calls rb_iter_reset(), it will go into an infinite loop by checking if the cache doesn't match, doing the reset and retrying, just to see that the cache still doesn't match! Which should never happen as the reset is suppose to set the cache to the current value and there's locks that keep a consuming reader from having access to the data. Fixes: 651e22f2701b "ring-buffer: Always reset iterator to reader page" Signed-off-by: Steven Rostedt <rostedt@goodmis.org>