All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Set return code on failure
@ 2022-01-04 21:18 Patrick Venture
  2022-01-04 21:32 ` Patrick Venture
  2022-01-04 21:46 ` [PATCH] net/tap: " Philippe Mathieu-Daudé
  0 siblings, 2 replies; 4+ messages in thread
From: Patrick Venture @ 2022-01-04 21:18 UTC (permalink / raw)
  To: jasowang; +Cc: qemu-devel, Peter Foley

From: Peter Foley <pefoley@google.com>

Match the other error handling in this function.

Signed-off-by: Peter Foley <pefoley@google.com>
---
 net/tap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/tap.c b/net/tap.c
index f716be3e3f..c5cbeaa7a2 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -900,6 +900,7 @@ int net_init_tap(const Netdev *netdev, const char *name,
             if (i == 0) {
                 vnet_hdr = tap_probe_vnet_hdr(fd, errp);
                 if (vnet_hdr < 0) {
+                    ret = -1;
                     goto free_fail;
                 }
             } else if (vnet_hdr != tap_probe_vnet_hdr(fd, NULL)) {
-- 
2.34.1.448.ga2b2bfdf31-goog



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

* Re: [PATCH] Set return code on failure
  2022-01-04 21:18 [PATCH] Set return code on failure Patrick Venture
@ 2022-01-04 21:32 ` Patrick Venture
  2022-01-05  3:16   ` Jason Wang
  2022-01-04 21:46 ` [PATCH] net/tap: " Philippe Mathieu-Daudé
  1 sibling, 1 reply; 4+ messages in thread
From: Patrick Venture @ 2022-01-04 21:32 UTC (permalink / raw)
  To: Jason Wang; +Cc: QEMU Developers, Peter Foley

[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

On Tue, Jan 4, 2022 at 1:18 PM Patrick Venture <venture@google.com> wrote:

> From: Peter Foley <pefoley@google.com>
>
> Match the other error handling in this function.
>

Just noticed I didn't fix up the commit title here to match style.  Should
I do a PATCH RESEND or a new patch, or can you add the "net/tap: " to the
title before applying (should it be accepted).


>
> Signed-off-by: Peter Foley <pefoley@google.com>
>
Reviewed-by: Patrick Venture <venture@google.com>

> ---
>  net/tap.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/net/tap.c b/net/tap.c
> index f716be3e3f..c5cbeaa7a2 100644
> --- a/net/tap.c
> +++ b/net/tap.c
> @@ -900,6 +900,7 @@ int net_init_tap(const Netdev *netdev, const char
> *name,
>              if (i == 0) {
>                  vnet_hdr = tap_probe_vnet_hdr(fd, errp);
>                  if (vnet_hdr < 0) {
> +                    ret = -1;
>                      goto free_fail;
>                  }
>              } else if (vnet_hdr != tap_probe_vnet_hdr(fd, NULL)) {
> --
> 2.34.1.448.ga2b2bfdf31-goog
>
>

[-- Attachment #2: Type: text/html, Size: 1999 bytes --]

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

* Re: [PATCH] net/tap: Set return code on failure
  2022-01-04 21:18 [PATCH] Set return code on failure Patrick Venture
  2022-01-04 21:32 ` Patrick Venture
@ 2022-01-04 21:46 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-01-04 21:46 UTC (permalink / raw)
  To: Patrick Venture, jasowang
  Cc: Daniel P. Berrangé, Peter Foley, qemu-devel

Cc'ing Daniel

On 4/1/22 22:18, Patrick Venture wrote:
> From: Peter Foley <pefoley@google.com>
> 
> Match the other error handling in this function.
> 

Fixes: e7b347d0bf6 ("net: detect errors from probing vnet hdr flag for 
TAP devices")

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> Signed-off-by: Peter Foley <pefoley@google.com>
> ---
>   net/tap.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/net/tap.c b/net/tap.c
> index f716be3e3f..c5cbeaa7a2 100644
> --- a/net/tap.c
> +++ b/net/tap.c
> @@ -900,6 +900,7 @@ int net_init_tap(const Netdev *netdev, const char *name,
>               if (i == 0) {
>                   vnet_hdr = tap_probe_vnet_hdr(fd, errp);
>                   if (vnet_hdr < 0) {
> +                    ret = -1;
>                       goto free_fail;
>                   }
>               } else if (vnet_hdr != tap_probe_vnet_hdr(fd, NULL)) {



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

* Re: [PATCH] Set return code on failure
  2022-01-04 21:32 ` Patrick Venture
@ 2022-01-05  3:16   ` Jason Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Wang @ 2022-01-05  3:16 UTC (permalink / raw)
  To: Patrick Venture; +Cc: Peter Foley, QEMU Developers

On Wed, Jan 5, 2022 at 5:32 AM Patrick Venture <venture@google.com> wrote:
>
>
>
> On Tue, Jan 4, 2022 at 1:18 PM Patrick Venture <venture@google.com> wrote:
>>
>> From: Peter Foley <pefoley@google.com>
>>
>> Match the other error handling in this function.
>
>
> Just noticed I didn't fix up the commit title here to match style.  Should I do a PATCH RESEND or a new patch, or can you add the "net/tap: " to the title before applying (should it be accepted).

Please resend.

Thanks

>
>>
>>
>> Signed-off-by: Peter Foley <pefoley@google.com>
>
> Reviewed-by: Patrick Venture <venture@google.com>
>>
>> ---
>>  net/tap.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/net/tap.c b/net/tap.c
>> index f716be3e3f..c5cbeaa7a2 100644
>> --- a/net/tap.c
>> +++ b/net/tap.c
>> @@ -900,6 +900,7 @@ int net_init_tap(const Netdev *netdev, const char *name,
>>              if (i == 0) {
>>                  vnet_hdr = tap_probe_vnet_hdr(fd, errp);
>>                  if (vnet_hdr < 0) {
>> +                    ret = -1;
>>                      goto free_fail;
>>                  }
>>              } else if (vnet_hdr != tap_probe_vnet_hdr(fd, NULL)) {
>> --
>> 2.34.1.448.ga2b2bfdf31-goog
>>



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

end of thread, other threads:[~2022-01-05  3:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 21:18 [PATCH] Set return code on failure Patrick Venture
2022-01-04 21:32 ` Patrick Venture
2022-01-05  3:16   ` Jason Wang
2022-01-04 21:46 ` [PATCH] net/tap: " Philippe Mathieu-Daudé

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.