All of lore.kernel.org
 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
  0 siblings, 0 replies; 5+ 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] 5+ messages in thread

* Re: [PATCH v3] virtio_vsock: Fix race condition in virtio_transport_recv_pkt()
@ 2020-05-30 10:40 ` Markus Elfring
  0 siblings, 0 replies; 5+ 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] 5+ messages in thread

* 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
  -1 siblings, 0 replies; 5+ 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] 5+ messages in thread

* RE: [PATCH v3] virtio_vsock: Fix race condition in virtio_transport_recv_pkt()
@ 2020-05-30 12:26   ` Justin He
  0 siblings, 0 replies; 5+ messages in thread
From: Justin He @ 2020-05-30 12:26 UTC (permalink / raw)
  To: Markus Elfring, kvm, net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IGltbWVkaWF0ZWx5IGFuZCBkbyBub3QgZGlzY2xvc2UgdGhlIGNvbnRlbnRzIHRv
IGFueSBvdGhlciBwZXJzb24sIHVzZSBpdCBmb3IgYW55IHB1cnBvc2UsIG9yIHN0b3JlIG9yIGNv
cHkgdGhlIGluZm9ybWF0aW9uIGluIGFueSBtZWRpdW0uIFRoYW5rIHlvdS4NCg=

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

* RE: [PATCH v3] virtio_vsock: Fix race condition in virtio_transport_recv_pkt()
@ 2020-05-30 12:26   ` Justin He
  0 siblings, 0 replies; 5+ 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] 5+ messages in thread

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

Thread overview: 5+ 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 10:40 ` Markus Elfring
2020-05-30 12:26 ` Justin He
2020-05-30 12:26   ` Justin He
2020-05-30 12:26   ` Justin He

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.