lkml.org 
[lkml]   [2013]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] dma-mapping: Add BUG_ON for uninitialized dma_ops
Date
On Tuesday 11 June 2013, James Bottomley wrote:
> Really, no, it's not a good idea at all. It invites tons of patches
> littering the code with BUG_ONs where we might possibly get a NULL
> dereference. All it does is add extra instructions to a code path for
> no actual benefit.
>
> If you can answer the question: what more information does the BUG_ON
> give you than the NULL deref Oops would not? then it might be
> reasonable.

The question is if a user can trigger the NULL dereference intentionally,
in which case they might get the kernel to jump into a user-provided
buffer.

Arnd


\
 
 \ /
  Last update: 2013-06-12 17:21    [W:0.085 / U:1.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site