Skip to content

Commit

Permalink
md/linear: avoid corrupting structure while waiting for rcu_free to c…
Browse files Browse the repository at this point in the history
…omplete.

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.

Cc: stable@kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
NeilBrown committed Aug 25, 2011
1 parent a5bf4df commit 1b6afa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/linear.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};


Expand Down

0 comments on commit 1b6afa1

Please sign in to comment.