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

2014-07-02 Thread Stanislav Kinsbursky
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

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

2014-02-26 Thread Stanislav Kinsbursky
socket on exit. 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 deletion

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, but there is no this

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

2014-02-18 Thread Stanislav Kinsbursky
ink? --b. 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

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 in

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, w

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

2013-12-30 Thread Stanislav Kinsbursky
ted-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 | 11 +++ 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/fs/nfs

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 to

Re: call_usermodehelper in containers

2013-11-12 Thread Stanislav Kinsbursky
"proxy" binaries 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 unsub

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

2013-06-25 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. Signe

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

[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. Signe

[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
tries) 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

[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

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

2013-06-17 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
tries) 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. Signe

[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. Signe

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
tries) 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/

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
ss through the code the remaining work looked pretty trivial, and as soon 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 -- T

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
m. So, as I said previously, the main problem 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

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 in

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

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
d would 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 a

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

[RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Stanislav Kinsbursky
reference 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_s

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

2013-05-21 Thread Stanislav Kinsbursky
looks 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.kerne

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 requ

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, co

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

2013-05-20 Thread Stanislav Kinsbursky
ill be 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 0555

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

[PATCH] nfsd: enable UMH client tracker in container

2013-04-16 Thread Stanislav Kinsbursky
ch are used to swap 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 --gi

Re: ipc,sem: sysv semaphore scalability

2013-04-01 Thread Stanislav Kinsbursky
er or a copy address. Otherwise last message in queue will be 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 ---

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 in this

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: 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-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

[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 -

Re: [PATCH 00/10] ipc MSG_COPY fixes

2013-02-28 Thread Stanislav Kinsbursky
26.02.2013 16:00, Peter Hurley пишет: On Tue, 2013-02-26 at 11:53 +0400, Stanislav Kinsbursky wrote: Looks good to me. Thanks you, Peter! Acked-by: Stanislav Kinsbursky Next time please, add maintainer to "To" list instead of "CC" list (no need to resend - I've a

[PATCH] nfsd: check client tracker initialization result

2013-02-28 Thread Stanislav Kinsbursky
Function nfsd4_client_tracking_init() can return error. Signed-off-by: Stanislav Kinsbursky --- fs/nfsd/nfs4state.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index f194f86..fc4b81b 100644 --- a/fs/nfsd/nfs4state.c

Re: [PATCH 00/10] ipc MSG_COPY fixes

2013-02-25 Thread Stanislav Kinsbursky
Looks good to me. Thanks you, Peter! Acked-by: Stanislav Kinsbursky Next time please, add maintainer to "To" list instead of "CC" list (no need to resend - I've added Andrew Morton to "To" list in this reply). 26.02.2013 06:21, Peter Hurley пишет: Over

Re: general protection fault in do_msgrcv [3.8]

2013-02-20 Thread Stanislav Kinsbursky
20.02.2013 22:24, Dave Jones пишет: On Wed, Feb 20, 2013 at 12:23:22PM +0400, Stanislav Kinsbursky wrote: > > Pid: 887, comm: trinity-child2 Not tainted 3.8.0+ #57 Gigabyte Technology Co., Ltd. GA-MA78GM-S2H/GA-MA78GM-S2H > > RIP: 0010:[] [] do_msgrcv+0x22a/0x670 > &g

Re: general protection fault in do_msgrcv [3.8]

2013-02-20 Thread Stanislav Kinsbursky
20.02.2013 14:03, Gleb Natapov пишет: On Wed, Feb 20, 2013 at 12:23:22PM +0400, Stanislav Kinsbursky wrote: 19.02.2013 22:04, Dave Jones пишет: general protection fault: [#1] PREEMPT SMP DEBUG_PAGEALLOC Modules linked in: can af_rxrpc binfmt_misc scsi_transport_iscsi ax25 ipt_ULOG decnet

Re: general protection fault in do_msgrcv [3.8]

2013-02-20 Thread Stanislav Kinsbursky
13/2/6/663 But anyway, this bug fix affects only the case, when MSG_COPY flag is set. And this is not your case, I suppose? Dave -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord..

Re: [PATCH v2 0/4] nfsd: make is works in a container

2013-02-17 Thread Stanislav Kinsbursky
15.02.2013 20:20, J. Bruce Fields пишет: On Fri, Feb 01, 2013 at 03:56:05PM +0300, Stanislav Kinsbursky wrote: This patch set finally enables NFSd in container. I've tested it in container with it's own root, and also pid, net and mount namespaces. Thanks, these look fine to me

Re: [PATCH review 52/85] sunrpc: Properly encode kuids and kgids in auth.unix.gid rpc pipe upcalls.

2013-02-13 Thread Stanislav Kinsbursky
S kernel server is controlled via NFSd file system write calls, maybe it would be better to add: .fs_flags = FS_USERNS_MOUNT to it and add check: + if (net->user_ns != current_user_ns()) + return -EINVAL; No? 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/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 0/2] NFSD: fix races in service per-net resources allocation

2013-02-12 Thread Stanislav Kinsbursky
ep, thanks for the notice. ps -Original Message- From: linux-nfs-ow...@vger.kernel.org [mailto:linux-nfs-ow...@vger.kernel.org] On Behalf Of J. Bruce Fields Sent: Tuesday, February 12, 2013 3:46 PM To: Stanislav Kinsbursky Cc: a...@linux-foundation.org; linux-...@vger.kernel.org; t

Re: [PATCH 0/2] NFSD: fix races in service per-net resources allocation

2013-02-12 Thread Stanislav Kinsbursky
> + svc_close_list(serv, &serv->sv_tempsocks, net)) { > + svc_clean_up_xprts(serv, net); > + msleep(delay++); > + } ? Anyway, thanks! Acked-by: Stanislav Kinsbursky -- Best regards, Stanislav Kinsbursky -- To unsubscribe from this list: send

Re: [PATCH 0/2] NFSD: fix races in service per-net resources allocation

2013-02-11 Thread Stanislav Kinsbursky
11.02.2013 20:37, J. Bruce Fields пишет: On Mon, Feb 11, 2013 at 10:18:18AM +0400, Stanislav Kinsbursky wrote: This one looks a bit complicated and confusing to me. Probably because I'm not that familiar with service transports processing logic. So, as I can see, we now try to run over al

Re: [PATCH 0/2] NFSD: fix races in service per-net resources allocation

2013-02-10 Thread Stanislav Kinsbursky
11.02.2013 04:25, J. Bruce Fields пишет: On Fri, Feb 01, 2013 at 02:28:21PM +0300, Stanislav Kinsbursky wrote: After "NFS" (SUNRPC + NFSd actually) containerization work some basic principles of SUNRPC service initialization and deinitialization has been changed: now one service can

Re: linux-next: build failure after merge of the nfsd tree

2013-02-07 Thread Stanislav Kinsbursky
incremental this time) patch set to fix the problem, if you wish. But it's up to you, what to commit, Bruce. -- 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.o

Re: selinux_msg_queue_msgrcv() oops

2013-02-07 Thread Stanislav Kinsbursky
ple, does this problem appear, is you disable CONFIG_CHECKPOINT_RESTORE config option? -- 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/majordo

Re: [PATCH 2/4] SUNRPC: remove cache_detail->cache_upcall callback

2013-02-04 Thread Stanislav Kinsbursky
04.02.2013 20:50, Jeff Layton пишет: On Tue, 15 Jan 2013 11:09:36 +0300 Stanislav Kinsbursky wrote: This callback is redundant since all that its' implementations are doing is calling sunrpc_cache_pipe_upcall() with proper function address argument. This function address is now stor

Re: [PATCH v2 0/6] SUNRPC: rework cache upcall to avoid NFSd root

2013-02-04 Thread Stanislav Kinsbursky
04.02.2013 18:17, J. Bruce Fields пишет: On Mon, Feb 04, 2013 at 02:02:29PM +0300, Stanislav Kinsbursky wrote: swapping The main idea of this patch set is to call cache request not on kthread upcall, but on userspace daemon cache_read call. This fixes the problem with gaining of wrong dentry

[PATCH v2 1/6] NFS: use SUNRPC cache creation and destruction helper for DNS cache

2013-02-04 Thread Stanislav Kinsbursky
This cache was the first containerized and doesn't use net-aware cache creation and destruction helpers. This is a cleanup patch which just makes code looks clearer and reduce amount of lines of code. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/dns_resolve.c |

[PATCH v2 6/6] SUNRPC: move cache_detail->cache_request callback call to cache_read()

2013-02-04 Thread Stanislav Kinsbursky
() (which is cache_request callback) calls d_path(), which, in turn, traverse dentry up to current->fs->root. Kernel threads always have global root, while container have be in "root jail" - i.e. have it's own nested root. Signed-off-by: Stanislav Kinsbursky --- net/

[PATCH v2 5/6] SUNRPC: remove "cache_request" argument in sunrpc_cache_pipe_upcall() function

2013-02-04 Thread Stanislav Kinsbursky
Passing this pointer is redundant since it's stored on cache_detail structure, which is also passed to sunrpc_cache_pipe_upcall () function. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/dns_resolve.c |2 +- include/linux/sunrpc/cache.h |6 +- net/sunrpc/ca

[PATCH v2 4/6] SUNRPC: rework cache upcall logic

2013-02-04 Thread Stanislav Kinsbursky
thus all the code can be simplified. Now, for those cache details, which doesn't have cache_upcall callback (the only one, which still has is nfs_dns_resolve_template) sunrpc_cache_pipe_upcall will be called instead. Signed-off-by: Stanislav Kinsbursky --- fs/nfsd/export.c

[PATCH v2 2/6] NFS; simlify and clean cache library

2013-02-04 Thread Stanislav Kinsbursky
ic to nfs_cache_register_net() and nfs_cache_unregister_net() respectively (since they are called together anyway). Signed-off-by: Stanislav Kinsbursky --- fs/nfs/cache_lib.c | 12 +++- fs/nfs/cache_lib.h |2 -- fs/nfs/dns_resolve.c |6 +- 3 files changed, 4 insertions(+), 16 deletions(-)

[PATCH v2 3/6] SUNRPC: introduce cache_detail->cache_request callback

2013-02-04 Thread Stanislav Kinsbursky
This callback will allow to simplify upcalls in further patches in this series. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/dns_resolve.c |3 ++- fs/nfsd/export.c |6 -- fs/nfsd/nfs4idmap.c |6 -- include/linux/sunrpc/cache.h

[PATCH v2 0/6] SUNRPC: rework cache upcall to avoid NFSd root

2013-02-04 Thread Stanislav Kinsbursky
l helper anymore, because it's still required for NFS DNS cache. The following series implements... --- Stanislav Kinsbursky (6): NFS: use SUNRPC cache creation and destruction helper for DNS cache NFS; simlify and clean cache library SUNRPC: introduce cache_detail->ca

Re: [RFC PATCH 0/4] SUNRPC: rework cache upcall to avoid NFSd root swapping

2013-02-04 Thread Stanislav Kinsbursky
: On Tue, Jan 15, 2013 at 11:09:23AM +0300, Stanislav Kinsbursky wrote: The main idea of this patch set is to call cache request not on kthread upcall, but on userspace daemon cache_read call. This fixes the problem with gaining of wrong dentry path after calling d_path() in kthread root co

[PATCH 4/4] nfsd: enable NFSv4 state in containers

2013-02-01 Thread Stanislav Kinsbursky
Currently, NFSd is ready to operate in network namespace based containers. So let's drop check for "init_net" and make it able to fly. Signed-off-by: Stanislav Kinsbursky --- fs/nfsd/nfs4state.c | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff

[PATCH 3/4] nfsd: disable usermode helper client tracker in container

2013-02-01 Thread Stanislav Kinsbursky
per, which will swap root to desired one. Signed-off-by: Stanislav Kinsbursky --- fs/nfsd/nfs4recover.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index ba6fdd4..e0ae1cf 100644 --- a/fs/nfsd/nfs4recover.c +++

[PATCH v2 0/4] nfsd: make is works in a container

2013-02-01 Thread Stanislav Kinsbursky
current tree The following series implements... --- Stanislav Kinsbursky (4): nfsd: containerize NFSd filesystem nfsd: use proper net while reading "exports" file nfsd: disable usermode helper client tracker in container nfsd: enable NFSv4 state in containers fs/nfsd/

[PATCH 2/4] nfsd: use proper net while reading "exports" file

2013-02-01 Thread Stanislav Kinsbursky
only current->nsproxy->net_ns can be used. Signed-off-by: Stanislav Kinsbursky --- fs/nfsd/nfsctl.c | 31 +-- 1 files changed, 25 insertions(+), 6 deletions(-) diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 2eb03c1..1825f72 100644 --- a/fs/nfsd/nfsc

[PATCH 1/4] nfsd: containerize NFSd filesystem

2013-02-01 Thread Stanislav Kinsbursky
from underneath of it. This, obviously, means, that in case of kill of a container's "init" (which is not a mount namespace, but network namespace creator) netowrk namespace won't be destroyed. Signed-off-by: Stanislav Kinsbursky --- fs/nfsd/nfsctl.c | 46 +++

[PATCH 2/2] SUNRPC: protect transport processing with per-cpu rw semaphore

2013-02-01 Thread Stanislav Kinsbursky
or write. Note: add the PERCPU_RWSEM config option selected by SUNRPC. Signed-off-by: Stanislav Kinsbursky --- include/linux/sunrpc/svc.h |2 ++ net/sunrpc/Kconfig |1 + net/sunrpc/svc.c |2 ++ net/sunrpc/svc_xprt.c | 33 +++--

[PATCH 1/2] per-cpu semaphores: export symbols to modules

2013-02-01 Thread Stanislav Kinsbursky
-y so that modules may use this library. Signed-off-by: Stanislav Kinsbursky --- lib/Makefile |2 +- lib/percpu-rwsem.c |6 ++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index 02ed6c0..22e0c03 100644 --- a/lib/Makefile +++ b/li

[PATCH 0/2] NFSD: fix races in service per-net resources allocation

2013-02-01 Thread Stanislav Kinsbursky
the running service. This leads to races, described here: https://bugzilla.redhat.com/show_bug.cgi?id=904870 and which this small patch set is aimed to solve by using per-cpu rw semphores to sync per-net resources processing and shutdown. The following series implements... --- Stanislav Kinsb

Re: [RFC PATCH 0/4] SUNRPC: rework cache upcall to avoid NFSd root swapping

2013-01-30 Thread Stanislav Kinsbursky
31.01.2013 03:00, J. Bruce Fields пишет: On Tue, Jan 15, 2013 at 11:09:23AM +0300, Stanislav Kinsbursky wrote: The main idea of this patch set is to call cache request not on kthread upcall, but on userspace daemon cache_read call. This fixes the problem with gaining of wrong dentry path after

Re: [RFC PATCH] SUNRPC: protect transport processing with rw sem

2013-01-29 Thread Stanislav Kinsbursky
30.01.2013 02:57, J. Bruce Fields пишет: On Tue, Jan 29, 2013 at 02:03:30PM +0300, Stanislav Kinsbursky wrote: There could be a service transport, which is processed by service thread and racing in the same time with per-net service shutdown like listed below: CPU#0

[RFC PATCH] SUNRPC: protect transport processing with rw sem

2013-01-29 Thread Stanislav Kinsbursky
aken for write. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/callback.c |2 ++ include/linux/sunrpc/svc.h |2 ++ net/sunrpc/svc.c |2 ++ net/sunrpc/svc_xprt.c | 24 ++-- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git

Re: BUG at net/sunrpc/svc_xprt.c:921

2013-01-21 Thread Stanislav Kinsbursky
18.01.2013 19:56, J. Bruce Fields пишет: On Fri, Jan 18, 2013 at 10:48:02AM -0500, Mark Lord wrote: On 13-01-18 12:37 AM, Stanislav Kinsbursky wrote: You have more than one NFS mount in different network namespaces, haven't you? No, I don't (knowingly) use (multiple) namespa

Re: BUG at net/sunrpc/svc_xprt.c:921

2013-01-17 Thread Stanislav Kinsbursky
18.01.2013 03:41, Mark Lord пишет: On 13-01-17 08:24 AM, Stanislav Kinsbursky wrote: .. This looks like the old issue I was trying to fix with "SUNRPC: protect service sockets lists during per-net shutdown". So, here is the problem as I see it: there is a transport, which is pro

Re: BUG at net/sunrpc/svc_xprt.c:921

2013-01-17 Thread Stanislav Kinsbursky
17.01.2013 17:03, J. Bruce Fields пишет: On Thu, Jan 17, 2013 at 09:05:51AM +0400, Stanislav Kinsbursky wrote: 17.01.2013 02:51, Mark Lord пишет: On 13-01-16 12:20 AM, Stanislav Kinsbursky wrote: Mark, could you provide any call traces? Call traces from where/what? There's this one, p

Re: BUG at net/sunrpc/svc_xprt.c:921

2013-01-16 Thread Stanislav Kinsbursky
17.01.2013 02:51, Mark Lord пишет: On 13-01-16 12:20 AM, Stanislav Kinsbursky wrote: Mark, could you provide any call traces? Call traces from where/what? There's this one, posted earlier in the BUG report: kernel BUG at net/sunrpc/svc_xprt.c:921! Call Trace: [] ? svc_recv+0xcc/

Re: BUG at net/sunrpc/svc_xprt.c:921

2013-01-15 Thread Stanislav Kinsbursky
you provide any call traces? --b. -- 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-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH 3/4] SUNRPC: remove "cache_request" argument in sunrpc_cache_pipe_upcall() function

2013-01-15 Thread Stanislav Kinsbursky
Passing this pointer is redundant since it's stored on cache_detail structure, which is also passed to sunrpc_cache_pipe_upcall () function. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/dns_resolve.c |2 +- include/linux/sunrpc/cache.h |6 +- net/sunrpc/ca

[PATCH 4/4] SUNRPC: move cache_detail->cache_request callback call to cache_read()

2013-01-15 Thread Stanislav Kinsbursky
: svc_export_request() (which is cache_request callback) calls d_path(), which, in turn, traverse dentry up to current->fs->root. Kernel threads always have global root, while container have be in "root jail" - i.e. have it's own nested root. Signed-off-by: Stanislav Kinsbursky --- net/

[PATCH 1/4] SUNRPC: introduce cache_detail->cache_request callback

2013-01-15 Thread Stanislav Kinsbursky
This callback will allow to simplify upcalls in further patches in this series. Signed-off-by: Stanislav Kinsbursky --- fs/nfs/dns_resolve.c |2 +- fs/nfsd/export.c |6 -- fs/nfsd/nfs4idmap.c |6 -- include/linux/sunrpc/cache.h

[PATCH 2/4] SUNRPC: remove cache_detail->cache_upcall callback

2013-01-15 Thread Stanislav Kinsbursky
This callback is redundant since all that its' implementations are doing is calling sunrpc_cache_pipe_upcall() with proper function address argument. This function address is now stored on cache_detail structure and thus all the code can be simplified. Signed-off-by: Stanislav Kinsbursky --

[RFC PATCH 0/4] SUNRPC: rework cache upcall to avoid NFSd root swapping

2013-01-15 Thread Stanislav Kinsbursky
, but containers can work in "root jail" - i.e. have it's own nested root. The following series implements... --- Stanislav Kinsbursky (4): SUNRPC: introduce cache_detail->cache_request callback SUNRPC: remove cache_detail->cache_upcall callback SUNRPC:

Re: [Devel] [PATCH 2/6] nfsd: swap fs root in NFSd kthreads

2013-01-13 Thread Stanislav Kinsbursky
Thanks! 11.01.2013 21:20, J. Bruce Fields пишет: On Fri, Jan 11, 2013 at 12:03:12PM -0500, J. Bruce Fields wrote: On Fri, Jan 11, 2013 at 06:56:58PM +0400, Stanislav Kinsbursky wrote: 11.12.2012 19:35, J. Bruce Fields пишет: On Tue, Dec 11, 2012 at 10:20:36AM -0500, J. Bruce Fields wrote

Re: [Devel] [PATCH 2/6] nfsd: swap fs root in NFSd kthreads

2013-01-13 Thread Stanislav Kinsbursky
11.01.2013 21:03, J. Bruce Fields пишет: On Fri, Jan 11, 2013 at 06:56:58PM +0400, Stanislav Kinsbursky wrote: 11.12.2012 19:35, J. Bruce Fields пишет: On Tue, Dec 11, 2012 at 10:20:36AM -0500, J. Bruce Fields wrote: On Tue, Dec 11, 2012 at 07:07:00PM +0400, Stanislav Kinsbursky wrote: I

Re: [Devel] [PATCH 2/6] nfsd: swap fs root in NFSd kthreads

2013-01-11 Thread Stanislav Kinsbursky
11.12.2012 19:35, J. Bruce Fields пишет: On Tue, Dec 11, 2012 at 10:20:36AM -0500, J. Bruce Fields wrote: On Tue, Dec 11, 2012 at 07:07:00PM +0400, Stanislav Kinsbursky wrote: I don't really understand, how mountd's root can be wrong. I.e. its' always right as I see it. NFSd k

Re: [PATCH] nfsd: fix unused "nn" variable warning in free_client()

2013-01-09 Thread Stanislav Kinsbursky
Bruce, sorry, forgot to add: Reported-by: Toralf Förster 09.01.2013 13:38, Stanislav Kinsbursky пишет: If CONFIG_LOCKDEP is disabled, then there would be a warning like this: CC [M] fs/nfsd/nfs4state.o fs/nfsd/nfs4state.c: In function ‘free_client’: fs/nfsd/nfs4state.c:1051:19: warning

[PATCH] nfsd: fix unused "nn" variable warning in free_client()

2013-01-09 Thread Stanislav Kinsbursky
Signed-off-by: Stanislav Kinsbursky --- fs/nfsd/nfs4state.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 8f7362c..739a6c2 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1048,7 +1048,7 @@ static str

  1   2   3   4   >