Dear list,

the pasted gdb backtrace was unfortunately skipped due to the pound sign at the 
beginning of the line.
The following lines were meant to be part of the commit message.

On 07/26/15 15:16, Dorian Krause wrote:
> This commit ensures that slurmctld does not segfault in
> delete_resv() when a NULL string was provided as part of
> the RPC:

0  0x00007fa18aa32f2a in __strcmp_sse42 () from /lib64/libc.so.6
1  0x00000000004b0371 in delete_resv (resv_desc_ptr=0x7fa17c000a30) at 
reservation.c:2697
2  0x000000000049e3eb in _slurm_rpc_resv_delete (msg=0x7fa17c0008d0) at 
proc_req.c:3984
3  0x0000000000494726 in slurmctld_req (msg=0x7fa17c0008d0, arg=0x7fa1800008f0) 
at proc_req.c:441
4  0x00000000004399db in _service_connection (arg=0x7fa1800008f0) at 
controller.c:1097
5  0x00007fa18acc9df5 in start_thread () from /lib64/libpthread.so.0
6  0x00007fa18a9f71ad in clone () from /lib64/libc.so.6

>
> We also fix a mistake in the slurm API documentation related
> to the unit of the duration member of resv_desc_msg.
> ---
>  slurm/slurm.h.in         |  2 +-
>  src/slurmctld/proc_req.c | 10 ++++++++--
>  2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in
> index e708883..15776fa 100644
> --- a/slurm/slurm.h.in
> +++ b/slurm/slurm.h.in
> @@ -2234,7 +2234,7 @@ typedef struct resv_desc_msg {
>         char *accounts;         /* names of accounts permitted to use */
>         char *burst_buffer;     /* burst buffer resources to be included */
>         uint32_t *core_cnt;     /* Count of cores required */
> -       uint32_t duration;      /* duration of reservation in seconds */
> +       uint32_t duration;      /* duration of reservation in minutes */
>         time_t end_time;        /* end time of reservation */
>         char *features;         /* required node features */
>         uint32_t flags;         /* see RESERVE_FLAG_* above */
> diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c
> index d0b5083..955c730 100644
> --- a/src/slurmctld/proc_req.c
> +++ b/src/slurmctld/proc_req.c
> @@ -3971,10 +3971,16 @@ static void _slurm_rpc_resv_delete(slurm_msg_t * msg)
>         uid_t uid = g_slurm_auth_get_uid(msg->auth_cred, NULL);
>
>         START_TIMER;
> -       debug2("Processing RPC: REQUEST_DELETE_RESERVTION from uid=%d", uid);
> +       debug2("Processing RPC: REQUEST_DELETE_RESERVATION from uid=%d", uid);
>         if (!validate_operator(uid)) {
>                 error_code = ESLURM_USER_ID_MISSING;
> -               error("Security violation, DELETE_RESERVTION RPC from uid=%d",
> +               error("Security violation, DELETE_RESERVATION RPC from 
> uid=%d",
> +                     uid);
> +       }
> +
> +       if (!resv_desc_ptr->name) {
> +               error_code = ESLURM_INVALID_PARTITION_NAME;
> +               error("Invalid DELETE_RESERVATION RPC from uid=%d, name is 
> null",
>                       uid);
>         }
>
> --
> 1.8.3.1
>
>
>
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
> Prof. Dr. Sebastian M. Schmidt
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------

Reply via email to