linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: Fix crash when connecting HID keyboard
@ 2012-07-31 12:48 Andrzej Kaczmarek
  2012-07-31 14:01 ` Vinicius Costa Gomes
  2012-08-13 10:29 ` Johan Hedberg
  0 siblings, 2 replies; 3+ messages in thread
From: Andrzej Kaczmarek @ 2012-07-31 12:48 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Andrzej Kaczmarek

hidp_add_connection should return after setting up security watch when
connecting HID keyboard, otherwise req will be freed and encrypt_notify
callback will receive invalid pointer.
---
 profiles/input/device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/profiles/input/device.c b/profiles/input/device.c
index ed178b4..48d397a 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -663,6 +663,8 @@ static int hidp_add_connection(const struct input_device *idev,
 		iconn->req = req;
 		iconn->sec_watch = g_io_add_watch(iconn->intr_io, G_IO_OUT,
 							encrypt_notify, iconn);
+
+		return 0;
 	}
 
 	err = ioctl_connadd(req);
-- 
1.7.11.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] input: Fix crash when connecting HID keyboard
  2012-07-31 12:48 [PATCH] input: Fix crash when connecting HID keyboard Andrzej Kaczmarek
@ 2012-07-31 14:01 ` Vinicius Costa Gomes
  2012-08-13 10:29 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Vinicius Costa Gomes @ 2012-07-31 14:01 UTC (permalink / raw)
  To: Andrzej Kaczmarek; +Cc: linux-bluetooth

Hi Andrzej,

On 14:48 Tue 31 Jul, Andrzej Kaczmarek wrote:
> hidp_add_connection should return after setting up security watch when
> connecting HID keyboard, otherwise req will be freed and encrypt_notify
> callback will receive invalid pointer.
> ---

Patch looks good. Ack.

[snip]


Cheers,
-- 
Vinicius

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] input: Fix crash when connecting HID keyboard
  2012-07-31 12:48 [PATCH] input: Fix crash when connecting HID keyboard Andrzej Kaczmarek
  2012-07-31 14:01 ` Vinicius Costa Gomes
@ 2012-08-13 10:29 ` Johan Hedberg
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2012-08-13 10:29 UTC (permalink / raw)
  To: Andrzej Kaczmarek; +Cc: linux-bluetooth

Hi Andrzej,

On Tue, Jul 31, 2012, Andrzej Kaczmarek wrote:
> hidp_add_connection should return after setting up security watch when
> connecting HID keyboard, otherwise req will be freed and encrypt_notify
> callback will receive invalid pointer.
> ---
>  profiles/input/device.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied. Thanks.

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-13 10:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31 12:48 [PATCH] input: Fix crash when connecting HID keyboard Andrzej Kaczmarek
2012-07-31 14:01 ` Vinicius Costa Gomes
2012-08-13 10:29 ` Johan Hedberg

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).