]> git.karo-electronics.de Git - karo-tx-linux.git/commit
svcrpc: make svc_age_temp_xprts enqueue under sv_lock
authorJ. Bruce Fields <bfields@redhat.com>
Sun, 10 Feb 2013 16:33:48 +0000 (11:33 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Mar 2013 03:24:01 +0000 (03:24 +0000)
commita60210baeedfc036f19fcbf58fe9c82d26ea12a5
tree0b43af8180197dcbc0e5b7e239aea8c8e3c374c4
parentde80ffb430582159b78f6f6fb3bb240f7ab7034f
svcrpc: make svc_age_temp_xprts enqueue under sv_lock

commit e75bafbff2270993926abcc31358361db74a9bc2 upstream.

svc_age_temp_xprts expires xprts in a two-step process: first it takes
the sv_lock and moves the xprts to expire off their server-wide list
(sv_tempsocks or sv_permsocks) to a local list.  Then it drops the
sv_lock and enqueues and puts each one.

I see no reason for this: svc_xprt_enqueue() will take sp_lock, but the
sv_lock and sp_lock are not otherwise nested anywhere (and documentation
at the top of this file claims it's correct to nest these with sp_lock
inside.)

Tested-by: Jason Tibbitts <tibbs@math.uh.edu>
Tested-by: Paweł Sikora <pawel.sikora@agmk.net>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/sunrpc/svc_xprt.c