[RFC PATCH] [blk]: fix NULL bdev dereference in driver's merge callbacks

2014-07-02 Thread Stanislav Kinsbursky
n-NULL bio->bi_bdev pointer to make sure, that the device is defined, otherwise there is no sense to call this callback at all. Signed-of-by: Stanislav Kinsbursky --- block/bio.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/bio.c b/block/bio.c index 0ec61c9..cb45186

[RFC PATCH] [blk]: fix NULL bdev dereference in driver's merge callbacks

2014-07-02 Thread Stanislav Kinsbursky
is defined, otherwise there is no sense to call this callback at all. Signed-of-by: Stanislav Kinsbursky stanislav.kinsbur...@profitbricks.com --- block/bio.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/bio.c b/block/bio.c index 0ec61c9..cb45186 100644

[PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-02-26 Thread Stanislav Kinsbursky
. Reported-by: Weng Meiling Signed-off-by: Stanislav Kinsbursky Cc: sta...@vger.kernel.org --- fs/nfsd/nfsctl.c |5 + include/linux/sunrpc/svcsock.h |1 + net/sunrpc/svcsock.c | 16 3 files changed, 22 insertions(+), 0 deletions(-) diff --gi

[PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-02-26 Thread Stanislav Kinsbursky
Meiling wengmeiling.w...@huawei.com Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- fs/nfsd/nfsctl.c |5 + include/linux/sunrpc/svcsock.h |1 + net/sunrpc/svcsock.c | 16 3 files changed, 22 insertions

Re: [PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-02-21 Thread Stanislav Kinsbursky
21.02.2014 01:31, J. Bruce Fields пишет: On Wed, Feb 19, 2014 at 06:57:46PM +0400, Stanislav Kinsbursky wrote: 19.02.2014 18:50, J. Bruce Fields пишет: On Wed, Feb 19, 2014 at 02:26:33PM +0400, Stanislav Kinsbursky wrote: 18.02.2014 19:44, J. Bruce Fields пишет: On Tue, Feb 18, 2014 at 07:19

Re: [PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-02-21 Thread Stanislav Kinsbursky
21.02.2014 01:31, J. Bruce Fields пишет: On Wed, Feb 19, 2014 at 06:57:46PM +0400, Stanislav Kinsbursky wrote: 19.02.2014 18:50, J. Bruce Fields пишет: On Wed, Feb 19, 2014 at 02:26:33PM +0400, Stanislav Kinsbursky wrote: 18.02.2014 19:44, J. Bruce Fields пишет: On Tue, Feb 18, 2014 at 07:19

Re: [PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-02-19 Thread Stanislav Kinsbursky
19.02.2014 18:50, J. Bruce Fields пишет: On Wed, Feb 19, 2014 at 02:26:33PM +0400, Stanislav Kinsbursky wrote: 18.02.2014 19:44, J. Bruce Fields пишет: On Tue, Feb 18, 2014 at 07:19:31PM +0400, Stanislav Kinsbursky wrote: 18.02.2014 02:19, J. Bruce Fields пишет: On Sat, Feb 15, 2014 at 09:51

Re: [PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-02-19 Thread Stanislav Kinsbursky
18.02.2014 19:44, J. Bruce Fields пишет: On Tue, Feb 18, 2014 at 07:19:31PM +0400, Stanislav Kinsbursky wrote: 18.02.2014 02:19, J. Bruce Fields пишет: On Sat, Feb 15, 2014 at 09:51:20AM +0800, Weng Meiling wrote: Hi Bruce, The upstream has merged your git tree for-3.14

Re: [PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-02-19 Thread Stanislav Kinsbursky
18.02.2014 19:44, J. Bruce Fields пишет: On Tue, Feb 18, 2014 at 07:19:31PM +0400, Stanislav Kinsbursky wrote: 18.02.2014 02:19, J. Bruce Fields пишет: On Sat, Feb 15, 2014 at 09:51:20AM +0800, Weng Meiling wrote: Hi Bruce, The upstream has merged your git tree for-3.14

Re: [PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-02-19 Thread Stanislav Kinsbursky
19.02.2014 18:50, J. Bruce Fields пишет: On Wed, Feb 19, 2014 at 02:26:33PM +0400, Stanislav Kinsbursky wrote: 18.02.2014 19:44, J. Bruce Fields пишет: On Tue, Feb 18, 2014 at 07:19:31PM +0400, Stanislav Kinsbursky wrote: 18.02.2014 02:19, J. Bruce Fields пишет: On Sat, Feb 15, 2014 at 09:51

Re: [PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-02-18 Thread Stanislav Kinsbursky
Thanks! Weng Meiling On 2014/1/4 6:22, J. Bruce Fields wrote: On Mon, Dec 30, 2013 at 05:23:59PM +0300, Stanislav Kinsbursky wrote: There could be a case, when NFSd file system is mounted in network, different to socket's one, like below: "ip netns exec" creates new network and mou

Re: [PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-02-18 Thread Stanislav Kinsbursky
On 2014/1/4 6:22, J. Bruce Fields wrote: On Mon, Dec 30, 2013 at 05:23:59PM +0300, Stanislav Kinsbursky wrote: There could be a case, when NFSd file system is mounted in network, different to socket's one, like below: ip netns exec creates new network and mount namespace, which duplicates NFSd

Re: [PATCH] ipc: Fix 2 bugs in msgrcv() MSG_COPY implementation

2014-01-28 Thread Stanislav Kinsbursky
Hello Michael. Thanks you for your careful explanation of the problem. All is true and I like your solution. Acked-by: Stanislav Kinsbursky 3.01.2014 17:56, Michael Kerrisk (man-pages) пишет: Hello Stanislav, Pavel, While documenting the msgrcv() MSG_COPY flag that you (Stanislaw) added

Re: [PATCH] ipc: Fix 2 bugs in msgrcv() MSG_COPY implementation

2014-01-28 Thread Stanislav Kinsbursky
Hello Michael. Thanks you for your careful explanation of the problem. All is true and I like your solution. Acked-by: Stanislav Kinsbursky skinsbur...@parallels.com 3.01.2014 17:56, Michael Kerrisk (man-pages) пишет: Hello Stanislav, Pavel, While documenting the msgrcv() MSG_COPY flag

Re: [PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-01-08 Thread Stanislav Kinsbursky
04.01.2014 02:22, J. Bruce Fields пишет: On Mon, Dec 30, 2013 at 05:23:59PM +0300, Stanislav Kinsbursky wrote: There could be a case, when NFSd file system is mounted in network, different to socket's one, like below: "ip netns exec" creates new network and mount namespace, which

Re: [PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2014-01-08 Thread Stanislav Kinsbursky
04.01.2014 02:22, J. Bruce Fields пишет: On Mon, Dec 30, 2013 at 05:23:59PM +0300, Stanislav Kinsbursky wrote: There could be a case, when NFSd file system is mounted in network, different to socket's one, like below: ip netns exec creates new network and mount namespace, which duplicates NFSd

[PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2013-12-30 Thread Stanislav Kinsbursky
Meiling Signed-off-by: Stanislav Kinsbursky Cc: sta...@vger.kernel.org --- fs/nfsd/nfsctl.c |5 + include/linux/sunrpc/svcsock.h |1 + net/sunrpc/svcsock.c | 11 +++ 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/fs/nfsd/nfsctl.c b/fs

[PATCH] nfsd: check passed socket's net matches NFSd superblock's one

2013-12-30 Thread Stanislav Kinsbursky
...@huawei.com Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- fs/nfsd/nfsctl.c |5 + include/linux/sunrpc/svcsock.h |1 + net/sunrpc/svcsock.c | 11 +++ 3 files changed, 17 insertions(+), 0 deletions(-) diff --git

Re: call_usermodehelper in containers

2013-11-15 Thread Stanislav Kinsbursky
15.11.2013 15:03, Eric W. Biederman пишет: Stanislav Kinsbursky writes: 12.11.2013 17:30, Jeff Layton пишет: On Tue, 12 Nov 2013 17:02:36 +0400 Stanislav Kinsbursky wrote: 12.11.2013 15:12, Jeff Layton пишет: On Mon, 11 Nov 2013 16:47:03 -0800 Greg KH wrote: On Mon, Nov 11, 2013 at 07

Re: call_usermodehelper in containers

2013-11-15 Thread Stanislav Kinsbursky
12.11.2013 17:30, Jeff Layton пишет: On Tue, 12 Nov 2013 17:02:36 +0400 Stanislav Kinsbursky wrote: 12.11.2013 15:12, Jeff Layton пишет: On Mon, 11 Nov 2013 16:47:03 -0800 Greg KH wrote: On Mon, Nov 11, 2013 at 07:18:25AM -0500, Jeff Layton wrote: We have a bit of a problem wrt

Re: call_usermodehelper in containers

2013-11-15 Thread Stanislav Kinsbursky
12.11.2013 17:30, Jeff Layton пишет: On Tue, 12 Nov 2013 17:02:36 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 12.11.2013 15:12, Jeff Layton пишет: On Mon, 11 Nov 2013 16:47:03 -0800 Greg KH gre...@linuxfoundation.org wrote: On Mon, Nov 11, 2013 at 07:18:25AM -0500, Jeff

Re: call_usermodehelper in containers

2013-11-15 Thread Stanislav Kinsbursky
15.11.2013 15:03, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: 12.11.2013 17:30, Jeff Layton пишет: On Tue, 12 Nov 2013 17:02:36 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 12.11.2013 15:12, Jeff Layton пишет: On Mon, 11 Nov 2013 16:47:03

Re: call_usermodehelper in containers

2013-11-12 Thread Stanislav Kinsbursky
nd we don't need any significant changes in kernel. BTW, Jeff, could you remind me, please, why exactly we need to use UMH to run the binary? What are this capabilities, which force us to do so? -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line "unsubscribe

Re: call_usermodehelper in containers

2013-11-12 Thread Stanislav Kinsbursky
on host. And we don't need any significant changes in kernel. BTW, Jeff, could you remind me, please, why exactly we need to use UMH to run the binary? What are this capabilities, which force us to do so? -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line

[PATCH v4] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-26 Thread Stanislav Kinsbursky
lls RPC_PIPEFS_UMOUNT notification with sn->pipefs_sb_lock being held. 2) Removes SUNRPC client from the list AFTER pipes destroying. 3) Doesn't hold RPC client on notification: if client in the list, then it can't be destroyed while sn->pipefs_sb_lock in hold by notification caller. Signed-off-by:

[PATCH v4] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-26 Thread Stanislav Kinsbursky
by notification caller. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |5 + net/sunrpc/rpc_pipe.c |2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index b827a4b..41f180c

Re: [PATCH v3 2/4] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-25 Thread Stanislav Kinsbursky
25.06.2013 20:13, Myklebust, Trond пишет: On Mon, 2013-06-24 at 11:52 +0400, Stanislav Kinsbursky wrote: CPU#0 CPU#1 - - rpc_kill_sb sn->pipefs_sb = NULLrpc_release_cli

Re: [PATCH v3 2/4] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-25 Thread Stanislav Kinsbursky
25.06.2013 20:13, Myklebust, Trond пишет: On Mon, 2013-06-24 at 11:52 +0400, Stanislav Kinsbursky wrote: CPU#0 CPU#1 - - rpc_kill_sb sn-pipefs_sb = NULLrpc_release_client

[PATCH v3 4/4] SUNRPC: PipeFS MOUNT notification optimization for dying clients

2013-06-24 Thread Stanislav Kinsbursky
Not need to create pipes for dying client. So just skip them. Note: we can safely dereference the client structure, because notification caller is holding sn->pipefs_sb_lock. Signed-off-by: Stanislav Kinsbursky Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |2 ++ 1 files changed

[PATCH v3 2/4] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-24 Thread Stanislav Kinsbursky
lls RPC_PIPEFS_UMOUNT notification with sn->pipefs_sb_lock being held. 2) Removes SUNRPC client from the list AFTER pipes destroying. 3) Doesn't hold RPC client on notification: if client in the list, then it can't be destroyed while sn->pipefs_sb_lock in hold by notification caller. Signed-off-by:

[PATCH v3 3/4] SUNRPC: split client creation routine into setup and registration

2013-06-24 Thread Stanislav Kinsbursky
This helper moves all "registration" code to the new rpc_client_register() helper. This helper will be used later in the series to synchronize against PipeFS MOUNT/UMOUNT events. Signed-off-by: Stanislav Kinsbursky --- net/sunrpc/cln

[PATCH v3 1/4] SUNRPC: fix races on PipeFS MOUNT notifications

2013-06-24 Thread Stanislav Kinsbursky
To fix this patch: 1) makes PipeFS mount notification call with pipefs_sb_lock being held. 2) releases pipefs_sb_lock on new SUNRPC client creation only after registration. Signed-off-by: Stanislav Kinsbursky Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c | 26 +++--

[PATCH v3 0/4] SUNRPC: PipeFS races fixes

2013-06-24 Thread Stanislav Kinsbursky
... --- Stanislav Kinsbursky (4): SUNRPC: fix races on PipeFS MOUNT notifications SUNRPC: fix races on PipeFS UMOUNT notifications SUNRPC: split client creation routine into setup and registration SUNRPC: PipeFS MOUNT notification optimization for dying clients net/sunrpc/clnt.c

[PATCH v3 0/4] SUNRPC: PipeFS races fixes

2013-06-24 Thread Stanislav Kinsbursky
... --- Stanislav Kinsbursky (4): SUNRPC: fix races on PipeFS MOUNT notifications SUNRPC: fix races on PipeFS UMOUNT notifications SUNRPC: split client creation routine into setup and registration SUNRPC: PipeFS MOUNT notification optimization for dying clients net/sunrpc/clnt.c

[PATCH v3 1/4] SUNRPC: fix races on PipeFS MOUNT notifications

2013-06-24 Thread Stanislav Kinsbursky
) To fix this patch: 1) makes PipeFS mount notification call with pipefs_sb_lock being held. 2) releases pipefs_sb_lock on new SUNRPC client creation only after registration. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c | 26

[PATCH v3 4/4] SUNRPC: PipeFS MOUNT notification optimization for dying clients

2013-06-24 Thread Stanislav Kinsbursky
Not need to create pipes for dying client. So just skip them. Note: we can safely dereference the client structure, because notification caller is holding sn-pipefs_sb_lock. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |2

[PATCH v3 2/4] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-24 Thread Stanislav Kinsbursky
by notification caller. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |5 + net/sunrpc/rpc_pipe.c |2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index b827a4b..41f180c

[PATCH v3 3/4] SUNRPC: split client creation routine into setup and registration

2013-06-24 Thread Stanislav Kinsbursky
This helper moves all registration code to the new rpc_client_register() helper. This helper will be used later in the series to synchronize against PipeFS MOUNT/UMOUNT events. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- net/sunrpc/clnt.c | 64

Re: [PATCH v2 2/4] SUNRPC: fix races on PipeFS MOUNT notifications

2013-06-18 Thread Stanislav Kinsbursky
17.06.2013 22:20, Myklebust, Trond пишет: On Tue, 2013-06-11 at 18:39 +0400, Stanislav Kinsbursky wrote: Below are races, when RPC client can be created without PiepFS dentries CPU#0 CPU#1

Re: [PATCH v2 2/4] SUNRPC: fix races on PipeFS MOUNT notifications

2013-06-18 Thread Stanislav Kinsbursky
17.06.2013 22:20, Myklebust, Trond пишет: On Tue, 2013-06-11 at 18:39 +0400, Stanislav Kinsbursky wrote: Below are races, when RPC client can be created without PiepFS dentries CPU#0 CPU#1

[PATCH v2 0/4] SUNRPC: PipeFS races fixes

2013-06-11 Thread Stanislav Kinsbursky
This series fixes races between PipeFS mount/umount notification calls and SUNRPC clients creation and destruction. https://bugzilla.redhat.com/show_bug.cgi?id=924649 v2: Fixed few silly locking bugs. The following series implements... --- Stanislav Kinsbursky (4): SUNRPC: split client

[PATCH v2 1/4] SUNRPC: split client creation routine into setup and registration

2013-06-11 Thread Stanislav Kinsbursky
This helper moves all "registration" code to the new rpc_client_register() helper. This helper will be used later in the series to synchronize against PipeFS MOUNT/UMOUNT events. Signed-off-by: Stanislav Kinsbursky --- net/sunrpc/clnt.c | 48 -

[PATCH v2 4/4] SUNRPC: PipeFS MOUNT notification optimization for dying clients

2013-06-11 Thread Stanislav Kinsbursky
Not need to create pipes for dying client. So just skip them. Note: we can safely dereference the client structure, because notification caller is holding sn->pipefs_sb_lock. Signed-off-by: Stanislav Kinsbursky Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |2 ++ 1 files changed

[PATCH v2 2/4] SUNRPC: fix races on PipeFS MOUNT notifications

2013-06-11 Thread Stanislav Kinsbursky
To fix this patch: 1) makes PipeFS mount notification call with pipefs_sb_lock being held. 2) releases pipefs_sb_lock on new SUNRPC client creation only after registration. Signed-off-by: Stanislav Kinsbursky Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c | 24 +--

[PATCH v2 3/4] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-11 Thread Stanislav Kinsbursky
lls RPC_PIPEFS_UMOUNT notification with sn->pipefs_sb_lock being held. 2) Removes SUNRPC client from the list AFTER pipes destroying. 3) Doesn't hold RPC client on notification: if client in the list, then it can't be destroyed while sn->pipefs_sb_lock in hold by notification caller. Signed-off-by:

