Re: [PATCH] cifs: Possible slab memory corruption while updating extended stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu,  3 Feb 2011 13:55:59 -0600
shirishpargaonkar@xxxxxxxxx wrote:

> From: Shirish Pargaonkar <shirishpargaonkar@xxxxxxxxx>
> 
> 
> Updating extended statistics here can cause slab memory corruption
> when callback functions frees (mid_entry) slab memory.
> 
> 
> Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@xxxxxxxxx>
> ---
>  fs/cifs/connect.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 945b220..f3c5ea6 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -635,9 +635,6 @@ 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
>  				break;
>  			}
>  			mid_entry = NULL;
> -- 
> 1.6.0.2
> 


Good catch.

Would it be better to move this up above the call to "callback" instead
of eliminating it? I'm not so sure about the value of those stats, but
it seems like they'll be wrong if you eliminate those lines altogether.

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux