[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1297780870-4006-1-git-send-email-benjamin.tissoires@enac.fr>
Date: Tue, 15 Feb 2011 15:41:10 +0100
From: Benjamin Tissoires <benjamin.tissoires@...c.fr>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Benjamin Tissoires <benjamin.tissoires@...c.fr>,
Jiri Kosina <jkosina@...e.cz>,
Stephane Chatty <chatty@...-enac.fr>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] hidinput: kernel oops in out_cleanup in function hidinput_connect
Goto out_cleanup infers a kernel oops: hidinput_disconnect calls
input_unregister_driver to all members of hid->inputs.
However, hidinput already has been added to hid->inputs even
though input_register_device was not called.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@...c.fr>
---
Hi,
while playing with hidinput_connect, I found this bug.
Cheers,
Benjamin
drivers/hid/hid-input.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 7f552bf..f53911d 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -928,6 +928,7 @@ int hidinput_connect(struct hid_device *hid, unsigned int force)
return 0;
out_cleanup:
+ list_del(&hidinput->list);
input_free_device(hidinput->input);
kfree(hidinput);
out_unwind:
--
1.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists