public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [bug report] amd-xgbe: Add PCI device support
@ 2016-11-15 11:11 Dan Carpenter
  2016-11-15 14:24 ` Tom Lendacky
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-11-15 11:11 UTC (permalink / raw)
  To: kernel-janitors

Hello Lendacky, Thomas,

The patch 47f164deab22: "amd-xgbe: Add PCI device support" from Nov
10, 2016, leads to the following static checker warning:

	drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c:360 xprop_reg_value_write()
	error: uninitialized symbol 'value'.

drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c
   348  static ssize_t xprop_reg_value_write(struct file *filp,
   349                                       const char __user *buffer,
   350                                       size_t count, loff_t *ppos)
   351  {
   352          struct xgbe_prv_data *pdata = filp->private_data;
   353          unsigned int value;
   354          ssize_t len;
   355  
   356          len = xgbe_common_write(buffer, count, ppos, &value);

Assume "ppos" is non-zero then we are using uninitialized data.  I
suspect that xgbe_common_write() is buggy.

   357          if (len < 0)
   358                  return len;
   359  
   360          XP_IOWRITE(pdata, pdata->debugfs_xprop_reg, value);
   361  
   362          return len;
   363  }



regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-15 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-15 11:11 [bug report] amd-xgbe: Add PCI device support Dan Carpenter
2016-11-15 14:24 ` Tom Lendacky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox