[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220912101508.GA5500@lxhi-065>
Date: Mon, 12 Sep 2022 12:15:08 +0200
From: Eugeniu Rosca <erosca@...adit-jv.com>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC: Eugeniu Rosca <erosca@...adit-jv.com>,
Trond Myklebust <trondmy@...merspace.com>,
"neilb@...e.de" <neilb@...e.de>,
"mrodin@...adit-jv.com" <mrodin@...adit-jv.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"roscaeugeniu@...il.com" <roscaeugeniu@...il.com>
Subject: Re: [PATCH 4.14 022/284] SUNRPC: avoid race between mod_timer() and
del_timer_sync()
Hello Greg,
On So, Sep 11, 2022 at 07:41:02 +0200, gregkh@...uxfoundation.org wrote:
> On Thu, Sep 08, 2022 at 02:09:31PM +0200, Eugeniu Rosca wrote:
[..]
> > Your proposal [*] seems to resolve the issue for me.
> >
> > Any chance to get a stable patch, to which I will gladly provide
> > the Reviewed-by/Tested-by signatures?
> >
> > > >
> > > > NeilBrown
> > > >
> >
> > [*] diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
> > index e7d55d63d4f1..7f9b94acf597 100644
> > --- a/net/sunrpc/xprt.c
> > +++ b/net/sunrpc/xprt.c
> > @@ -1525,9 +1525,9 @@ static void xprt_destroy(struct rpc_xprt *xprt)
> > * is cleared. We use ->transport_lock to ensure the mod_timer()
> > * can only run *before* del_time_sync(), never after.
> > */
> > - spin_lock(&xprt->transport_lock);
> > + spin_lock_bh(&xprt->transport_lock);
> > del_timer_sync(&xprt->timer);
> > - spin_unlock(&xprt->transport_lock);
> > + spin_unlock_bh(&xprt->transport_lock);
> >
> > /*
> > * Destroy sockets etc from the system workqueue so they can
> >
>
> Can you just turn this into a proper patch that we can apply to the
> needed stable tree(s)?
It has been kindly provided by Neil Brown in
https://lore.kernel.org/lkml/166293725263.30452.1720462103844620549@noble.neil.brown.name/
Best Regards,
Eugeniu Rosca
Powered by blists - more mailing lists