<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/net/9p, branch v3.8</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.8</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-10-22T07:49:36Z</updated>
<entry>
<title>virtio: 9p: correctly pass physical address to userspace for high pages</title>
<updated>2012-10-22T07:49:36Z</updated>
<author>
<name>Will Deacon</name>
<email>will.deacon@arm.com</email>
</author>
<published>2012-10-19T13:03:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b9cdc88df8e63e81c723b82c286fc97f5d0dc325'/>
<id>urn:sha1:b9cdc88df8e63e81c723b82c286fc97f5d0dc325</id>
<content type='text'>
When using a virtio transport, the 9p net device may pass the physical
address of a kernel buffer to userspace via a scatterlist inside a
virtqueue. If the kernel buffer is mapped outside of the linear mapping
(e.g. highmem), then virt_to_page will return a bogus value and we will
populate the scatterlist with junk.

This patch uses kmap_to_page when populating the page array for a kernel
buffer.

Cc: stable@kernel.org
Cc: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus-merge-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs</title>
<updated>2012-10-12T00:59:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-12T00:59:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=940e3a8dd6683a3787faf769b3df7a06f1c2fa31'/>
<id>urn:sha1:940e3a8dd6683a3787faf769b3df7a06f1c2fa31</id>
<content type='text'>
Pull v9fs update from Eric Van Hensbergen.

* tag 'for-linus-merge-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9P: Fix race between p9_write_work() and p9_fd_request()
  9P: Fix race in p9_write_work()
  9P: fix test at the end of p9_write_work()
  9P: Fix race in p9_read_work()
  9p: don't use __getname/__putname for uname/aname
  net/9p: Check errno validity
  fs/9p: avoid debug OOPS when reading a long symlink
</content>
</entry>
<entry>
<title>9P: Fix race between p9_write_work() and p9_fd_request()</title>
<updated>2012-10-11T17:03:31Z</updated>
<author>
<name>Simon Derr</name>
<email>simon.derr@bull.net</email>
</author>
<published>2012-09-17T13:16:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=759f42987f98915764bad922ee123acb0eadbe33'/>
<id>urn:sha1:759f42987f98915764bad922ee123acb0eadbe33</id>
<content type='text'>
Race scenario:

thread A			thread B

p9_write_work()                p9_fd_request()

if (list_empty
  (&amp;m-&gt;unsent_req_list))
  ...

                               spin_lock(&amp;client-&gt;lock);
                               req-&gt;status = REQ_STATUS_UNSENT;
                               list_add_tail(..., &amp;m-&gt;unsent_req_list);
                               spin_unlock(&amp;client-&gt;lock);
                               ....
                               if (n &amp; POLLOUT &amp;&amp;
                               !test_and_set_bit(Wworksched, &amp;m-&gt;wsched)
                               schedule_work(&amp;m-&gt;wq);
                               --&gt; not done because Wworksched is set

  clear_bit(Wworksched, &amp;m-&gt;wsched);
  return;

--&gt; nobody will take care of sending the new request.

This is not very likely to happen though, because p9_write_work()
being called with an empty unsent_req_list is not frequent.
But this also means that taking the lock earlier will not be costly.

Signed-off-by: Simon Derr &lt;simon.derr@bull.net&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2012-10-03T03:25:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-03T03:25:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=aab174f0df5d72d31caccf281af5f614fa254578'/>
<id>urn:sha1:aab174f0df5d72d31caccf281af5f614fa254578</id>
<content type='text'>
Pull vfs update from Al Viro:

 - big one - consolidation of descriptor-related logics; almost all of
   that is moved to fs/file.c

   (BTW, I'm seriously tempted to rename the result to fd.c.  As it is,
   we have a situation when file_table.c is about handling of struct
   file and file.c is about handling of descriptor tables; the reasons
   are historical - file_table.c used to be about a static array of
   struct file we used to have way back).

   A lot of stray ends got cleaned up and converted to saner primitives,
   disgusting mess in android/binder.c is still disgusting, but at least
   doesn't poke so much in descriptor table guts anymore.  A bunch of
   relatively minor races got fixed in process, plus an ext4 struct file
   leak.

 - related thing - fget_light() partially unuglified; see fdget() in
   there (and yes, it generates the code as good as we used to have).

 - also related - bits of Cyrill's procfs stuff that got entangled into
   that work; _not_ all of it, just the initial move to fs/proc/fd.c and
   switch of fdinfo to seq_file.

 - Alex's fs/coredump.c spiltoff - the same story, had been easier to
   take that commit than mess with conflicts.  The rest is a separate
   pile, this was just a mechanical code movement.

 - a few misc patches all over the place.  Not all for this cycle,
   there'll be more (and quite a few currently sit in akpm's tree)."

