From: <oskar.andero@sonymobile.com>
To: <linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <balbi@ti.com>,
Truls Bengtsson <truls.bengtsson@sonymobile.com>,
Radovan Lekanovic <radovan.lekanovic@sonymobile.com>,
Oskar Andero <oskar.andero@sonymobile.com>
Subject: [RFC PATCH 0/1] usb: f_rndis: Avoid to use ERROR macro if cdev can be null
Date: Fri, 8 Mar 2013 13:53:39 +0100 [thread overview]
Message-ID: <1362747220-2204-1-git-send-email-oskar.andero@sonymobile.com> (raw)
Hi,
When going through our patches to be mainlined I stumbled on this one which
we have fixed in many different ways internally.
The problem is a NULL pointer dereference that can be triggered by disconnecting
the USB cable at a specific time.
Before submitting the final patch I would like to hear which solution you'd
prefer. As I see it there are four different ways to fix the problem:
1) Remove the ERROR() call completely.
2) Add an if-statement on cdev in rndis_response_complete() and use pr_err() or
ERROR().
3) Globally update the ERROR() macro to handle the case where cdev is null.
4) Use the attached patch (RFC PATCH 1/1) where ERROR() is simply replaced with pr_err().
Thanks!
-Oskar
Truls Bengtsson (1):
usb: f_rndis: Avoid to use ERROR macro if cdev can be null
drivers/usb/gadget/f_rndis.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
--
1.7.8.6
next reply other threads:[~2013-03-08 12:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 12:53 oskar.andero [this message]
2013-03-08 12:53 ` [RFC PATCH 1/1] " oskar.andero
2013-03-08 19:56 ` Sergei Shtylyov
2013-03-08 20:16 ` Greg Kroah-Hartman
2013-03-18 8:28 ` oskar.andero
2013-03-18 15:18 ` 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=1362747220-2204-1-git-send-email-oskar.andero@sonymobile.com \
--to=oskar.andero@sonymobile.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=radovan.lekanovic@sonymobile.com \
--cc=truls.bengtsson@sonymobile.com \
/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
all inboxes | Powered by JetHome®