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

Re: [Minios-devel] [UNIKRAFT PATCH 1/1] include/uk/list.h: Change panic to UK_CRASH



The patch is pushed. Thanks.

And thank you for finding the typo.

And the last thing, please use the "--signoff" flag next time when you
do a git commit.

Thanks, Yuri.

"Vlad-Andrei BĂDOIU (78692)" <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
writes:

> Hey Yuri,
>
> Thanks for the review. I wouldn't mind changing the commit message.
>
> PS: There is a typo in the commit message 'warking'.
>
> Vlad
>
>
> On 11/07/2018 02:46 PM, Yuri Volchkov wrote:
>> Hi Vlad,
>> thank you looks good.
>>
>> Would you mind if I change the commit message to
>>
>> "
>> include/uk/list.h: Replace non-existing panic() calls to UK_CRASH()
>>
>> These panic() calls are copy-paste artifacts. We do not have the panic()
>> function. It was warking so far, because it is used only in the lists
>> sanity checking code. Which currently is not even possible to enable.
>> "
>>
>> I am also going to remove the "(78692)" from your name. And I would like
>> to ask you to modify your git config too. Unless you do want the 78692
>> be part of your name :).
>>
>> Reviewed-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
>>
>> - Yuri.
>>
>> "Vlad-Andrei BĂDOIU (78692)" <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
>> writes:
>>
>>> The list corectness implementation calls the function
>>> "panic" in case of errors. This patch changes the panic
>>> function to unikraft's UK_CRASH.
>>> ---
>>>   include/uk/list.h | 20 ++++++++++++--------
>>>   1 file changed, 12 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/include/uk/list.h b/include/uk/list.h
>>> index 42ba92f..4e350cd 100644
>>> --- a/include/uk/list.h
>>> +++ b/include/uk/list.h
>>> @@ -125,6 +125,9 @@
>>>    * _SWAP                  +       +       +       +
>>>    *
>>>    */
>>> +#if (defined(_KERNEL) && defined(INVARIANTS))
>>> +    #include <uk/assert.h>
>>> +#endif
>>>   #ifdef UK_QUEUE_MACRO_DEBUG
>>>   #warn Use UK_QUEUE_MACRO_DEBUG_TRACE and/or UK_QUEUE_MACRO_DEBUG_TRASH
>>>   #define   UK_QUEUE_MACRO_DEBUG_TRACE
>>> @@ -219,7 +222,7 @@ struct {                                                
>>>                 \
>>>   #if (defined(_KERNEL) && defined(INVARIANTS))
>>>   #define   UK__QMD_SLIST_CHECK_PREVPTR(prevp, elm) do {                    
>>> \
>>>     if (*(prevp) != (elm))                                          \
>>> -           panic("Bad prevptr *(%p) == %p != %p",                  \
>>> +           UK_CRASH("Bad prevptr *(%p) == %p != %p",                       
>>> \
>>>                 (prevp), *(prevp), (elm));                          \
>>>   } while (0)
>>>   #else
>>> @@ -495,7 +498,7 @@ struct {                                                
>>>                 \
>>>     if (UK_LIST_FIRST((head)) != 0 &&                               \
>>>         UK_LIST_FIRST((head))->field.le_prev !=                     \
>>>          &UK_LIST_FIRST((head)))                                    \
>>> -           panic("Bad list head %p first->prev != head", (head));  \
>>> +                   UK_CRASH("Bad list head %p first->prev != head", 
>>> (head));       \
>>>   } while (0)
>>>   
>>>   /*
>>> @@ -508,7 +511,7 @@ struct {                                                
>>>                 \
>>>     if (UK_LIST_NEXT((elm), field) != 0 &&                          \
>>>         UK_LIST_NEXT((elm), field)->field.le_prev !=                        
>>> \
>>>          &((elm)->field.le_next))                                   \
>>> -           panic("Bad link elm %p next->prev != elm", (elm));      \
>>> +           UK_CRASH("Bad link elm %p next->prev != elm", (elm));   \
>>>   } while (0)
>>>   
>>>   /*
>>> @@ -518,7 +521,7 @@ struct {                                                
>>>                 \
>>>    */
>>>   #define   UK__QMD_LIST_CHECK_PREV(elm, field) do {                        
>>>         \
>>>     if (*(elm)->field.le_prev != (elm))                             \
>>> -           panic("Bad link elm %p prev->next != elm", (elm));      \
>>> +           UK_CRASH("Bad link elm %p prev->next != elm", (elm));   \
>>>   } while (0)
>>>   #else
>>>   #define   UK__QMD_LIST_CHECK_HEAD(head, field)
>>> @@ -670,11 +673,12 @@ struct {                                              
>>>                 \
>>>    * If the tailq is non-empty, validates that the first element of the 
>>> tailq
>>>    * points back at 'head.'
>>>    */
>>> +
>>>   #define   UK__QMD_TAILQ_CHECK_HEAD(head, field) do {                      
>>>         \
>>>     if (!UK_TAILQ_EMPTY(head) &&                                    \
>>>         UK_TAILQ_FIRST((head))->field.tqe_prev !=                   \
>>>          &UK_TAILQ_FIRST((head)))                                   \
>>> -           panic("Bad tailq head %p first->prev != head", (head)); \
>>> +           UK_CRASH("Bad tailq head %p first->prev != head", (head));      
>>> \
>>>   } while (0)
>>>   
>>>   /*
>>> @@ -684,7 +688,7 @@ struct {                                                
>>>                 \
>>>    */
>>>   #define   UK__QMD_TAILQ_CHECK_TAIL(head, field) do {                      
>>>         \
>>>     if (*(head)->tqh_last != 0)                                     \
>>> -           panic("Bad tailq NEXT(%p->tqh_last) != 0", (head));     \
>>> +           UK_CRASH("Bad tailq NEXT(%p->tqh_last) != 0", (head));  \
>>>   } while (0)
>>>   
>>>   /*
>>> @@ -697,7 +701,7 @@ struct {                                                
>>>                 \
>>>     if (UK_TAILQ_NEXT((elm), field) != 0 &&                         \
>>>         UK_TAILQ_NEXT((elm), field)->field.tqe_prev !=                      
>>> \
>>>          &((elm)->field.tqe_next))                                  \
>>> -           panic("Bad link elm %p next->prev != elm", (elm));      \
>>> +           UK_CRASH("Bad link elm %p next->prev != elm", (elm));   \
>>>   } while (0)
>>>   
>>>   /*
>>> @@ -707,7 +711,7 @@ struct {                                                
>>>                 \
>>>    */
>>>   #define   UK__QMD_TAILQ_CHECK_PREV(elm, field) do {                       
>>>         \
>>>     if (*(elm)->field.tqe_prev != (elm))                            \
>>> -           panic("Bad link elm %p prev->next != elm", (elm));      \
>>> +           UK_CRASH("Bad link elm %p prev->next != elm", (elm));   \
>>>   } while (0)
>>>   #else
>>>   #define   UK__QMD_TAILQ_CHECK_HEAD(head, field)
>>> -- 
>>> 2.19.1
>>>
>

-- 
Yuri Volchkov
Software Specialist

NEC Europe Ltd
Kurfürsten-Anlage 36
D-69115 Heidelberg

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.