From: Li Xi Date: Thu, 14 Aug 2014 21:10:35 +0000 (-0700) Subject: LU-5126 libcfs: fix illegal page access of tracefiled() X-Git-Tag: 2.5.3~16 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f2e62f4db6f35b6d80fb9ecb5a913d05bae41b6a;p=fs%2Flustre-release.git LU-5126 libcfs: fix illegal page access of tracefiled() After failure happens and put_pages_back() returns the pages, tracefiled() should not go on itering on the page list. Otherwise, some pages might be accessed illegally. This patch is back-ported from the following one: Lustre-commit: f111fac3f785400f892ca03bfb9078c6bd091f7d Lustre-change: http://review.whamcloud.com/10524 Signed-off-by: Li Xi Change-Id: I9f2953e9e0a6473112c7d1ce16375b84c66d622c Signed-off-by: Jian Yu Reviewed-on: http://review.whamcloud.com/11454 Tested-by: Jenkins Reviewed-by: Emoly Liu Reviewed-by: Niu Yawei Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/libcfs/libcfs/tracefile.c b/libcfs/libcfs/tracefile.c index 2c5dd47..98c8208 100644 --- a/libcfs/libcfs/tracefile.c +++ b/libcfs/libcfs/tracefile.c @@ -1045,6 +1045,7 @@ static int tracefiled(void *arg) "but wrote %d\n", tage->used, rc); put_pages_back(&pc); __LASSERT(cfs_list_empty(&pc.pc_pages)); + break; } } MMSPACE_CLOSE;