[PATCH] kexec: (bugfix) mem_regions_sort()

Pratyush Anand panand at redhat.com
Fri Jul 29 01:25:37 PDT 2016


On 29/07/2016:05:23:23 PM, AKASHI Takahiro wrote:
> The third argument of qsort() must be the size of each array element.

Yes, I had sent it day before yesterday which has been ACKed by Russell.

> 
> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> ---
>  kexec/mem_regions.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kexec/mem_regions.c b/kexec/mem_regions.c
> index e61c074..a8cb510 100644
> --- a/kexec/mem_regions.c
> +++ b/kexec/mem_regions.c
> @@ -24,7 +24,7 @@ static int mem_range_cmp(const void *a1, const void *a2)
>   */
>  void mem_regions_sort(struct memory_ranges *ranges)
>  {
> -	qsort(ranges->ranges, ranges->size, sizeof(ranges->ranges),
> +	qsort(ranges->ranges, ranges->size, sizeof(ranges->ranges[0]),
>  	      mem_range_cmp);
>  }
>  
> -- 
> 2.9.0
> 
> 
> _______________________________________________
> kexec mailing list
> kexec at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec



More information about the kexec mailing list