[<prev] [next>] [day] [month] [year] [list]
Message-ID: <eb5c728a-e6c2-c610-47ca-a5b3f636a2fc@theobroma-systems.com>
Date: Tue, 13 Mar 2018 18:48:36 +0100
From: Jakob Unterwurzacher <jakob.unterwurzacher@...obroma-systems.com>
To: "Dr. Philipp Tomsich" <philipp.tomsich@...obroma-systems.com>
Cc: Martin Elshuber <martin.elshuber@...obroma-systems.com>,
Wolfgang Grandegger <wg@...ndegger.com>,
Marc Kleine-Budde <mkl@...gutronix.de>,
linux-can@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 0/1] Open questions
On 13.03.18 18:42, Dr. Philipp Tomsich wrote:
>
>> On 13 Mar 2018, at 18:40, Jakob Unterwurzacher <jakob.unterwurzacher@...obroma-systems.com> wrote:
>>
>>>> + /* get the urb context */
>>>> + if (WARN_ON(!context))
>>>> + return;
>>>
>>> Can this happen?
>>
>> Not unless there is a bug in the code. But we want to get a message
>> before dereferencing a pointer.
>
> Why not use BUG_ON(!context)?
I believe BUG_ON kills the kernel - the intention was to get loud
message, but we'd rather not crash the user's machine.
Best regards,
Jakob
Powered by blists - more mailing lists