Re: WARNING in refcount_inc (2)

From: Dmitry Vyukov
Date: Thu Feb 01 2018 - 11:24:44 EST


On Thu, Feb 1, 2018 at 3:34 PM, 'Andrey Konovalov' via syzkaller-bugs
<syzkaller-bugs@xxxxxxxxxxxxxxxx> wrote:
> On Wed, Jan 31, 2018 at 8:27 AM, Eric Biggers <ebiggers3@xxxxxxxxx> wrote:
>>
>> Also Dmitry, syzbot seems to be grouping together unrelated bugs under the
>> refcount_t WARNINGs; maybe those should be on a blacklist?
>
> Not a blacklist, we need a proper way of extracting the offending
> caller like it's done for reports from __this_cpu_* [1].
>
> [1] https://github.com/google/syzkaller/blob/master/pkg/report/linux.go#L579

Thanks, I've added this as a test case:
https://github.com/google/syzkaller/commit/e525e980eaed440e278614b9e887270ca67d2dde

We mishandle __this_cpu_* as well:
https://github.com/google/syzkaller/blob/master/pkg/report/testdata/linux/report/136
https://github.com/google/syzkaller/blob/master/pkg/report/testdata/linux/report/137
It does not seem that regexps can sustain this anymore (we also
mishandle rcu stalls and some other cases), I guess we need manual
parsing of stack traces that can handle all these cases.