[PATCH v2 3/4] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-11 Thread Stanislav Kinsbursky
by notification caller. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |5 + net/sunrpc/rpc_pipe.c |2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 4ee..b4f1711

[PATCH v2 2/4] SUNRPC: fix races on PipeFS MOUNT notifications

2013-06-11 Thread Stanislav Kinsbursky
) To fix this patch: 1) makes PipeFS mount notification call with pipefs_sb_lock being held. 2) releases pipefs_sb_lock on new SUNRPC client creation only after registration. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c | 24

[PATCH v2 1/4] SUNRPC: split client creation routine into setup and registration

2013-06-11 Thread Stanislav Kinsbursky
This helper moves all registration code to the new rpc_client_register() helper. This helper will be used later in the series to synchronize against PipeFS MOUNT/UMOUNT events. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- net/sunrpc/clnt.c | 48

[PATCH v2 4/4] SUNRPC: PipeFS MOUNT notification optimization for dying clients

2013-06-11 Thread Stanislav Kinsbursky
Not need to create pipes for dying client. So just skip them. Note: we can safely dereference the client structure, because notification caller is holding sn-pipefs_sb_lock. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |2

[PATCH v2 0/4] SUNRPC: PipeFS races fixes

2013-06-11 Thread Stanislav Kinsbursky
This series fixes races between PipeFS mount/umount notification calls and SUNRPC clients creation and destruction. https://bugzilla.redhat.com/show_bug.cgi?id=924649 v2: Fixed few silly locking bugs. The following series implements... --- Stanislav Kinsbursky (4): SUNRPC: split client

