Skip to contentSkip to conversation

Discarding of packets

PATCH New Stefan Berger 1 participant 1 message Jul 13, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Discarding of packets

Discard a future response packet after a timeout has occurred instead of removing the request right away.

xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c +2 -2
Index: root/xen-unstable.hg/linux-2.6-xen-sparse/drivers/xen/tpmback/tpmback.c
===================================================================
@@ -852,11 +852,11 @@ static void processing_timeout(unsigned 
 	 */
 	if (pak == packet_find_packet(&dataex.pending_pak, pak) ||
 	    pak == packet_find_packet(&dataex.current_pak, pak)) {
-		list_del(&pak->next);
 		if ((pak->flags & PACKET_FLAG_DISCARD_RESPONSE) == 0) {
 			tpm_send_fail_message(pak, pak->req_tag);
 		}
-		packet_free(pak);
+		/* discard future responses */
+		pak->flags |= PACKET_FLAG_DISCARD_RESPONSE;
 	}
 
 	write_unlock_irqrestore(&dataex.pak_lock, flags);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel