From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] rapidio: add mport char device driver
Date: Tue, 28 May 2019 11:38:58 +0000 [thread overview]
Message-ID: <20190528113858.GA6670@mwanda> (raw)
Hello Alexandre Bounine,
The patch e8de370188d0: "rapidio: add mport char device driver" from
Mar 22, 2016, leads to the following static checker warning:
drivers/rapidio/devices/rio_mport_cdev.c:1694 rio_mport_add_riodev()
warn: '__dynamic_pr_debug' unterminated user string 'dev_info.name'
drivers/rapidio/devices/rio_mport_cdev.c
1676 static int rio_mport_add_riodev(struct mport_cdev_priv *priv,
1677 void __user *arg)
1678 {
1679 struct mport_dev *md = priv->md;
1680 struct rio_rdev_info dev_info;
1681 struct rio_dev *rdev;
1682 struct rio_switch *rswitch = NULL;
1683 struct rio_mport *mport;
1684 size_t size;
1685 u32 rval;
1686 u32 swpinfo = 0;
1687 u16 destid;
1688 u8 hopcount;
1689 int err;
1690
1691 if (copy_from_user(&dev_info, arg, sizeof(dev_info)))
^^^^^^^^
1692 return -EFAULT;
1693
1694 rmcd_debug(RDEV, "name:%s ct:0x%x did:0x%x hc:0x%x", dev_info.name,
^^^^^^^^^^^^^
The user might have forgotten to NUL terminate this string.
1695 dev_info.comptag, dev_info.destid, dev_info.hopcount);
1696
1697 if (bus_find_device_by_name(&rio_bus_type, NULL, dev_info.name)) {
1698 rmcd_debug(RDEV, "device %s already exists", dev_info.name);
1699 return -EEXIST;
1700 }
regards,
dan carpenter
next reply other threads:[~2019-05-28 11:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 11:38 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-11-15 13:17 [bug report] rapidio: add mport char device driver Dan Carpenter
2022-11-15 13:25 ` Dan Carpenter
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=20190528113858.GA6670@mwanda \
--to=dan.carpenter@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.