[PATCH 2/3] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-10 Thread Stanislav Kinsbursky
lls RPC_PIPEFS_UMOUNT notification with sn->pipefs_sb_lock being held. 2) Removes SUNRPC client from the list AFTER pipes destroying. 3) Doesn't hold RPC client on notification: if client in the list, then it can't be destroyed while sn->pipefs_sb_lock in hold by notification caller. Signed-off-by:

Re: [PATCH 0/3] SUNRPC: PipeFS races fixes

2013-06-10 Thread Stanislav Kinsbursky
This series has flaws. Will fix and resend. Sorry for noise. 10.06.2013 18:39, Stanislav Kinsbursky пишет: This series fixed races between PipeFS mount/umount notification calls and SUNRPC clients creation and destruction. https://bugzilla.redhat.com/show_bug.cgi?id=924649 The following

[PATCH 0/3] SUNRPC: PipeFS races fixes

2013-06-10 Thread Stanislav Kinsbursky
This series fixed races between PipeFS mount/umount notification calls and SUNRPC clients creation and destruction. https://bugzilla.redhat.com/show_bug.cgi?id=924649 The following series implements... --- Stanislav Kinsbursky (3): SUNRPC: fix races on PipeFS UMOUNT notifications

[PATCH 3/3] SUNRPC: PipeFS MOUNT notification optimization for dying clients

