[bug report] afs: Add tracing for cell refcount and active user count

Dan Carpenter dan.carpenter at oracle.com
Thu Oct 22 06:58:59 EDT 2020


Hello David Howells,

This is a semi-automatic email about new static checker warnings.

The patch dca54a7bbb8c: "afs: Add tracing for cell refcount and 
active user count" from Oct 13, 2020, leads to the following Smatch 
complaint:

    fs/afs/cell.c:596 afs_unuse_cell()
    warn: variable dereferenced before check 'cell' (see line 592)

fs/afs/cell.c
   591	{
   592		unsigned int debug_id = cell->debug_id;
                                        ^^^^^^^^^^^^^^
The patch introduces a NULL dereference.

   593		time64_t now, expire_delay;
   594		int u, a;
   595	
   596		if (!cell)
                    ^^^^^
Before a NULL check.

   597			return;
   598	

regards,
dan carpenter



More information about the linux-afs mailing list