From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Roderick Colenbrander <roderick.colenbrander@sony.com>,
Jiri Kosina <jkosina@suse.cz>
Subject: [PATCH 5.3 10/25] HID: sony: Fix memory corruption issue on cleanup.
Date: Sun, 29 Sep 2019 15:56:13 +0200 [thread overview]
Message-ID: <20190929135012.835786737@linuxfoundation.org> (raw)
In-Reply-To: <20190929135006.127269625@linuxfoundation.org>
From: Roderick Colenbrander <roderick.colenbrander@sony.com>
commit 2bcdacb70327013ca2066bfcf2af1009eff01f1d upstream.
The sony driver is not properly cleaning up from potential failures in
sony_input_configured. Currently it calls hid_hw_stop, while hid_connect
is still running. This is not a good idea, instead hid_hw_stop should
be moved to sony_probe. Similar changes were recently made to Logitech
drivers, which were also doing improper cleanup.
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
CC: stable@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/hid-sony.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -2811,7 +2811,6 @@ err_stop:
sony_cancel_work_sync(sc);
sony_remove_dev_list(sc);
sony_release_device_id(sc);
- hid_hw_stop(hdev);
return ret;
}
@@ -2876,6 +2875,7 @@ static int sony_probe(struct hid_device
*/
if (!(hdev->claimed & HID_CLAIMED_INPUT)) {
hid_err(hdev, "failed to claim input\n");
+ hid_hw_stop(hdev);
return -ENODEV;
}
next prev parent reply other threads:[~2019-09-29 14:04 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-29 13:56 [PATCH 5.3 00/25] 5.3.2-stable review Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 01/25] netfilter: add missing IS_ENABLED(CONFIG_NF_TABLES) check to header-file Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 02/25] clocksource/drivers/timer-of: Do not warn on deferred probe Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 03/25] clocksource/drivers: Do not warn on probe defer Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 04/25] drm/amd/display: Allow cursor async updates for framebuffer swaps Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 05/25] drm/amd/display: Skip determining update type for async updates Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 06/25] drm/amd/display: Dont replace the dc_state for fast updates Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 07/25] drm/amd/display: readd -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 08/25] powerpc/xive: Fix bogus error code returned by OPAL Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 09/25] HID: prodikeys: Fix general protection fault during probe Greg Kroah-Hartman
2019-09-29 13:56 ` Greg Kroah-Hartman [this message]
2019-09-29 13:56 ` [PATCH 5.3 11/25] HID: logitech: Fix general protection fault caused by Logitech driver Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 12/25] HID: logitech-dj: Fix crash when initial logi_dj_recv_query_paired_devices fails Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 13/25] HID: hidraw: Fix invalid read in hidraw_ioctl Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 14/25] HID: Add quirk for HP X500 PIXART OEM mouse Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 15/25] mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword() Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 16/25] crypto: talitos - fix missing break in switch statement Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 17/25] clk: imx: imx8mm: fix audio pll setting Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 18/25] Revert "mm/z3fold.c: fix race between migration and destruction" Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 19/25] ALSA: usb-audio: Add Hiby device family to quirks for native DSD support Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 20/25] ALSA: usb-audio: Add DSD support for EVGA NU Audio Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 21/25] ALSA: dice: fix wrong packet parameter for Alesis iO26 Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 22/25] ALSA: hda - Add laptop imic fixup for ASUS M9V laptop Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 23/25] ALSA: hda - Apply AMD controller workaround for Raven platform Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 24/25] platform/x86: i2c-multi-instantiate: Derive the device name from parent Greg Kroah-Hartman
2019-09-29 13:56 ` [PATCH 5.3 25/25] objtool: Clobber user CFLAGS variable Greg Kroah-Hartman
2019-09-30 18:30 ` [PATCH 5.3 00/25] 5.3.2-stable review Guenter Roeck
2019-10-01 6:19 ` Greg Kroah-Hartman
2019-09-30 22:31 ` shuah
2019-10-01 6:18 ` Greg Kroah-Hartman
2019-10-01 1:11 ` Dan Rue
2019-10-01 6:18 ` Greg Kroah-Hartman
2019-10-01 14:59 ` Jon Hunter
2019-10-01 16:59 ` Greg Kroah-Hartman
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=20190929135012.835786737@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=roderick.colenbrander@sony.com \
--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;
as well as URLs for NNTP newsgroup(s).