<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/relay.c, branch v2.6.25</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.25</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.25'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-03-26T11:04:09Z</updated>
<entry>
<title>relay: set an spd_release() hook for splice</title>
<updated>2008-03-26T11:04:09Z</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2008-03-26T11:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5eb7f9fa847b8ab6e4864bfb8cb45f370844a47c'/>
<id>urn:sha1:5eb7f9fa847b8ab6e4864bfb8cb45f370844a47c</id>
<content type='text'>
relay doesn't reference the pages it adds, however we need a non-NULL
hook or splice_to_pipe() can oops.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>set relay file can not be read by pread(2)</title>
<updated>2008-03-26T11:01:28Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2008-03-26T11:01:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37529fe9f62835e1c11895a1895064748b032dc1'/>
<id>urn:sha1:37529fe9f62835e1c11895a1895064748b032dc1</id>
<content type='text'>
I found that relay files can be read by pread(2). I fix it,
for relay files are not capable of seeking.

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>relay: fix subbuf_splice_actor() adding too many pages</title>
<updated>2008-03-17T08:04:59Z</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2008-03-17T08:04:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=16d54669427069ef2823752c365d695b0cc4748f'/>
<id>urn:sha1:16d54669427069ef2823752c365d695b0cc4748f</id>
<content type='text'>
If subbuf_pages was larger than the max number of pages the pipe
buffer will hold, subbuf_splice_actor() would happily go beyond
the array size.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>relay: nopage</title>
<updated>2008-02-06T18:41:07Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2008-02-06T09:37:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1e096129bff79ae551592539bef19bfb5c9efa1'/>
<id>urn:sha1:a1e096129bff79ae551592539bef19bfb5c9efa1</id>
<content type='text'>
Convert relay from nopage to fault.
Remove redundant vma range checks.
Switch from OOM to SIGBUS if the resource is not available.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.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>vm audit: add VM_DONTEXPAND to mmap for drivers that need it</title>
<updated>2008-02-04T15:55:38Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2008-02-02T02:08:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2f98735c9c24ea1f0d40a364d4e63611b689b795'/>
<id>urn:sha1:2f98735c9c24ea1f0d40a364d4e63611b689b795</id>
<content type='text'>
Drivers that register a -&gt;fault handler, but do not range-check the
offset argument, must set VM_DONTEXPAND in the vm_flags in order to
prevent an expanding mremap from overflowing the resource.

I've audited the tree and attempted to fix these problems (usually by
adding VM_DONTEXPAND where it is not obvious).

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>whitespace fixes: relayfs</title>
<updated>2007-10-18T21:37:24Z</updated>
<author>
<name>Daniel Walker</name>
<email>dwalker@mvista.com</email>
</author>
<published>2007-10-18T10:06:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1bfbc608ba05951678eedc246c9baf62367764a0'/>
<id>urn:sha1:1bfbc608ba05951678eedc246c9baf62367764a0</id>
<content type='text'>
Signed-off-by: Daniel Walker &lt;dwalker@mvista.com&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.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>Fix a use after free bug in kernel-&gt;userspace relay file support</title>
<updated>2007-07-31T22:39:42Z</updated>
<author>
<name>Jesper Juhl</name>
<email>jesper.juhl@gmail.com</email>
</author>
<published>2007-07-31T07:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9b3febc5b9c55a76b838c977b078195ec8bb95e'/>
<id>urn:sha1:c9b3febc5b9c55a76b838c977b078195ec8bb95e</id>
<content type='text'>
Coverity spotted what looks like a real possible case of using a variable
after it has been freed.  The problem is in
kernel/relay.c::relay_open_buf()

If the code hits "goto free_buf;" it ends up in this code :

  free_buf:
    	relay_destroy_buf(buf);	&lt;--- calls kfree() on 'buf'.
  free_name:
   	kfree(tmpname);
  end:
  	return buf;		&lt;-- use after free of 'buf'.

I read through the callers and they all handle a NULL return from this
function as an error (and hitting the 'free_buf' label only happens on
failure to chan-&gt;cb-&gt;create_buf_file(), so that looks like a clear error to
me).

The patch simply sets 'buf' to NULL after the call to
relay_destroy_buf(buf); - as far as I can see that should take care of the
problem.

The patch also corrects a reference to a documentation file while
I was at it.

Note from Mathieu: the documentation reference change should have been
done in a separate patch, but I guess no one will really care.

Signed-off-by: Jesper Juhl &lt;jesper.juhl@gmail.com&gt;
Acked-by: "David J. Wilder" &lt;wilder@us.ibm.com&gt;
Tested-by: "David J. Wilder" &lt;wilder@us.ibm.com&gt;
Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Cc: Karim Yaghmour &lt;karim@opersys.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>kernel/relay.c: make functions static</title>
<updated>2007-07-19T17:04:47Z</updated>
<author>
<name>Adrian Bunk</name>
<email>bunk@stusta.de</email>
</author>
<published>2007-07-19T08:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=01c55ed3260e130f152b7fbab2e18f23980b59a4'/>
<id>urn:sha1:01c55ed3260e130f152b7fbab2e18f23980b59a4</id>
<content type='text'>
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Cc: Tom Zanussi &lt;zanussi@us.ibm.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>relay: fixup kerneldoc comment</title>
<updated>2007-07-13T12:14:28Z</updated>
<author>
<name>Tom Zanussi</name>
<email>zanussi@us.ibm.com</email>
</author>
<published>2007-07-12T06:12:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3f35d98b3b87d2506289320375687c6e9bc53ed'/>
<id>urn:sha1:d3f35d98b3b87d2506289320375687c6e9bc53ed</id>
<content type='text'>
Change comment from kerneldoc to normal.

Signed-off-by: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>relay: fix bogus cast in subbuf_splice_actor()</title>
<updated>2007-07-13T12:14:26Z</updated>
<author>
<name>Tom Zanussi</name>
<email>zanussi@us.ibm.com</email>
</author>
<published>2007-07-12T06:12:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24da24de2eae0c277b85836e2b4b09cfafeea995'/>
<id>urn:sha1:24da24de2eae0c277b85836e2b4b09cfafeea995</id>
<content type='text'>
The current code that sets the read position in subbuf_splice_actor may
give erroneous results if the buffer size isn't a power of 2.  This
patch fixes the problem.

Signed-off-by: Tom Zanussi &lt;zanussi@us.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
</feed>
