lkml.org 
[lkml]   [2018]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 0/1] Open questions
From
Date
On 03/13/2018 06:42 PM, Dr. Philipp Tomsich wrote:
>
>> On 13 Mar 2018, at 18:40, Jakob Unterwurzacher
>> <jakob.unterwurzacher@theobroma-systems.com
>> <mailto:jakob.unterwurzacher@theobroma-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)?

As this will halt the whole system.

Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-03-13 18:49    [W:0.139 / U:2.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site