[edk2-devel] [PATCH 20/35] NetworkPkg/Ip4Dxe: fix NetLibDestroyServiceChild() call

Laszlo Ersek posted 35 patches 6 years, 4 months ago
[edk2-devel] [PATCH 20/35] NetworkPkg/Ip4Dxe: fix NetLibDestroyServiceChild() call
Posted by Laszlo Ersek 6 years, 4 months ago
Both NetLibDestroyServiceChild() and EFI_SERVICE_BINDING_DESTROY_CHILD
take an EFI_HANDLE for the "ChildHandle" parameter, not an (EFI_HANDLE*).

This patch fixes a real bug.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---

Notes:
    possibly only build-tested

 NetworkPkg/Ip4Dxe/Ip4If.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/NetworkPkg/Ip4Dxe/Ip4If.c b/NetworkPkg/Ip4Dxe/Ip4If.c
index 44b8d9fc8faf..53a333037f94 100644
--- a/NetworkPkg/Ip4Dxe/Ip4If.c
+++ b/NetworkPkg/Ip4Dxe/Ip4If.c
@@ -592,7 +592,7 @@ Ip4SetAddress (
       Interface->Controller,
       Interface->Image,
       &gEfiArpServiceBindingProtocolGuid,
-      &Interface->ArpHandle
+      Interface->ArpHandle
       );
 
     Interface->ArpHandle = NULL;
@@ -657,7 +657,7 @@ ON_ERROR:
     Interface->Controller,
     Interface->Image,
     &gEfiArpServiceBindingProtocolGuid,
-    &Interface->ArpHandle
+    Interface->ArpHandle
     );
 
   return Status;
-- 
2.19.1.3.g30247aa5d201



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47407): https://edk2.groups.io/g/devel/message/47407
Mute This Topic: https://groups.io/mt/34180221/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 20/35] NetworkPkg/Ip4Dxe: fix NetLibDestroyServiceChild() call
Posted by Laszlo Ersek 6 years, 4 months ago
Jiaxin, Siyuan,

can you please review this patch?

Thanks
Laszlo


On 09/17/19 21:49, Laszlo Ersek wrote:
> Both NetLibDestroyServiceChild() and EFI_SERVICE_BINDING_DESTROY_CHILD
> take an EFI_HANDLE for the "ChildHandle" parameter, not an (EFI_HANDLE*).
> 
> This patch fixes a real bug.
> 
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 
> Notes:
>     possibly only build-tested
> 
>  NetworkPkg/Ip4Dxe/Ip4If.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/NetworkPkg/Ip4Dxe/Ip4If.c b/NetworkPkg/Ip4Dxe/Ip4If.c
> index 44b8d9fc8faf..53a333037f94 100644
> --- a/NetworkPkg/Ip4Dxe/Ip4If.c
> +++ b/NetworkPkg/Ip4Dxe/Ip4If.c
> @@ -592,7 +592,7 @@ Ip4SetAddress (
>        Interface->Controller,
>        Interface->Image,
>        &gEfiArpServiceBindingProtocolGuid,
> -      &Interface->ArpHandle
> +      Interface->ArpHandle
>        );
>  
>      Interface->ArpHandle = NULL;
> @@ -657,7 +657,7 @@ ON_ERROR:
>      Interface->Controller,
>      Interface->Image,
>      &gEfiArpServiceBindingProtocolGuid,
> -    &Interface->ArpHandle
> +    Interface->ArpHandle
>      );
>  
>    return Status;
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48097): https://edk2.groups.io/g/devel/message/48097
Mute This Topic: https://groups.io/mt/34180221/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 20/35] NetworkPkg/Ip4Dxe: fix NetLibDestroyServiceChild() call
Posted by Philippe Mathieu-Daudé 6 years, 4 months ago
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> Both NetLibDestroyServiceChild() and EFI_SERVICE_BINDING_DESTROY_CHILD
> take an EFI_HANDLE for the "ChildHandle" parameter, not an (EFI_HANDLE*).
> 
> This patch fixes a real bug.
> 
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 
> Notes:
>     possibly only build-tested
> 
>  NetworkPkg/Ip4Dxe/Ip4If.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/NetworkPkg/Ip4Dxe/Ip4If.c b/NetworkPkg/Ip4Dxe/Ip4If.c
> index 44b8d9fc8faf..53a333037f94 100644
> --- a/NetworkPkg/Ip4Dxe/Ip4If.c
> +++ b/NetworkPkg/Ip4Dxe/Ip4If.c
> @@ -592,7 +592,7 @@ Ip4SetAddress (
>        Interface->Controller,
>        Interface->Image,
>        &gEfiArpServiceBindingProtocolGuid,
> -      &Interface->ArpHandle
> +      Interface->ArpHandle
>        );
>  
>      Interface->ArpHandle = NULL;
> @@ -657,7 +657,7 @@ ON_ERROR:
>      Interface->Controller,
>      Interface->Image,
>      &gEfiArpServiceBindingProtocolGuid,
> -    &Interface->ArpHandle
> +    Interface->ArpHandle

I'm surprise this one never triggered unexpected behaviors, it
looks easy to reach.

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>

>      );
>  
>    return Status;
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47859): https://edk2.groups.io/g/devel/message/47859
Mute This Topic: https://groups.io/mt/34180221/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 20/35] NetworkPkg/Ip4Dxe: fix NetLibDestroyServiceChild() call
Posted by Siyuan, Fu 6 years, 4 months ago
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>

> -----Original Message-----
> From: Philippe Mathieu-Daudé <philmd@redhat.com>
> Sent: 2019年9月24日 0:04
> To: devel@edk2.groups.io; lersek@redhat.com
> Cc: Wu, Jiaxin <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>
> Subject: Re: [edk2-devel] [PATCH 20/35] NetworkPkg/Ip4Dxe: fix
> NetLibDestroyServiceChild() call
> 
> On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> > Both NetLibDestroyServiceChild() and
> EFI_SERVICE_BINDING_DESTROY_CHILD
> > take an EFI_HANDLE for the "ChildHandle" parameter, not an
> (EFI_HANDLE*).
> >
> > This patch fixes a real bug.
> >
> > Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> > Cc: Siyuan Fu <siyuan.fu@intel.com>
> > Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> > ---
> >
> > Notes:
> >     possibly only build-tested
> >
> >  NetworkPkg/Ip4Dxe/Ip4If.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/NetworkPkg/Ip4Dxe/Ip4If.c b/NetworkPkg/Ip4Dxe/Ip4If.c
> > index 44b8d9fc8faf..53a333037f94 100644
> > --- a/NetworkPkg/Ip4Dxe/Ip4If.c
> > +++ b/NetworkPkg/Ip4Dxe/Ip4If.c
> > @@ -592,7 +592,7 @@ Ip4SetAddress (
> >        Interface->Controller,
> >        Interface->Image,
> >        &gEfiArpServiceBindingProtocolGuid,
> > -      &Interface->ArpHandle
> > +      Interface->ArpHandle
> >        );
> >
> >      Interface->ArpHandle = NULL;
> > @@ -657,7 +657,7 @@ ON_ERROR:
> >      Interface->Controller,
> >      Interface->Image,
> >      &gEfiArpServiceBindingProtocolGuid,
> > -    &Interface->ArpHandle
> > +    Interface->ArpHandle
> 
> I'm surprise this one never triggered unexpected behaviors, it
> looks easy to reach.
> 
> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
> 
> >      );
> >
> >    return Status;
> >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48153): https://edk2.groups.io/g/devel/message/48153
Mute This Topic: https://groups.io/mt/34180221/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-