[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 8 Aug 2022 10:45:36 -0700
From: Peilin Ye <yepeilin.cs@...il.com>
To: Stefano Garzarella <sgarzare@...hat.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Peilin Ye <peilin.ye@...edance.com>,
George Zhang <georgezhang@...are.com>,
Dmitry Torokhov <dtor@...are.com>,
Andy King <acking@...are.com>,
virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2 1/2] vsock: Fix memory leak in vsock_connect()
On Mon, Aug 08, 2022 at 09:55:33AM +0200, Stefano Garzarella wrote:
> On Sun, Aug 07, 2022 at 02:00:11AM -0700, Peilin Ye wrote:
> > net/vmw_vsock/af_vsock.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
> > index f04abf662ec6..fe14f6cbca22 100644
> > --- a/net/vmw_vsock/af_vsock.c
> > +++ b/net/vmw_vsock/af_vsock.c
> > @@ -1391,7 +1391,13 @@ static int vsock_connect(struct socket *sock, struct sockaddr *addr,
> > * timeout fires.
> > */
> > sock_hold(sk);
> > - schedule_delayed_work(&vsk->connect_work, timeout);
> > +
> > + /* If the timeout function is already scheduled,
> > + * reschedule it, then ungrab the socket refcount to
> > + * keep it balanced.
> > + */
> > + if (mod_delayed_work(system_wq, &vsk->connect_work, timeout))
> ^
> Checkpatch warns here about line lenght.
> If you have to re-send, please split it.
Oh, net-next HEAD's checkpatch --strict didn't complain, I didn't know
Patchwork checks 80 columns. I will send v3 soon.
> Anyway, the patch LGTM:
>
> Reviewed-by: Stefano Garzarella <sgarzare@...hat.com>
Thanks!
Peilin Ye
Powered by blists - more mailing lists