2013-06-10 Thread Stanislav Kinsbursky
Not need to create pipes for dying client. So just skip them. Note: we can safely dereference the client structure, because notification caller is holding sn->pipefs_sb_lock. Signed-off-by: Stanislav Kinsbursky Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |2 ++ 1 files changed

[PATCH 1/3] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-10 Thread Stanislav Kinsbursky
To fix this patch: 1) makes PipeFS mount notification call with pipefs_sb_lock being held. 2) releases pipefs_sb_lock on new SUNRPC client creation only after registration. Signed-off-by: Stanislav Kinsbursky Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |7 ++- net/sunrpc/rpc_

[PATCH 1/3] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-10 Thread Stanislav Kinsbursky
) To fix this patch: 1) makes PipeFS mount notification call with pipefs_sb_lock being held. 2) releases pipefs_sb_lock on new SUNRPC client creation only after registration. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |7

[PATCH 3/3] SUNRPC: PipeFS MOUNT notification optimization for dying clients

2013-06-10 Thread Stanislav Kinsbursky
Not need to create pipes for dying client. So just skip them. Note: we can safely dereference the client structure, because notification caller is holding sn-pipefs_sb_lock. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |2

[PATCH 0/3] SUNRPC: PipeFS races fixes

2013-06-10 Thread Stanislav Kinsbursky
This series fixed races between PipeFS mount/umount notification calls and SUNRPC clients creation and destruction. https://bugzilla.redhat.com/show_bug.cgi?id=924649 The following series implements... --- Stanislav Kinsbursky (3): SUNRPC: fix races on PipeFS UMOUNT notifications