Fix up trivial conflicts in the android binder driver, and some fairly
simple conflicts due to two different changes to the sock_alloc_file()
interface ("take descriptor handling from sock_alloc_file() to callers"
vs "net: Providing protocol type via system.sockprotoname xattr of
/proc/PID/fd entries" adding a dentry name to the socket)

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (72 commits)
  MAX_LFS_FILESIZE should be a loff_t
  compat: fs: Generic compat_sys_sendfile implementation
  fs: push rcu_barrier() from deactivate_locked_super() to filesystems
  btrfs: reada_extent doesn't need kref for refcount
  coredump: move core dump functionality into its own file
  coredump: prevent double-free on an error path in core dumper
  usb/gadget: fix misannotations
  fcntl: fix misannotations
  ceph: don't abuse d_delete() on failure exits
  hypfs: -&gt;d_parent is never NULL or negative
  vfs: delete surplus inode NULL check
  switch simple cases of fget_light to fdget
  new helpers: fdget()/fdput()
  switch o2hb_region_dev_write() to fget_light()
  proc_map_files_readdir(): don't bother with grabbing files
  make get_file() return its argument
  vhost_set_vring(): turn pollstart/pollstop into bool
  switch prctl_set_mm_exe_file() to fget_light()
  switch xfs_find_handle() to fget_light()
  switch xfs_swapext() to fget_light()
  ...
</content>
</entry>
<entry>
<title>unexport sock_map_fd(), switch to sock_alloc_file()</title>
<updated>2012-09-27T01:08:50Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2012-08-18T04:25:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=56b31d1c9f1e6a3ad92e7bfe252721e05d92b285'/>
<id>urn:sha1:56b31d1c9f1e6a3ad92e7bfe252721e05d92b285</id>
<content type='text'>
Both modular callers of sock_map_fd() had been buggy; sctp one leaks
descriptor and file if copy_to_user() fails, 9p one shouldn't be
exposing file in the descriptor table at all.

Switch both to sock_alloc_file(), export it, unexport sock_map_fd() and
make it static.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>9P: Fix race in p9_write_work()</title>
<updated>2012-09-17T19:54:11Z</updated>
<author>
<name>Simon Derr</name>
<email>simon.derr@bull.net</email>
</author>
<published>2012-09-17T13:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=584a8c13d58423462680907d4cc40d9929c9030a'/>
<id>urn:sha1:584a8c13d58423462680907d4cc40d9929c9030a</id>
<content type='text'>
See previous commit about p9_read_work() for details.

This fixes a similar race between p9_write_work() and p9_poll_mux()

Signed-off-by: Simon Derr &lt;simon.derr@bull.net&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
</content>
</entry>
<entry>
<title>9P: fix test at the end of p9_write_work()</title>
<updated>2012-09-17T19:54:11Z</updated>
<author>
<name>Simon Derr</name>
<email>simon.derr@bull.net</email>
</author>
<published>2012-09-17T13:16:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1957b3a86f8eb5ceab32e3aae99e2822258aa530'/>
<id>urn:sha1:1957b3a86f8eb5ceab32e3aae99e2822258aa530</id>
<content type='text'>
At the end of p9_write_work() we want to test if there is still data to send.
This means:
- either the current request still has data to send (wsize != 0)
- or there are requests in the unsent queue

Signed-off-by: Simon Derr &lt;simon.derr@bull.net&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
</content>
</entry>
<entry>
<title>9P: Fix race in p9_read_work()</title>
<updated>2012-09-17T19:54:11Z</updated>
<author>
<name>Simon Derr</name>
<email>simon.derr@bull.net</email>
</author>
<published>2012-09-17T13:16:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0462194d358c2e040282d4d1a4fd1aab84417e42'/>
<id>urn:sha1:0462194d358c2e040282d4d1a4fd1aab84417e42</id>
<content type='text'>
Race scenario between p9_read_work() and p9_poll_mux()

Data arrive, Rworksched is set, p9_read_work() is called.

thread A                                thread B

                                        p9_read_work()
                                                .
                                        reads data
                                                .
                                        checks if new data ready. No.
                                                .
                                        gets preempted
                                                .
More data arrive, p9_poll_mux() is called.      .
                                                .
                                                .
p9_poll_mux()                                   .
                                                .
if (!test_and_set_bit(Rworksched,               .
                      &amp;m-&gt;wsched)) {            .
  schedule_work(&amp;m-&gt;rq);                        .
}                                               .
                                                .
-&gt; does not schedule work because               .
   Rworksched is set                            .
                                                .
                                        clear_bit(Rworksched, &amp;m-&gt;wsched);
                                        return;

No work has been scheduled, and yet data are waiting.

Currently p9_read_work() checks if there is data to read,
and if not, it clears Rworksched.

I think it should clear Rworksched first, and then check if there is data to read.

Signed-off-by: Simon Derr &lt;simon.derr@bull.net&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
</content>
</entry>
<entry>
<title>net/9p: Check errno validity</title>
<updated>2012-09-06T18:54:55Z</updated>
<author>
<name>Simon Derr</name>
<email>simon.derr@bull.net</email>
</author>
<published>2012-08-10T13:52:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=43def35c1030d91a7414936c7c1b416828b20afb'/>
<id>urn:sha1:43def35c1030d91a7414936c7c1b416828b20afb</id>
<content type='text'>
While working on a modified server I had the Linux clients crash
a few times. This lead me to find this:

Some error codes are directly extracted from the server replies.
A malformed server reply could contain an invalid error code, with a
very large value. If this value is then passed to ERR_PTR() it will
not be properly detected as an error code by IS_ERR() and as a result
the kernel will dereference an invalid pointer.

This patch tries to avoid this.

Signed-off-by: Simon Derr &lt;simon.derr@bull.net&gt;
Signed-off-by: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
</content>
</entry>
<entry>
<title>workqueue: deprecate flush[_delayed]_work_sync()</title>
<updated>2012-08-20T21:51:24Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-08-20T21:51:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=43829731dd372d04d6706c51052b9dabab9ca356'/>
<id>urn:sha1:43829731dd372d04d6706c51052b9dabab9ca356</id>
<content type='text'>
flush[_delayed]_work_sync() are now spurious.  Mark them deprecated
and convert all users to flush[_delayed]_work().

If you're cc'd and wondering what's going on: Now all workqueues are
non-reentrant and the regular flushes guarantee that the work item is
not pending or running on any CPU on return, so there's no reason to
use the sync flushes at all and they're going away.

This patch doesn't make any functional difference.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Mattia Dongili &lt;malattia@linux.it&gt;
Cc: Kent Yoder &lt;key@linux.vnet.ibm.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Cc: Karsten Keil &lt;isdn@linux-pingi.de&gt;
Cc: Bryan Wu &lt;bryan.wu@canonical.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Alasdair Kergon &lt;agk@redhat.com&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@infradead.org&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: linux-wireless@vger.kernel.org
Cc: Anton Vorontsov &lt;cbou@mail.ru&gt;
Cc: Sangbeom Kim &lt;sbkim73@samsung.com&gt;
Cc: "James E.J. Bottomley" &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Eric Van Hensbergen &lt;ericvh@gmail.com&gt;
Cc: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Cc: Petr Vandrovec &lt;petr@vandrovec.name&gt;
Cc: Mark Fasheh &lt;mfasheh@suse.com&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Avi Kivity &lt;avi@redhat.com&gt; 
</content>
</entry>
</feed>
