From: NeilBrown Date: Thu, 25 Aug 2011 04:43:53 +0000 (+1000) Subject: md/linear: avoid corrupting structure while waiting for rcu_free to complete. X-Git-Tag: v3.0.5~191 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c122ead30dcdb8712ba3d49d478ae66ac33dfb7b;p=karo-tx-linux.git md/linear: avoid corrupting structure while waiting for rcu_free to complete. commit 1b6afa17581027218088a18a9ceda600e0ddba7a upstream. I don't know what I was thinking putting 'rcu' after a dynamically sized array! The array could still be in use when we call rcu_free() (That is the point) so we mustn't corrupt it. Signed-off-by: NeilBrown Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/md/linear.h b/drivers/md/linear.h index 0ce29b61605a..2f2da05b2ce9 100644 --- a/drivers/md/linear.h +++ b/drivers/md/linear.h @@ -10,9 +10,9 @@ typedef struct dev_info dev_info_t; struct linear_private_data { + struct rcu_head rcu; sector_t array_sectors; dev_info_t disks[0]; - struct rcu_head rcu; };