Re: [PATCH RESEND] SUNRPC: fix include for cmpxchg_relaxed()

2018-05-03 Thread Jeff Layton
the code to include , avoiding fragility. > > Signed-off-by: Mark Rutland <mark.rutl...@arm.com> > Cc: Trond Myklebust <trond.mykleb...@primarydata.com> > Cc: Anna Schumaker <anna.schuma...@netapp.com> > Cc: J. Bruce Fields <bfie...@fieldses.org> > C

Re: [PATCH] net: sunrpc: svcauth_gss: use BUG_ON instead of if condition followed by BUG

2017-10-25 Thread Jeff Layton
On Tue, 2017-10-24 at 15:12 -0500, Gustavo A. R. Silva wrote: > Quoting "J. Bruce Fields" <bfie...@fieldses.org>: > > > On Tue, Oct 24, 2017 at 02:18:52PM -0400, Jeff Layton wrote: > > > On Tue, 2017-10-24 at 13:53 -0400, J. Bruce Fields wrote: > > &

Re: [PATCH] net: sunrpc: svcauth_gss: use BUG_ON instead of if condition followed by BUG

2017-10-24 Thread Jeff Layton
09,7 @@ svcauth_gss_wrap_resp_integ(struct svc_rqst > > > > *rqstp) > > > > BUG_ON(integ_len % 4); > > > > *p++ = htonl(integ_len); > > > > *p++ = htonl(gc->gc_seq); > > > > - if (xdr_buf_subsegment(resbuf, _buf, integ_o

Re: [PATCH 0/4] make function arg and structures as const

2017-10-17 Thread Jeff Layton
rpc/auth_gss/svcauth_gss.c | 4 ++-- > net/sunrpc/cache.c| 2 +- > net/sunrpc/svcauth_unix.c | 4 ++-- > 7 files changed, 11 insertions(+), 11 deletions(-) > Looks pretty straightforward. You can add this to the set: Reviewed-by: Jeff Layton <jlay...@redhat.com>

Re: [PATCH] sunrcp: make function _svc_create_xprt static

2017-10-16 Thread Jeff Layton
family, > + const unsigned short port, int flags) > { > struct svc_xprt_class *xcl; > Reviewed-by: Jeff Layton <jlay...@poochiereds.net>

Re: [PATCH 7/7] SUNRPC: make kvec const

2017-08-25 Thread Jeff Layton
c struct kvec empty_iov = {.iov_base = NULL, .iov_len = 0}; > +static const struct kvec empty_iov = {.iov_base = NULL, .iov_len = 0}; > > void > xdr_buf_from_iov(struct kvec *iov, struct xdr_buf *buf) Reviewed-by: Jeff Layton <jlay...@redhat.com>

Re: [PATCH v4] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-23 Thread Jeff Layton
054 08cd3dbc > > > > [ 6709.147653] fec0: > > 81000689ff20 > > [ 6709.155471] fee0: 08085240 81000689ff20 08085244 > > 6145 > >

Re: [PATCH v3] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-21 Thread Jeff Layton
rr); > } > > - inet->sk_user_data = svsk; > svsk->sk_sock = sock; > svsk->sk_sk = inet; > svsk->sk_ostate = inet->sk_state_change; > svsk->sk_odata = inet->sk_data_ready; > svsk->sk_owspace = inet->sk_write_space; > + /* this barrier is necessary in order to prevent race condition > +with svc_data_ready(), svc_listen_data_ready() > +and others when calling callbacks above */ > + wmb(); > + inet->sk_user_data = svsk; > > /* Initialize the socket */ > if (sock->type == SOCK_DGRAM) Patch itself looks fine -- nice catch! The comment format probably ought to be in kernel-standard style though. What I'd probably do is have this longer comment next to the wmb() call and then have smaller comments by the rmb() calls referring them to the longer comment in svc_setup_socket(). Once you fix the comments, you can add: Reviewed-by: Jeff Layton <jlay...@redhat.com>

Re: [PATCH] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-18 Thread Jeff Layton
On Fri, 2017-08-18 at 07:08 -0400, Vadim Lomovtsev wrote: > Hi Jeff, > > On Fri, Aug 18, 2017 at 06:27:32AM -0400, Jeff Layton wrote: > > On Fri, 2017-08-18 at 06:00 -0400, Vadim Lomovtsev wrote: > > > While running nfs/connectathon tests kernel NULL-pointer exception >

Re: [PATCH] net: sunrpc: svcsock: fix NULL-pointer exception

2017-08-18 Thread Jeff Layton
svc_xprt_enqueue(>sk_xprt); > @@ -1381,12 +1392,13 @@ static struct svc_sock *svc_setup_socket(struct > svc_serv *serv, > return ERR_PTR(err); > } > > - inet->sk_user_data = svsk; > svsk->sk_sock = sock; > svsk->sk_sk = inet; > svsk->sk_ostate = inet->sk_state_change; > svsk->sk_odata = inet->sk_data_ready; > svsk->sk_owspace = inet->sk_write_space; > + wmb(); > + inet->sk_user_data = svsk; > > /* Initialize the socket */ > if (sock->type == SOCK_DGRAM) Since we always check whether svsk is NULL before calling the functions, then the above hunk and maybe the rmb() calls might be all that's needed here. I don't see how we'd ever get a sk_odata value (for instance) that's NULL with the above change. -- Jeff Layton <jlay...@redhat.com>

Re: [PATCH 01/23] net, sunrpc: convert rpc_cred.cr_count from atomic_t to refcount_t

2017-03-17 Thread Jeff Layton
so much the better. Point to bugs that this new infrastructure helped find. Encourage people to adopt your new infrastructure as new refcounted objects are introduced into the kernel. You might even consider a LWN article about this. Eventually we'll get around to changing existing code to use it, once there is a sufficient advantage to doing so. Most likely when we're reworking the code for other reasons, or when we're chasing some horrid refcounting bug and think that this might help find it. -- Jeff Layton <jlay...@poochiereds.net>

Re: [RFC][PATCH] nfsd: add +1 to reference counting scheme for struct nfsd4_session

2017-02-11 Thread Jeff Layton
On Sat, 2017-02-11 at 09:01 -0500, David Windsor wrote: > On Sat, Feb 11, 2017 at 7:31 AM, Jeff Layton <jlay...@poochiereds.net> wrote: > > On Sat, 2017-02-11 at 01:42 -0500, David Windsor wrote: > > > > > > > > > > Signed-off-by: David Windsor <

Re: [RFC][PATCH] nfsd: add +1 to reference counting scheme for struct nfsd4_session

2017-02-11 Thread Jeff Layton
queue(>cl_cb_waitq); > > -- > > 2.7.4 > > The basic idea here is that nfsv4 sessions have a "resting state" of 0. We want to keep them around, but if they go "dead" then we we'll tear them down if they aren't actively in use at the time. So, we st

Re: net/sunrpc/clnt.c:2773 suspicious rcu_dereference_check() usage!

2016-11-08 Thread Jeff Layton
On Tue, 2016-11-08 at 06:53 -0500, Jeff Layton wrote: > On Mon, 2016-11-07 at 22:42 -0700, Ross Zwisler wrote: > > > > I've got a virtual machine that has some NFS mounts, and with a newly > > compiled > > kernel based on v4.9-rc3 I see the following warning/info mess

Re: net/sunrpc/clnt.c:2773 suspicious rcu_dereference_check() usage!

2016-11-08 Thread Jeff Layton
ference(clnt->cl_xpi.xpi_xpswitch); rcu_read_lock();     ret = rpc_xprt_switch_has_addr(xps, sap); rcu_read_unlock(); return ret; } --8<-- Looks like the simple fix is to just move that rcu_dereference call inside the rcu_read_lock there. Cheers, --  Jeff Layton <jlay...@redhat.com>

Re: [RFC PATCH] sunrpc: do not allow process to freeze within RPC state machine

2016-08-04 Thread Jeff Layton
On Thu, 2016-08-04 at 12:55 +0200, Stanislav Kinsburskiy wrote: > > 03.08.2016 19:36, Jeff Layton пишет: > > > > On Wed, 2016-08-03 at 20:54 +0400, Stanislav Kinsburskiy wrote: > > > > > > Otherwise freezer cgroup state might never become "FROZEN"

Re: [RFC PATCH] sunrpc: do not allow process to freeze within RPC state machine

2016-08-03 Thread Jeff Layton
r the kernel-userland boundary as: "allow the process to be frozen, and then retry the call once it's resumed". With that, filesystems could return the error code when they want to redrive the entire syscall from that level. That won't work for non- idempotent requests though. We'd need to do something more elaborate there. -- Jeff Layton <jlay...@redhat.com>

Re: [RFD] workqueue: WQ_MEM_RECLAIM usage in network drivers

2016-03-19 Thread Jeff Layton
uarantee > or not? > > * I assume that wireless drivers aren't and can't be used in this > fashion. Is that a correction assumption? > People do mount NFS over wireless interfaces. It's not terribly common though, in my experience. -- Jeff Layton <jlay...@poochiereds.net>

Re: [REGRESSION] NFS is creating a hidden port (left over from xs_bind() )

2015-06-19 Thread Jeff Layton
and that leaves the port bound. I'm travelling this weekend and am not set up to reproduce it to confirm, but that does seem to be a plausible scenario. -- Jeff Layton jlay...@poochiereds.net -- To unsubscribe from this list: send the line unsubscribe netdev in

Re: [REGRESSION] NFS is creating a hidden port (left over from xs_bind() )

2015-06-18 Thread Jeff Layton
On Thu, 18 Jun 2015 21:08:43 -0400 Steven Rostedt rost...@goodmis.org wrote: On Thu, 18 Jun 2015 18:50:51 -0400 Jeff Layton jlay...@poochiereds.net wrote: The interesting bit here is that the sockets all seem to connect to port 55201 on the remote host, if I'm reading these traces

Re: [REGRESSION] NFS is creating a hidden port (left over from xs_bind() )

2015-06-18 Thread Jeff Layton
give some helpful info: $ rpcinfo -p NFS servername Also, what NFS version are you using to mount here? Your fstab entries suggest that you're using the default version (for whatever distro this is), but have you (e.g.) set up nfsmount.conf to default to v3 on this box? -- Jeff Layton jlay

[PATCH v2] net, swap: Remove a warning and clarify why sk_mem_reclaim is required when deactivating swap

2015-06-10 Thread Jeff Layton
From: Mel Gorman mgor...@suse.de Jeff Layton reported the following; [ 74.232485] [ cut here ] [ 74.233354] WARNING: CPU: 2 PID: 754 at net/core/sock.c:364 sk_clear_memalloc+0x51/0x80() [ 74.234790] Modules linked in: cts rpcsec_gss_krb5 nfsv4 dns_resolver nfs

[PATCH] net, swap: Remove a warning and clarify why sk_mem_reclaim is required when deactivating swap

2015-06-09 Thread Jeff Layton
From: Mel Gorman mgor...@suse.de Jeff Layton reported the following; [ 74.232485] [ cut here ] [ 74.233354] WARNING: CPU: 2 PID: 754 at net/core/sock.c:364 sk_clear_memalloc+0x51/0x80() [ 74.234790] Modules linked in: cts rpcsec_gss_krb5 nfsv4 dns_resolver nfs

Re: [PATCH] CIFS: make cifsd (more)

2007-06-30 Thread Jeff Layton
performance reads in cifs aswell, but probably not the demultiplexer thread, or they use MSG_DONTWAIT to avoid this problems and deal with the blocking behaviour on a higher level. -- Jeff Layton [EMAIL PROTECTED] - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message

Re: [PATCH] RFC: have tcp_recvmsg() check kthread_should_stop() and treat it as if it were signalled

2007-06-25 Thread Jeff Layton
On Tue, 26 Jun 2007 01:11:20 +0530 Satyam Sharma [EMAIL PROTECTED] wrote: Hi, On 6/9/07, Jeff Layton [EMAIL PROTECTED] wrote: On Sat, 09 Jun 2007 11:30:04 +1000 Herbert Xu [EMAIL PROTECTED] wrote: Please cc networking patches to [EMAIL PROTECTED] Jeff Layton [EMAIL PROTECTED

Re: [PATCH] RFC: have tcp_recvmsg() check kthread_should_stop() and treat it as if it were signalled

2007-06-09 Thread Jeff Layton
On Sat, 09 Jun 2007 11:30:04 +1000 Herbert Xu [EMAIL PROTECTED] wrote: Please cc networking patches to [EMAIL PROTECTED] Jeff Layton [EMAIL PROTECTED] wrote: The following patch is a first stab at removing this need. It makes it so that in tcp_recvmsg() we also check

[PATCH] RFC: have tcp_recvmsg() check kthread_should_stop() and treat it as if it were signalled

2007-06-08 Thread Jeff Layton
as expected. I'm just not clear on whether it will have any adverse side-effects. Obviously if this approach is OK then we'll probably also want to fix up other recvmsg functions (udp_recvmsg, etc). Anyone care to comment? Thanks, Signed-off-by: Jeff Layton [EMAIL PROTECTED] diff --git a/net/ipv4/tcp.c b

[PATCH] make ipv4 multicast packets only get delivered to sockets that are joined to group

2006-09-13 Thread Jeff Layton
as of last night. Signed-off-by: Jeff Layton [EMAIL PROTECTED] --- linux-2.6/net/ipv4/udp.c.mcast-filter +++ linux-2.6/net/ipv4/udp.c @@ -286,6 +286,8 @@ static inline struct sock *udp_v4_mcast_ struct hlist_node *node; struct sock *s = sk; unsigned short hnum = ntohs

Re: [PATCH] make ipv4 multicast packets only get delivered to sockets that are joined to group

2006-09-13 Thread Jeff Layton
On Wed, 2006-09-13 at 07:32 -0700, David Stevens wrote: [EMAIL PROTECTED] wrote on 09/13/2006 07:13:55 AM: This is not true on any OS I'm aware of, including the original sockets multicast implementation on early BSD. The current Linux behavior does seem to be consistent with the