* Potential bugs found in psmouse
@ 2014-12-15 2:55 Jia-Ju Bai
2014-12-17 23:21 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Jia-Ju Bai @ 2014-12-15 2:55 UTC (permalink / raw)
To: linux-input
Recently I test linux device drivers 3.17.2, and find some potential bugs.
The target file is drivers/input/mouse/psmouse-base.c, which is used to
build psmouse.ko. I hope you can help me check my findings:
[1] psmouse_switch_protocol is called by psmouse_connect when initializing
the driver. However, psmouse_switch_protocol may be failed and return -1,
but its return value is not checked in psmouse_connect. In my experiment of
running the driver, when psmouse_switch_protocol in psmouse_connect is
failed, the system crash will occur.
Could you help me check these findings? Thank you very much, and I'm looking
forward to your reply.
--
Jia-Ju Bai
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Potential bugs found in psmouse
2014-12-15 2:55 Potential bugs found in psmouse Jia-Ju Bai
@ 2014-12-17 23:21 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2014-12-17 23:21 UTC (permalink / raw)
To: Jia-Ju Bai; +Cc: linux-input
[ Reposting what I replied in bugzilla... ]
Hi Jia-Ju,
On Monday, December 15, 2014 10:55:21 AM Jia-Ju Bai wrote:
> Recently I test linux device drivers 3.17.2, and find some potential bugs.
>
> The target file is drivers/input/mouse/psmouse-base.c, which is used to
> build psmouse.ko. I hope you can help me check my findings:
> [1] psmouse_switch_protocol is called by psmouse_connect when initializing
> the driver. However, psmouse_switch_protocol may be failed and return -1,
> but its return value is not checked in psmouse_connect. In my experiment of
> running the driver, when psmouse_switch_protocol in psmouse_connect is
> failed, the system crash will occur.
psmouse_connect() calls psmouse_switch_protocol with NULL as protocol
argument. When psmouse_switch_protocol() gets NULL as protocol it will not
fail. Do you actually have a crash trace?
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-17 23:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-15 2:55 Potential bugs found in psmouse Jia-Ju Bai
2014-12-17 23:21 ` Dmitry Torokhov
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).