From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Johan Hovold <johan@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 3.14 02/20] gpio: sysfs: fix memory leak in gpiod_sysfs_set_active_low
Date: Mon, 9 Feb 2015 16:33:54 +0800 [thread overview]
Message-ID: <20150209083042.157221174@linuxfoundation.org> (raw)
In-Reply-To: <20150209083042.033412726@linuxfoundation.org>
3.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 49d2ca84e433dab854c7a866bc6add09cfab682d upstream.
Fix memory leak in the gpio sysfs interface due to failure to drop
reference to device returned by class_find_device when setting the
gpio-line polarity.
Fixes: 0769746183ca ("gpiolib: add support for changing value polarity in sysfs")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpio/gpiolib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -959,7 +959,7 @@ int gpiod_sysfs_set_active_low(struct gp
}
status = sysfs_set_active_low(desc, dev, value);
-
+ put_device(dev);
unlock:
mutex_unlock(&sysfs_lock);
next prev parent reply other threads:[~2015-02-09 8:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-09 8:33 [PATCH 3.14 00/20] 3.14.33-stable review Greg Kroah-Hartman
2015-02-09 8:33 ` [PATCH 3.14 01/20] gpio: sysfs: fix memory leak in gpiod_export_link Greg Kroah-Hartman
2015-02-09 8:33 ` Greg Kroah-Hartman [this message]
2015-02-09 8:33 ` [PATCH 3.14 03/20] PCI: Add NEC variants to Stratus ftServer PCIe DMI check Greg Kroah-Hartman
2015-02-09 8:33 ` [PATCH 3.14 04/20] MIPS: IRQ: Fix disable_irq on CPU IRQs Greg Kroah-Hartman
2015-02-09 8:33 ` [PATCH 3.14 05/20] MIPS: OCTEON: fix kernel crash when offlining a CPU Greg Kroah-Hartman
2015-02-09 8:33 ` [PATCH 3.14 06/20] MIPS: Fix kernel lockup or crash after CPU offline/online Greg Kroah-Hartman
2015-02-09 8:33 ` [PATCH 3.14 07/20] ARM: 8299/1: mm: ensure local active ASID is marked as allocated on rollover Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 08/20] Complete oplock break jobs before closing file handle Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 09/20] mm: pagewalk: call pte_hole() for VM_PFNMAP during walk_page_range Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 10/20] lib/checksum.c: fix carry in csum_tcpudp_nofold Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 11/20] nilfs2: fix deadlock of segment constructor over I_SYNC flag Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 13/20] arm64: Fix up /proc/cpuinfo Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 14/20] ext4: prevent bugon on race between write/fcntl Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 15/20] lib/checksum.c: fix build for generic csum_tcpudp_nofold Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 16/20] ASoC: atmel_ssc_dai: fix start event for I2S mode Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 17/20] ASoC: sgtl5000: add delay before first I2C access Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 18/20] ALSA: ak411x: Fix stall in work callback Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 19/20] smpboot: Add missing get_online_cpus() in smpboot_register_percpu_thread() Greg Kroah-Hartman
2015-02-09 8:34 ` [PATCH 3.14 20/20] x86,kvm,vmx: Preserve CR4 across VM entry Greg Kroah-Hartman
2015-02-09 16:39 ` [PATCH 3.14 00/20] 3.14.33-stable review Guenter Roeck
2015-02-09 18:23 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150209083042.157221174@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox