Blame SOURCES/use-after-free-asm-request.patch

f68389
From: "Gayatri Vasudevan" <gayatri.vasudevan@oracle.com>
f68389
Date: Fri, 21 Dec 2018 11:45:15 -0800
f68389
Subject: oracleasm: Fix use after free for request processing timer
f68389
f68389
Update r->r_elapsed under the spinlock to avoid racing with the
f68389
completion code freeing the asm_request.
f68389
f68389
This change bas been backported from UEK4 from the following commit
f68389
9897de3bb02964dff8d331a5c8a0d538392e4a3b
f68389
"(oracleasm: Fix use after free for request processing timer)"
f68389
f68389
Orabug: 28660867
f68389
f68389
Signed-off-by: Gayatri Vasudevan <gayatri.vasudevan@oracle.com>
f68389
Reviewed-by: Srinivas Eeda <srinivas.eeda@oracle.com>
f68389
---
f68389
source/drivers/block/oracleasm/driver.c | 3 +--
f68389
1 file changed, 1 insertion(+), 2 deletions(-)
f68389
f68389
diff --git a/drivers/block/oracleasm/driver.c b/drivers/block/oracleasm/driver.c
f68389
index 0488159..40a441b 100644
f68389
--- a/drivers/block/oracleasm/driver.c
f68389
+++ b/drivers/block/oracleasm/driver.c
f68389
@@ -1104,6 +1104,7 @@ static void asm_finish_io(struct asm_request *r)
f68389
	if (r->r_error)
f68389
		r->r_status |= ASM_ERROR;
f68389
	r->r_status |= ASM_COMPLETED;
f68389
+	r->r_elapsed = ((jiffies - r->r_elapsed) * 1000000) / HZ;
f68389
f68389
	spin_unlock_irqrestore(&afi->f_lock, flags);
f68389
f68389
@@ -1117,8 +1118,6 @@ static void asm_finish_io(struct asm_request *r)
f68389
		}
f68389
	}
f68389
f68389
-	r->r_elapsed = ((jiffies - r->r_elapsed) * 1000000) / HZ;
f68389
-
f68389
	mlog(ML_REQUEST, "Finished request 0x%p\n", r);
f68389
f68389
	wake_up(&afi->f_wait);
f68389
-- 
f68389
1.8.3.1