[PATCH] fs: btrfs: Prevent error pointer dereference in list_subvolums()

Dan Carpenter dan.carpenter at linaro.org
Tue Aug 1 13:13:15 CEST 2023


On Tue, Aug 01, 2023 at 11:05:11AM +0200, Marek Behún wrote:
> nice catch :) Dan, I always wanted to ask, since I've seen many such
> "nice catches" over different subsystems from you. Do you write some
> tools to find these? Or do you use coccinelle, or something?
> 

Thanks!  I'm using Smatch.

https://github.com/error27/smatch/

It's handy for me that u-boot and the Linux kernel have so much in
common and I can re-use a the kernel checks.  I had to make some changes
to Smatch to make it work but those are pushed now.

U-boot is something that Linaro cares about so if you have static
checker ideas then feel free to email the smatch mailing list.
smatch at vger.kernel.org

regards,
dan carpenter


More information about the U-Boot mailing list