[PATCH] rtems: rtems_scheduler_ident_by_processor_set()

Gedare Bloom gedare at rtems.org
Wed May 5 14:54:12 UTC 2021


ok

On Wed, May 5, 2021 at 5:28 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> Check for a NULL processor set pointer.
> ---
>  cpukit/rtems/src/scheduleridentbyprocessorset.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/cpukit/rtems/src/scheduleridentbyprocessorset.c b/cpukit/rtems/src/scheduleridentbyprocessorset.c
> index 3d48bfba3e..8d55d470f5 100644
> --- a/cpukit/rtems/src/scheduleridentbyprocessorset.c
> +++ b/cpukit/rtems/src/scheduleridentbyprocessorset.c
> @@ -44,6 +44,10 @@ rtems_status_code rtems_scheduler_ident_by_processor_set(
>      return RTEMS_INVALID_ADDRESS;
>    }
>
> +  if ( cpuset == NULL ) {
> +    return RTEMS_INVALID_ADDRESS;
> +  }
> +
>    status = _Processor_mask_From_cpu_set_t( &set, cpusetsize, cpuset );
>    if ( status == PROCESSOR_MASK_COPY_INVALID_SIZE ) {
>      return RTEMS_INVALID_SIZE;
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list