[bug report] xfrm: Add virtual xfrm interfaces

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

 



Hello Steffen Klassert,

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

The patch f203b76d7809: "xfrm: Add virtual xfrm interfaces" from Jun
12, 2018, leads to the following Smatch complaint:

    net/xfrm/xfrm_interface.c:248 xfrmi_rcv_cb()
    error: we previously assumed 'skb->sp' could be null (see line 245)

net/xfrm/xfrm_interface.c
   244	
   245		if (err && !skb->sp)
                    ^^^^^^^^^^^^^^^
Can skb->sp be NULL when err is zero?  If not then we could just write

		if (!skb->sp)
			return 0;

   246			return 0;
   247	
   248		x = xfrm_input_state(skb);
                                     ^^^
Dereferenced inside the function.

   249	
   250		xi = xfrmi_lookup(xs_net(x), x);

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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