2016-10-24 16:39:07

by David Vrabel

[permalink] [raw]
Subject: [GIT PULL] xen: xenfs fixes for 4.9-rc2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Linus,

Please git pull the following tag:

git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.9-fs-rc2-tag

I have separated these fixes out from the previous set because they
contain changes to generic filesystem code. Despite reposts and pings,
these changes got no response from the relevant maintainer.

I think the changes are trivial and uncontroversial. Please consider
merging.

xen: xenfs fixes for 4.9-rc2

- - Fix issues with simultaneous writes and reads to /proc/xen/xenbus.
- - Fix /proc/xen inside filesystem namespaces.

Thanks.

David

drivers/xen/privcmd.c | 5 +----
drivers/xen/privcmd.h | 3 ---
drivers/xen/xenbus/xenbus_comms.h | 2 --
drivers/xen/xenbus/xenbus_dev_frontend.c | 3 +--
drivers/xen/xenbus/xenbus_probe.c | 2 +-
drivers/xen/xenfs/super.c | 10 ++++------
fs/libfs.c | 15 +++++++++++++--
fs/proc/generic.c | 1 +
fs/proc/internal.h | 1 -
include/linux/fs.h | 2 +-
include/linux/proc_fs.h | 2 ++
11 files changed, 24 insertions(+), 22 deletions(-)

David Vrabel (2):
libfs: allow simple_fill_super() to add symlinks
xenfs: replace xenbus and privcmd with symlinks

Seth Forshee (1):
xenbus: Use proc_create_mount_point() to create /proc/xen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYDjixAAoJEFxbo/MsZsTR2mcH/ik/YMQkQvrFkQpYSjhDJQ1b
xROWMLdN13bNDQiKTd/BdM1rWh4d/Rj/4iVMcYoJuhlpQ6TU8DHJCH77tA5noA5g
Rpaafmp5jFzKrTIAUSHo+7nZYJLLxOVC2PYHqBcMy5wEY7zaGf6KxLmqOzgghW0v
t/rOMFFNrSMzjmOYx+rv4VCIiwdkRpXPi0r+u38JuFzCGMbscrgqyGLEIe56xLJC
8iZe6uqBQNILox2Tgf7MQeZML8XtzzHHcgq1FxaVdWZMZ/PoIsx78v1ZMTepcCu/
JYiH2AE4fIYTi7v6IhEzVeNPvWfoX87O238rpobSXMLcophn6qSOKuF+hsxN3Yg=
=Q8rr
-----END PGP SIGNATURE-----


2016-10-25 03:28:29

by Linus Torvalds

[permalink] [raw]
Subject: Re: [GIT PULL] xen: xenfs fixes for 4.9-rc2

On Mon, Oct 24, 2016 at 9:37 AM, David Vrabel <[email protected]> wrote:
>
> I think the changes are trivial and uncontroversial.

Hmm. Sadly, they are also buggy.

This:

if (files->mode & S_IFLNK) {

is simply wrong. The correct test for S_IFLNK is to do

if ((files->mode & S_IFMT) == S_IFLNK) {

and quite frankly, the right model is almost certainly to just do a
switch-statement that does something like

switch (files->mode & S_IFMT) {
case S_IFLNK:
...
case S_IFREG:
case 0:
....
default:
..error..

because maybe somebody wants to add other cases later (and even if
not, it's just wrong to randomly change any other mode into S_IFREG).

And while I could easily do an evil merge and fix that part up, I
really don't want to do things like that. So I'm not going to pull
this.

Linus