<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib/lru_cache.c, branch v3.7-rc7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/lib/lru_cache.c?h=v3.7-rc7</id>
<link rel='self' href='https://git.amat.us/linux/atom/lib/lru_cache.c?h=v3.7-rc7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-05-25T15:39:52Z</updated>
<entry>
<title>lru_cache: use correct type in sizeof for allocation</title>
<updated>2011-05-25T15:39:52Z</updated>
<author>
<name>Ilia Mirkin</name>
<email>imirkin@alum.mit.edu</email>
</author>
<published>2011-05-25T00:13:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a08aa355af18c53f17f499c1cc6e2af66a77ba9b'/>
<id>urn:sha1:a08aa355af18c53f17f499c1cc6e2af66a77ba9b</id>
<content type='text'>
This has no actual effect, since sizeof(struct hlist_head) ==
sizeof(struct hlist_head *), but it's still the wrong type to use.

The semantic match that finds this problem:
// &lt;smpl&gt;
@@
type T;
identifier x;
@@
T *x;
...
* x = kzalloc(... * sizeof(T*) * ..., ...);
// &lt;/smpl&gt;

[akpm@linux-foundation.org: use kcalloc()]
Signed-off-by: Ilia Mirkin &lt;imirkin@alum.mit.edu&gt;
Acked-by: Lars Ellenberg &lt;lars@linbit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>The DRBD driver</title>
<updated>2009-10-01T19:17:49Z</updated>
<author>
<name>Philipp Reisner</name>
<email>philipp.reisner@linbit.com</email>
</author>
<published>2009-09-25T23:07:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b411b3637fa71fce9cf2acf0639009500f5892fe'/>
<id>urn:sha1:b411b3637fa71fce9cf2acf0639009500f5892fe</id>
<content type='text'>
Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
</feed>
