From: Shirish Pargaonkar Date: Thu, 3 Feb 2011 20:31:18 +0000 (-0600) Subject: cifs: Possible slab memory corruption while updating extended stats (repost) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=64474bdd07f673cc48509ea0375274422c8f73bf;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git cifs: Possible slab memory corruption while updating extended stats (repost) Updating extended statistics here can cause slab memory corruption if a callback function frees slab memory (mid_entry). Signed-off-by: Shirish Pargaonkar Reviewed-by: Jeff Layton Signed-off-by: Steve French --- diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 945b2202275f..1f32a2893b5f 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -633,11 +633,11 @@ incomplete_rcv: mid_entry->largeBuf = isLargeBuf; multi_t2_fnd: mid_entry->midState = MID_RESPONSE_RECEIVED; - list_del_init(&mid_entry->qhead); - mid_entry->callback(mid_entry); #ifdef CONFIG_CIFS_STATS2 mid_entry->when_received = jiffies; #endif + list_del_init(&mid_entry->qhead); + mid_entry->callback(mid_entry); break; } mid_entry = NULL;