lkml.org 
[lkml]   [2008]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] lockdep: fix spurious 'inconsistent lock state' warning

* Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:

> Since f82b217e3513fe3af342c0f3ee1494e86250c21c lockdep can output
> spurious warnings related to hwirqs due to hardirq_off shrinkage from
> int to bit-sized flag. Guard it with double negation to fix the
> warning.
>
> Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>

good spotting! Applied to tip/core/urgent, thanks Dmitry.

I'm wondering, is there any way to teach gcc some sanity here - a safer
variant of bitfields, that is just not allowed to overflow into or
corrupt nearby fields? The fact that a benign looking hlock->state = 15
can corrupt other fields worries me quite a bit. Valid C semantics or
not, this is a totally dangerous construct. The space savings are very
real though, so it would be nice to get 'safer bitfields', somehow.

Ingo


\
 
 \ /
  Last update: 2008-08-18 09:45    [W:0.137 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site