From: Tom Lendacky <thomas.lendacky@amd.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [bug report] amd-xgbe: Add PCI device support
Date: Tue, 15 Nov 2016 14:24:45 +0000 [thread overview]
Message-ID: <6c58f8bb-2c53-d2d6-448f-a359e335fd66@amd.com> (raw)
In-Reply-To: <20161115111102.GA23305@mwanda>
On 11/15/2016 5:11 AM, Dan Carpenter wrote:
> 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.
Yes, looks like this has been present for a while. I'll submit a patch
to update both xgbe_common_read()/write() to return an error when *ppos
!= 0.
Thanks,
Tom
>
> 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
>
prev parent reply other threads:[~2016-11-15 14:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-15 11:11 [bug report] amd-xgbe: Add PCI device support Dan Carpenter
2016-11-15 14:24 ` Tom Lendacky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6c58f8bb-2c53-d2d6-448f-a359e335fd66@amd.com \
--to=thomas.lendacky@amd.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox