From: Li Xi Date: Mon, 2 Feb 2015 02:52:03 +0000 (-0500) Subject: staging/lustre/libcfs: fix illegal page access of tracefiled() X-Git-Tag: firefly_0821_release~176^2~2320^2~25 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2661e6c45625abd32d6447cafb8d9b99839ce408;p=firefly-linux-kernel-4.4.55.git staging/lustre/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. Signed-off-by: Li Xi Signed-off-by: Jian Yu Reviewed-on: http://review.whamcloud.com/11454 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5126 Reviewed-by: Emoly Liu Reviewed-by: Niu Yawei Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c b/drivers/staging/lustre/lustre/libcfs/tracefile.c index d18de048fa43..eb65b50f832d 100644 --- a/drivers/staging/lustre/lustre/libcfs/tracefile.c +++ b/drivers/staging/lustre/lustre/libcfs/tracefile.c @@ -1037,6 +1037,7 @@ static int tracefiled(void *arg) tage->used, rc); put_pages_back(&pc); __LASSERT(list_empty(&pc.pc_pages)); + break; } } MMSPACE_CLOSE;