Re: [[Patch mdadm] 5/5] Fix segfault when the AUTO keyword is used in the config file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 11 Jan 2010 15:38:14 -0500
Doug Ledford <dledford@xxxxxxxxxx> wrote:

> Signed-off-by: Doug Ledford <dledford@xxxxxxxxxx>

Applied, thanks.

NeilBrown


> ---
>  config.c |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/config.c b/config.c
> index c962afd..2943221 100644
> --- a/config.c
> +++ b/config.c
> @@ -677,12 +677,21 @@ void homehostline(char *line)
>  static char *auto_options = NULL;
>  void autoline(char *line)
>  {
> +	char *w;
> +
>  	if (auto_options) {
>  		fprintf(stderr, Name ": AUTO line may only be give once."
>  			"  Subsequent lines ignored\n");
>  		return;
>  	}
> -	auto_options = line;		
> +
> +	auto_options = dl_strdup(line);		
> +	dl_init(auto_options);
> +
> +	for (w=dl_next(line); w != line ; w=dl_next(w)) {
> +		char *w2 = dl_strdup(w);
> +		dl_add(auto_options, w2);
> +	}
>  }
>  
>  int loaded = 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux