kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v3] virtio_vsock: Fix race condition in virtio_transport_recv_pkt()
@ 2020-05-30 10:40 Markus Elfring
  2020-05-30 12:26 ` Justin He
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2020-05-30 10:40 UTC (permalink / raw)
  To: Jia He, kvm, netdev, virtualization
  Cc: kernel-janitors, linux-kernel, stable, David S. Miller,
	Jakub Kicinski, Kaly Xin, Stefan Hajnoczi, Stefano Garzarella

> This fixes it by checking sk->sk_shutdown(suggested by Stefano) after
> lock_sock since sk->sk_shutdown is set to SHUTDOWN_MASK under the
> protection of lock_sock_nested.

How do you think about a wording variant like the following?

  Thus check the data structure member “sk_shutdown” (suggested by Stefano)
  after a call of the function “lock_sock” since this field is set to
  “SHUTDOWN_MASK” under the protection of “lock_sock_nested”.


Would you like to add the tag “Fixes” to the commit message?

Regards,
Markus

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH v3] virtio_vsock: Fix race condition in virtio_transport_recv_pkt()
  2020-05-30 10:40 [PATCH v3] virtio_vsock: Fix race condition in virtio_transport_recv_pkt() Markus Elfring
@ 2020-05-30 12:26 ` Justin He
  0 siblings, 0 replies; 2+ messages in thread
From: Justin He @ 2020-05-30 12:26 UTC (permalink / raw)
  To: Markus Elfring, kvm, netdev, virtualization
  Cc: kernel-janitors, linux-kernel, stable, David S. Miller,
	Jakub Kicinski, Kaly Xin, Stefan Hajnoczi, Stefano Garzarella

Hi Markus

> -----Original Message-----
> From: Markus Elfring <Markus.Elfring@web.de>
> Sent: Saturday, May 30, 2020 6:41 PM
> To: Justin He <Justin.He@arm.com>; kvm@vger.kernel.org;
> netdev@vger.kernel.org; virtualization@lists.linux-foundation.org
> Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org;
> stable@vger.kernel.org; David S. Miller <davem@davemloft.net>; Jakub
> Kicinski <kuba@kernel.org>; Kaly Xin <Kaly.Xin@arm.com>; Stefan Hajnoczi
> <stefanha@redhat.com>; Stefano Garzarella <sgarzare@redhat.com>
> Subject: Re: [PATCH v3] virtio_vsock: Fix race condition in
> virtio_transport_recv_pkt()
>
> > This fixes it by checking sk->sk_shutdown(suggested by Stefano) after
> > lock_sock since sk->sk_shutdown is set to SHUTDOWN_MASK under the
> > protection of lock_sock_nested.
>
> How do you think about a wording variant like the following?
>
>   Thus check the data structure member “sk_shutdown” (suggested by Stefano)
>   after a call of the function “lock_sock” since this field is set to
>   “SHUTDOWN_MASK” under the protection of “lock_sock_nested”.
>
Okay, will update the commit msg.

>
> Would you like to add the tag “Fixes” to the commit message?
Sure.

Thanks


--
Cheers,
Justin (Jia He)


>
> Regards,
> Markus
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-30 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30 10:40 [PATCH v3] virtio_vsock: Fix race condition in virtio_transport_recv_pkt() Markus Elfring
2020-05-30 12:26 ` Justin He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).