From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: "Andrew Andrianov" <andrew@ncrmnt.org>,
"Arve Hjønnevåg" <arve@android.com>,
"Riley Andrews" <riandrews@android.com>,
"Chen Gang" <gang.chen.5i5j@gmail.com>,
"Fabian Frederick" <fabf@skynet.be>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: ion: Add ion-physmem driver
Date: Tue, 7 Apr 2015 10:57:08 +0200 [thread overview]
Message-ID: <20150407085708.GB18078@kroah.com> (raw)
In-Reply-To: <1428395745.634.168.camel@x220>
On Tue, Apr 07, 2015 at 10:35:45AM +0200, Paul Bolle wrote:
> > + ipdev->heap = ion_heap_create(&ipdev->data);
> > + if (!ipdev->heap)
> > + goto errfreeipdev;
> > +
> > + if (!try_module_get(THIS_MODULE))
> > + goto errfreeheap;
>
> For built-in only code THIS_MODULE will be, basically, always NULL. So,
> I think try_module_get() will always return true.
Even if this is a module, this code is racy and broken, no module should
_ever_ call try_module_get(THIS_MODULE). That's a sign of broken code,
and/or a broken API.
thanks,
greg k-h
next prev parent reply other threads:[~2015-04-07 8:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-06 15:49 [PATCH 0/2] staging: ion: Add ion-physmem driver Andrew Andrianov
2015-04-06 15:58 ` [PATCH 1/2] " Andrew Andrianov
2015-04-07 8:35 ` Paul Bolle
2015-04-07 8:57 ` Greg Kroah-Hartman [this message]
2015-04-07 11:35 ` Andrew
2015-04-06 15:59 ` [PATCH 2/2] staging: ion: Add ion-physmem documentation Andrew Andrianov
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=20150407085708.GB18078@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=andrew@ncrmnt.org \
--cc=arve@android.com \
--cc=fabf@skynet.be \
--cc=gang.chen.5i5j@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pebolle@tiscali.nl \
--cc=riandrews@android.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