Re: KASAN: use-after-free Read in v4l2_release (3)

From: Dan Carpenter
Date: Fri Jan 24 2020 - 09:11:37 EST


This would work but another approach would be to to allocate "usbvision"
with devm_kzalloc(&dev->dev,... I believe that would postpone the free
enough to solve the use after free but I hadn't tested it yet. But
other drivers do that so hopefully it works.

regards,
dan carpenter