On Mon, 23 May 2011 22:39:45 +0800 Kiefer Chang <zapchang@xxxxxxxxx> wrote: > If the previous connection's uses iscsi_event_modify to change the > waiting epoll events of the fd, > is this possible that the second connection go into an unexpected state? > in conn_close() might uses mgmt_end_notify() to do this. Ah, I think that you are right. When conn_close is called, tgtd has some in-progress commands. tgtd closes the connection and the fd is reused for a new connection. Then these commands finish, they might call mgmt_end_notify and change the state of the new connection wrongly. So we should move close() from iscsi_tcp_close to iscsi_tcp_release to prevent the reuse of fds. Can you send a patch to do that? Thanks! -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html