Re: general protection fault in percpu_ref_exit
From: Ming Lei
Date: Fri Oct 09 2020 - 00:05:51 EST
On Thu, Oct 08, 2020 at 07:23:02PM -0600, Jens Axboe wrote:
> On 10/8/20 2:28 PM, syzbot wrote:
> > syzbot has bisected this issue to:
> >
> > commit 2b0d3d3e4fcfb19d10f9a82910b8f0f05c56ee3e
> > Author: Ming Lei <ming.lei@xxxxxxxxxx>
> > Date: Thu Oct 1 15:48:41 2020 +0000
> >
> > percpu_ref: reduce memory footprint of percpu_ref in fast path
> >
> > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=126930d0500000
> > start commit: 8b787da7 Add linux-next specific files for 20201007
> > git tree: linux-next
> > final oops: https://syzkaller.appspot.com/x/report.txt?x=116930d0500000
> > console output: https://syzkaller.appspot.com/x/log.txt?x=166930d0500000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=aac055e9c8fbd2b8
> > dashboard link: https://syzkaller.appspot.com/bug?extid=fd15ff734dace9e16437
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=119a0568500000
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=106c0a8b900000
> >
> > Reported-by: syzbot+fd15ff734dace9e16437@xxxxxxxxxxxxxxxxxxxxxxxxx
> > Fixes: 2b0d3d3e4fcf ("percpu_ref: reduce memory footprint of percpu_ref in fast path")
> >
> > For information about bisection process see: https://goo.gl/tpsmEJ#bisection
>
> Ming, this looks like a call of percpu_ref_exit() on a zeroed refs (that
> hasn't been initialized). Really a caller error imho, but might make sense
> to be a bit safer there.
Hello Jens,
The fix is sent out as:
https://lore.kernel.org/linux-block/20201009040356.43802-1-ming.lei@xxxxxxxxxx/T/#u
Sorry for making the trouble.
Thanks,
Ming