Re: WARNING in pcpu_alloc
From: Roman Gushchin
Date: Mon Oct 01 2018 - 15:21:53 EST
Sure, will do soon. Thanks!
Sent from my iPhone
> On Oct 1, 2018, at 20:24, Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote:
>
> On Mon, Oct 1, 2018 at 6:14 PM syzbot
> <syzbot+18628320d3b14a5c459c@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> Hello,
>>
>> syzbot found the following crash on:
>>
>> HEAD commit: c5a9f9817ba5 Merge branch 'bpf-per-cpu-cgroup-local-storage'
>> git tree: bpf-next
>> console output: https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_log.txt-3Fx-3D175f98e6400000&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=1gv4CbD91yt2XHXTnOVUyGN15DqWWFz3xYlo9ioGZEw&e=
>> kernel config: https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_.config-3Fx-3D443816db871edd66&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=EdREqNHdZup-52h5rZo0Mq59K3DYw1YVizBexkGikEk&e=
>> dashboard link: https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_bug-3Fextid-3D18628320d3b14a5c459c&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=QlmeF_tfsUIhzLLRKSwcR5ruQyqZA5wqow5kw_BRA6o&e=
>> compiler: gcc (GCC) 8.0.1 20180413 (experimental)
>> syz repro: https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_repro.syz-3Fx-3D129cbd1a400000&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=VDTRxfcVTxFp9LiiLsUYKevDzawNsYjRuqMHAZ7an2c&e=
>> C reproducer: https://urldefense.proofpoint.com/v2/url?u=https-3A__syzkaller.appspot.com_x_repro.c-3Fx-3D16685ac9400000&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=jJYgtDM7QT-W-Fz_d29HYQ&m=RDq5scOAUEmnSy8tXTh8WldgNIIBkpJow65eBMO1X78&s=PIFdU3kSa5SEp7k0bav9JxpLGyBiPz84uRE25vyl5_0&e=
>>
>> IMPORTANT: if you fix the bug, please add the following tag to the commit:
>> Reported-by: syzbot+18628320d3b14a5c459c@xxxxxxxxxxxxxxxxxxxxxxxxx
>>
>> ------------[ cut here ]------------
>> illegal size (0) or align (8) for percpu allocation
>
> Roman,
>
> looks like
> if (attr->value_size > PAGE_SIZE)
> return ERR_PTR(-E2BIG);
> is not enough, since value_size==0 needs to be rejected as well.
> Could you prepare a patch?