Re: [PATCH 0/3] SUNRPC: PipeFS races fixes

2013-06-10 Thread Stanislav Kinsbursky
This series has flaws. Will fix and resend. Sorry for noise. 10.06.2013 18:39, Stanislav Kinsbursky пишет: This series fixed races between PipeFS mount/umount notification calls and SUNRPC clients creation and destruction. https://bugzilla.redhat.com/show_bug.cgi?id=924649 The following

[PATCH 2/3] SUNRPC: fix races on PipeFS UMOUNT notifications

2013-06-10 Thread Stanislav Kinsbursky
by notification caller. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com Cc: sta...@vger.kernel.org --- net/sunrpc/clnt.c |5 + net/sunrpc/rpc_pipe.c |2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index cf5b226..3c133f2

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-24 Thread Stanislav Kinsbursky
s the dust settles I expect user namespaces become the common way to run code in containers, which should greatly increase the demand for this feature in user namespaces. Eric -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-24 Thread Stanislav Kinsbursky
as the dust settles I expect user namespaces become the common way to run code in containers, which should greatly increase the demand for this feature in user namespaces. Eric -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
blem here is not how to modify the userspace binary, but how to lookup and execute the right (!) one. And I don't see, how we can do this (simple enough) without root swap. -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in t

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 15:56, Jeff Layton пишет: On Thu, 23 May 2013 15:38:17 +0400 Stanislav Kinsbursky wrote: 23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky wrote: 23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky writes: 22.05.2013 21

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky wrote: 23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky writes: 22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky writes: Usermode helper executes all binaries

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky writes: 22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky writes: Usermode helper executes all binaries in global "init" root context. This doesn't allow to call a binary from other root context (f

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
be really great. But regrettably doesn't solve the root swapping problem. Eric -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky writes: Usermode helper executes all binaries in global "init" root context. This doesn't allow to call a binary from other root context (for example in a container). Currently, both containerized NFS client and

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: Usermode helper executes all binaries in global init root context. This doesn't allow to call a binary from other root context (for example in a container). Currently, both containerized NFS

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
be really great. But regrettably doesn't solve the root swapping problem. Eric -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: 22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: Usermode helper executes all binaries in global init root context. This doesn't allow to call

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: 22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 15:56, Jeff Layton пишет: On Thu, 23 May 2013 15:38:17 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 14:00, Eric W. Biederman

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
to modify the userspace binary, but how to lookup and execute the right (!) one. And I don't see, how we can do this (simple enough) without root swap. -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

[RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Stanislav Kinsbursky
ference must be hold by the caller, since it will be put on UMH thread exit. Signed-off-by: Stanislav Kinsbursky --- fs/fs_struct.c| 28 include/linux/fs_struct.h |4 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/fs/fs_struct.c b/

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-22 Thread Stanislav Kinsbursky
like call_usermodehelper_keys(). Oleg. Thanks, Oleg. Sounds reasonable. -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-22 Thread Stanislav Kinsbursky
like call_usermodehelper_keys(). Oleg. Thanks, Oleg. Sounds reasonable. -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

[RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Stanislav Kinsbursky
, since it will be put on UMH thread exit. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/fs_struct.c| 28 include/linux/fs_struct.h |4 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/fs/fs_struct.c b/fs

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Stanislav Kinsbursky
20.05.2013 17:57, Oleg Nesterov пишет: On 05/20, Stanislav Kinsbursky wrote: Usermode helper executes all binaries in global "init" root context. This doesn't allow to call to call the binary from other root (for example in a container). Currently, containerized NFS server requires

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Stanislav Kinsbursky
20.05.2013 12:42, Jeff Layton пишет: On Mon, 20 May 2013 11:00:37 +0400 Stanislav Kinsbursky wrote: Usermode helper executes all binaries in global "init" root context. This doesn't allow to call to call the binary from other root (for example in a container). Currently, contain

[RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Stanislav Kinsbursky
e on UMH thread exit. Signed-off-by: Stanislav Kinsbursky --- include/linux/kmod.h |9 + kernel/kmod.c| 41 ++--- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 055

[RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Stanislav Kinsbursky
. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- include/linux/kmod.h |9 + kernel/kmod.c| 41 ++--- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 0555cc6

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Stanislav Kinsbursky
20.05.2013 12:42, Jeff Layton пишет: On Mon, 20 May 2013 11:00:37 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: Usermode helper executes all binaries in global init root context. This doesn't allow to call to call the binary from other root (for example in a container). Currently

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-20 Thread Stanislav Kinsbursky
20.05.2013 17:57, Oleg Nesterov пишет: On 05/20, Stanislav Kinsbursky wrote: Usermode helper executes all binaries in global init root context. This doesn't allow to call to call the binary from other root (for example in a container). Currently, containerized NFS server requires an ability

Re: [PATCH] nfsd: enable UMH client tracker in container

2013-04-25 Thread Stanislav Kinsbursky
24.04.2013 00:00, J. Bruce Fields пишет: On Fri, Apr 19, 2013 at 07:01:50AM -0700, Jeff Layton wrote: On Tue, 16 Apr 2013 15:17:44 +0400 Stanislav Kinsbursky wrote: This patch adds support for UserModeHelper tracker in a container. The reason for this is that the only containerised tracker

Re: [PATCH] nfsd: enable UMH client tracker in container

2013-04-25 Thread Stanislav Kinsbursky
24.04.2013 00:00, J. Bruce Fields пишет: On Fri, Apr 19, 2013 at 07:01:50AM -0700, Jeff Layton wrote: On Tue, 16 Apr 2013 15:17:44 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: This patch adds support for UserModeHelper tracker in a container. The reason

[PATCH] nfsd: enable UMH client tracker in container

2013-04-16 Thread Stanislav Kinsbursky
root for spawned kernel thread. Note: container's root can be stored on stack, because UMH calls are synchronous. Signed-off-by: Stanislav Kinsbursky --- fs/nfsd/nfs4recover.c | 29 ++--- 1 files changed, 22 insertions(+), 7 deletions(-) diff --git a/fs/nfsd/nfs4recover.c

[PATCH] nfsd: enable UMH client tracker in container

2013-04-16 Thread Stanislav Kinsbursky
: container's root can be stored on stack, because UMH calls are synchronous. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs/nfsd/nfs4recover.c | 29 ++--- 1 files changed, 22 insertions(+), 7 deletions(-) diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd

Re: ipc,sem: sysv semaphore scalability

2013-04-01 Thread Stanislav Kinsbursky
freed without unlinking from queue (which leads to memory corruption) plus dummy allocated copy won't be released. Signed-off-by: Stanislav Kinsbursky diff --git a/ipc/msg.c b/ipc/msg.c index 31cd1bf..fede1d0 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -872,6 +872,7 @@ long do_msgrcv(int ms

Re: ipc,sem: sysv semaphore scalability

2013-04-01 Thread Stanislav Kinsbursky
queue (which leads to memory corruption) plus dummy allocated copy won't be released. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com diff --git a/ipc/msg.c b/ipc/msg.c index 31cd1bf..fede1d0 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -872,6 +872,7 @@ long do_msgrcv(int msqid

Re: [Devel] [PATCH] nfsd: check client tracker initialization result

2013-03-05 Thread Stanislav Kinsbursky
06.03.2013 09:06, Stanislav Kinsbursky пишет: 06.03.2013 01:20, J. Bruce Fields пишет: On Thu, Feb 28, 2013 at 03:09:59PM +0300, Stanislav Kinsbursky wrote: Function nfsd4_client_tracking_init() can return error. Before, I think that we the nfsd4_client_* functions just became no-ops

Re: [PATCH] nfsd: check client tracker initialization result

2013-03-05 Thread Stanislav Kinsbursky
06.03.2013 01:20, J. Bruce Fields пишет: On Thu, Feb 28, 2013 at 03:09:59PM +0300, Stanislav Kinsbursky wrote: Function nfsd4_client_tracking_init() can return error. Before, I think that we the nfsd4_client_* functions just became no-ops in this case. With the result that no client records

Re: [PATCH] nfsd: check client tracker initialization result

2013-03-05 Thread Stanislav Kinsbursky
06.03.2013 01:20, J. Bruce Fields пишет: On Thu, Feb 28, 2013 at 03:09:59PM +0300, Stanislav Kinsbursky wrote: Function nfsd4_client_tracking_init() can return error. Before, I think that we the nfsd4_client_* functions just became no-ops in this case. With the result that no client records

Re: [Devel] [PATCH] nfsd: check client tracker initialization result

2013-03-05 Thread Stanislav Kinsbursky
06.03.2013 09:06, Stanislav Kinsbursky пишет: 06.03.2013 01:20, J. Bruce Fields пишет: On Thu, Feb 28, 2013 at 03:09:59PM +0300, Stanislav Kinsbursky wrote: Function nfsd4_client_tracking_init() can return error. Before, I think that we the nfsd4_client_* functions just became no-ops

Re: [PATCH] nfsd: try nfsdcld client tracker in containers

2013-03-04 Thread Stanislav Kinsbursky
04.03.2013 18:47, Jeff Layton пишет: On Mon, 4 Mar 2013 10:38:45 +0400 Stanislav Kinsbursky wrote: 01.03.2013 17:09, Jeff Layton пишет: On Fri, 01 Mar 2013 11:24:23 +0300 Stanislav Kinsbursky wrote: Currently, UMH and Legacy trackers are disabled in containers. But existent logic can

Re: [PATCH] nfsd: try nfsdcld client tracker in containers

2013-03-04 Thread Stanislav Kinsbursky
04.03.2013 18:47, Jeff Layton пишет: On Mon, 4 Mar 2013 10:38:45 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 01.03.2013 17:09, Jeff Layton пишет: On Fri, 01 Mar 2013 11:24:23 +0300 Stanislav Kinsbursky skinsbur...@parallels.com wrote: Currently, UMH and Legacy trackers

Re: [PATCH] nfsd: try nfsdcld client tracker in containers

2013-03-03 Thread Stanislav Kinsbursky
01.03.2013 17:09, Jeff Layton пишет: On Fri, 01 Mar 2013 11:24:23 +0300 Stanislav Kinsbursky wrote: Currently, UMH and Legacy trackers are disabled in containers. But existent logic can lookup nfs4_recoverydir in a container, and in this case will try to init Legacy tracker and skip nfsdcld

Re: [PATCH] nfsd: try nfsdcld client tracker in containers

2013-03-03 Thread Stanislav Kinsbursky
01.03.2013 17:09, Jeff Layton пишет: On Fri, 01 Mar 2013 11:24:23 +0300 Stanislav Kinsbursky skinsbur...@parallels.com wrote: Currently, UMH and Legacy trackers are disabled in containers. But existent logic can lookup nfs4_recoverydir in a container, and in this case will try to init Legacy

[PATCH] nfsd: try nfsdcld client tracker in containers

2013-03-01 Thread Stanislav Kinsbursky
Legacy tracker init will return -EINVAL for a container. So, let's change "-EINVAL" on "-ENOTSUPP" for legacy tracker init call in a container and in case of this error code, try nfsdcld client tracker instead of returning a error. Signed-off-by: Stanislav Kinsbursky --- f

[PATCH] nfsd: try nfsdcld client tracker in containers

2013-03-01 Thread Stanislav Kinsbursky
Legacy tracker init will return -EINVAL for a container. So, let's change -EINVAL on -ENOTSUPP for legacy tracker init call in a container and in case of this error code, try nfsdcld client tracker instead of returning a error. Signed-off-by: Stanislav Kinsbursky skinsbur...@parallels.com --- fs

  1   2   3   4   5   6   7   8   >