From: Dan Carpenter <dan.carpenter@oracle.com>
To: Shailendra Verma <shailendra.v@samsung.com>
Cc: Jarod Wilson <jarod@wilsonet.com>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
Ravikant Sharma <ravikant.s2@samsung.com>,
vidushi.koul@samsung.com, linux-kernel@vger.kernel.org
Subject: Re: Staging: Media: Lirc - Fix possible ERR_PTR() dereferencing.
Date: Tue, 20 Sep 2016 11:45:11 +0300 [thread overview]
Message-ID: <20160920084510.GG13620@mwanda> (raw)
In-Reply-To: <1474354281-18962-1-git-send-email-shailendra.v@samsung.com>
On Tue, Sep 20, 2016 at 12:21:21PM +0530, Shailendra Verma wrote:
> This is of course wrong to call kfree() if memdup_user() fails,
> no memory was allocated and the error in the error-valued pointer
> should be returned.
>
> Reviewed-by: Ravikant Sharma <ravikant.s2@samsung.com>
> Signed-off-by: Shailendra Verma <shailendra.v@samsung.com>
Calling kfree(NULL) is fine so there is no bug in the original code.
Also this patch creates a new locking bug.
regards,
dan carpenter
prev parent reply other threads:[~2016-09-20 8:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-20 6:51 Staging: Media: Lirc - Fix possible ERR_PTR() dereferencing Shailendra Verma
2016-09-20 8:45 ` Dan Carpenter [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=20160920084510.GG13620@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jarod@wilsonet.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=ravikant.s2@samsung.com \
--cc=shailendra.v@samsung.com \
--cc=vidushi.koul@samsung.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;
as well as URLs for NNTP newsgroup(s).