if we already established a iSCSI connection from initiator to target
based on IPv4 stack, after using reconnect -r command, we can not rebuild
the session with the windows target, since the server thought the session
is still exist. This issue is caused by wrong place of acquire ownership of
sock lock which lead the iSCSI can not reset the connection correctly.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
\r
ASSERT (Tcb != NULL);\r
\r
- Status = EfiAcquireLockOrFail (&(Sock->Lock));\r
- if (EFI_ERROR (Status)) {\r
-\r
- DEBUG ((EFI_D_ERROR, "SockDestroyChild: Get the lock to "\r
- "access socket failed with %r\n", Status));\r
-\r
- return EFI_ACCESS_DENIED;\r
- }\r
-\r
//\r
// Close the IP protocol.\r
//\r
NULL\r
);\r
\r
+ Status = EfiAcquireLockOrFail (&(Sock->Lock));\r
+ if (EFI_ERROR (Status)) {\r
+\r
+ DEBUG ((EFI_D_ERROR, "SockDestroyChild: Get the lock to "\r
+ "access socket failed with %r\n", Status));\r
+\r
+ return EFI_ACCESS_DENIED;\r
+ }\r
+\r
//\r
// force protocol layer to detach the PCB\r
//\r