[bug report] net: ipa: reduce arguments to ipa_table_init_add()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Alex Elder,

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

The patch 5cb76899fb47: "net: ipa: reduce arguments to 
ipa_table_init_add()" from Nov 2, 2022, leads to the following Smatch 
complaint:

    drivers/net/ipa/ipa_table.c:423 ipa_table_init_add()
    error: we previously assumed 'hash_mem' could be null (see line 414)

drivers/net/ipa/ipa_table.c
   413			count = mem->size / sizeof(__le64);
   414			hash_count = hash_mem && hash_mem->size / sizeof(__le64);
                                     ^^^^^^^^
The patch adds checks for NULL.

   415		}
   416		size = count * sizeof(__le64);
   417		hash_size = hash_count * sizeof(__le64);
   418	
   419		addr = ipa_table_addr(ipa, filter, count);
   420		hash_addr = ipa_table_addr(ipa, filter, hash_count);
   421	
   422		ipa_cmd_table_init_add(trans, opcode, size, mem->offset, addr,
   423				       hash_size, hash_mem->offset, hash_addr);
                                                  ^^^^^^^^^^^^^^^^
Unchecked dereference.

   424		if (!filter)
   425			return;

regards,
dan carpenter



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux