lkml.org 
[lkml]   [2016]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 2/4] KVM: x86: Use vector-hashing to deliver lowest-priority interrupts
2016-01-25 13:25+0100, Paolo Bonzini:
> On 22/01/2016 15:01, Radim Krcmár wrote:
>>> for (i = 0; i <= mod; i++) {
>>> idx = find_next_bit(bitmap, bitmap_size, idx + 1);
>>> BUG_ON(idx == bitmap_size);
>>> }
>
> WARN_ON, not BUG_ON.

Callers don't check the return value for an error, because every error
is a BUG now. I think that we should check if we return bitmap_size.
(Current paths could dereference NULL or throw unrelated warnings.)

Also, WARN_ON_ONCE?

\
 
 \ /
  Last update: 2016-01-25 17:01    [W:0.093 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site