Re: [PATCH] md: check command validity early in md_ioctl().

2014-01-15 Thread NeilBrown
On Wed, 15 Jan 2014 16:58:52 +0100 Nicolas Schichan wrote: > Verify that the cmd parameter passed to md_ioctl() is valid before > doing anything. > > This fixes mddev->hold_active being set to 0 when an invalid ioctl > command is passed to md_ioctl() before the array has been configured. > > Cl

[PATCH] md: check command validity early in md_ioctl().

2014-01-15 Thread Nicolas Schichan
Verify that the cmd parameter passed to md_ioctl() is valid before doing anything. This fixes mddev->hold_active being set to 0 when an invalid ioctl command is passed to md_ioctl() before the array has been configured. Clearing mddev->hold_active in that case can lead to a livelock situation whe