public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jia-Ju Bai <baijiaju1990@163.com>
Cc: linux-input@vger.kernel.org
Subject: Re: Potential bugs found in psmouse
Date: Wed, 17 Dec 2014 15:21:28 -0800	[thread overview]
Message-ID: <2262075.hjB9hShQFG@dtor-glaptop> (raw)
In-Reply-To: <000401d01812$91496a50$b3dc3ef0$@163.com>

[ 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

      reply	other threads:[~2014-12-17 23:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15  2:55 Potential bugs found in psmouse Jia-Ju Bai
2014-12-17 23:21 ` Dmitry Torokhov [this message]

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=2262075.hjB9hShQFG@dtor-glaptop \
    --to=dmitry.torokhov@gmail.com \
    --cc=baijiaju1990@163.com \
    --cc=linux-input@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