audk/NetworkPkg/HttpDxe
Gary Lin 6340f2b858 NetworkPkg/HttpDxe: Don't free Wrap in HttpTcpReceiveNotifyDpc
The HTTP Token Wrap is created in EfiHttpResponse() and then passed
to the deferred Receive event callback, HttpTcpReceiveNotifyDpc.
HttpTcpReceiveHeader and HttpTcpReceiveBody use a Tcp polling loop to
monitor the socket status and trigger the Receive event when a new
packet arrives. The Receive event brings up HttpTcpReceiveNotifyDpc
to process the HTTP message and the function will set Wrap->TcpWrap.IsRxDone
to TRUE to break the Tcp polling loop.

However, HttpTcpReceiveNotifyDpc mistakenly freed Wrap, so the Tcp
polling loop was actually checking a dead variable, and this led the
system into an unstable status.

Given the fact that the HTTP Token Wrap will be freed in EfiHttpResponse
or HttpResponseWorker, this commit removes every "FreePool (Wrap)" in
HttpTcpReceiveNotifyDpc.

v2:
* Free Wrap after HttpTcpReceiveBody returns normally.

Cc: "Wu, Jiaxin" <jiaxin.wu@intel.com>
Cc: "Siyuan Fu" <siyuan.fu@intel.com>
Cc: "El-Haj-Mahmoud, Samer" <samer.el-haj-mahmoud@hpe.com>
Cc: "Laszlo Ersek" <lersek@redhat.com>
Cc: "Hegde, Nagaraj P" <nagaraj-p.hegde@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
2016-05-20 12:40:19 +08:00
..
ComponentName.c
ComponentName.h
HttpDns.c NetworkPkg:Enable Http Boot over Ipv6 stack 2015-11-09 03:30:42 +00:00
HttpDns.h NetworkPkg:Enable Http Boot over Ipv6 stack 2015-11-09 03:30:42 +00:00
HttpDriver.c NetworkPkg:HttpDxe: Code changes to support HTTP PUT/POST operations 2016-05-16 14:22:33 +08:00
HttpDriver.h NetworkPkg: Use Http11 definitions in HttpDxe and HttpBootDxe 2016-02-25 15:02:31 +08:00
HttpDxe.inf NetworkPkg:Enable Http Boot over Ipv6 stack 2015-11-09 03:30:42 +00:00
HttpDxe.uni NetworkPkg: Convert all .uni files to utf-8 2015-12-15 04:56:57 +00:00
HttpDxeExtra.uni NetworkPkg: Convert all .uni files to utf-8 2015-12-15 04:56:57 +00:00
HttpImpl.c NetworkPkg/HttpDxe: Don't free Wrap in HttpTcpReceiveNotifyDpc 2016-05-20 12:40:19 +08:00
HttpImpl.h NetworkPkg: Use Http11 definitions in HttpDxe and HttpBootDxe 2016-02-25 15:02:31 +08:00
HttpProto.c NetworkPkg/HttpDxe: Don't free Wrap in HttpTcpReceiveNotifyDpc 2016-05-20 12:40:19 +08:00
HttpProto.h NetworkPkg:HttpDxe: Code changes to support HTTP PUT/POST operations 2016-05-16 14:22:33 +08:00