From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: philmd@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 24 Sep 2019 03:47:06 -0700 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0D96B8553F for ; Tue, 24 Sep 2019 10:47:06 +0000 (UTC) Received: by mail-wr1-f69.google.com with SMTP id t11so414460wro.10 for ; Tue, 24 Sep 2019 03:47:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=C0GEECZDAG7W2HgKJIQZw7t6fO8hJmTOhWZqLYU+cAg=; b=STq8A9fbTw/hoVnRGXEtaWubvCutdX4V+OL/q2vNLhWxDdCGKIy1k/3IEyV0/4gSQn xVL9H7jNEgygfmB/UQJztN3DpUOWXz2jvXsnNh9yAqF6Gd1a4g8/67OB+9ILD4UyhrsP RvPuweD/HrnAeSZTW3xCmh+e4TL/Caao52/kcWbpkWUmyNlTHJV4xzTYv2ZMI5mvT9um 8clUSYtue8hIN+uW/yOCa6EaScb0rpAyBHg5tBTLzVv7vXihv4hdm9v5v0sg6W7Qf13w UVEaVXZPnD/LIAB0uz+RYtOVL1CizCTFkyESZbJQqdjv2e9sVfbCxdgTjNTQk8DpA40N /HOQ== X-Gm-Message-State: APjAAAXzs/wHWl0LCx0PMaERChaci/hNdole3MHCR58SqM7x9nOVxqRU 1SmmYpPAtzQ7rUw7HlVm1QgrACHNj3tXGnh2UBRiCeK8cABePhUl+KvFd1AcbYmiwSF+HtzRiZe mV9lM5i2S0XiovQ== X-Received: by 2002:a05:600c:110a:: with SMTP id b10mr2092505wma.18.1569322024853; Tue, 24 Sep 2019 03:47:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiSLFHIksGDvWcTHtmtZv3Dkt4ZzAz0OI6IPZ4QopW3IfpxCkTl50+KZkVJRV8o9+IX6jE3w== X-Received: by 2002:a05:600c:110a:: with SMTP id b10mr2092496wma.18.1569322024704; Tue, 24 Sep 2019 03:47:04 -0700 (PDT) Received: from [192.168.1.115] (240.red-88-21-68.staticip.rima-tde.net. [88.21.68.240]) by smtp.gmail.com with ESMTPSA id u4sm1824630wmg.41.2019.09.24.03.47.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Sep 2019 03:47:03 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH 03/35] EmbeddedPkg/AndroidFastbootTransportTcpDxe: fix DestroyChild() call To: devel@edk2.groups.io, lersek@redhat.com Cc: Ard Biesheuvel , Leif Lindholm References: <20190917194935.24322-1-lersek@redhat.com> <20190917194935.24322-4-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <90e7888d-078a-94b8-d4cd-42688318ca0c@redhat.com> Date: Tue, 24 Sep 2019 12:47:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190917194935.24322-4-lersek@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 9/17/19 9:49 PM, Laszlo Ersek wrote: > - The 2nd parameter of EFI_SERVICE_BINDING_CREATE_CHILD is: > > IN OUT EFI_HANDLE *ChildHandle > > - The 2nd parameter of EFI_SERVICE_BINDING_DESTROY_CHILD is: > > IN EFI_HANDLE ChildHandle > > Fix the DestroyChild() call in TcpFastbootTransportStop(). > > This is an actual bugfix; I don't know why the current code doesn't crash. > Perhaps the function is never reached in practice? (It could be tied to an > error path.) > > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Signed-off-by: Laszlo Ersek > --- > > Notes: > build-tested only > > EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c > index 29f23a82c75f..34f9ba74e4db 100644 > --- a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c > +++ b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c > @@ -503,7 +503,7 @@ TcpFastbootTransportStop ( > Status = mTcpListener->Configure (mTcpListener, NULL); > ASSERT_EFI_ERROR (Status); > > - Status = mTcpServiceBinding->DestroyChild (mTcpServiceBinding, &mTcpHandle); > + Status = mTcpServiceBinding->DestroyChild (mTcpServiceBinding, mTcpHandle); > > // Free any data the user didn't pick up > Entry = (FASTBOOT_TCP_PACKET_LIST *) GetFirstNode (&mPacketListHead); > Reviewed-by: Philippe Mathieu-Daude