re: Drivers: hv: kvp: convert to hv_utils_transport

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

 



Hello Vitaly Kuznetsov,

The patch 11bc3a5fa91f: "Drivers: hv: kvp: convert to
hv_utils_transport" from Apr 11, 2015, leads to the following static
checker warning:

	drivers/hv/hv_kvp.c:356 kvp_send_key()
	error: potential null dereference 'message'.  (kzalloc returns null)

drivers/hv/hv_kvp.c
   351          /* The transaction state is wrong. */
   352          if (kvp_transaction.state != HVUTIL_HOSTMSG_RECEIVED)
   353                  return;
   354  
   355          message = kzalloc(sizeof(*message), GFP_KERNEL);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The patch accidentally removes the NULL check on allocation failure.

   356          message->kvp_hdr.operation = operation;
   357          message->kvp_hdr.pool = pool;
   358          in_msg = kvp_transaction.kvp_msg;
   359  


regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux