lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150407085708.GB18078@kroah.com>
Date:	Tue, 7 Apr 2015 10:57:08 +0200
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	Paul Bolle <pebolle@...cali.nl>
Cc:	Andrew Andrianov <andrew@...mnt.org>,
	Arve Hjønnevåg <arve@...roid.com>,
	Riley Andrews <riandrews@...roid.com>,
	Chen Gang <gang.chen.5i5j@...il.com>,
	Fabian Frederick <fabf@...net.be>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] staging: ion: Add ion-physmem driver

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