From ebdc4fc54d5defaa20417eabeb7a8d7b400fd53c Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Sun, 27 Apr 2014 13:07:11 -0400 Subject: [PATCH] staging/lustre/llite: prevent buffer overflow in fiemap lov_fiemap() does not take consider its @vallen parameter, which is the max buffer size the caller can hold for the fiemap extents. This patch fixes this and limits the max mapped fiemap extent count to fit in the preallocted buffer. This patch also fixes a memory out of bound write issue when the fiemap call is only for detecting the number of existing extent. Signed-off-by: Bobi Jam Reviewed-on: http://review.whamcloud.com/9834 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4619 Reviewed-by: Fan Yong Reviewed-by: Patrick Farrell Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed