From: Pete Zaitcev <zaitcev@redhat.com>
To: Tsozik <tsozik@yahoo.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] mct_u232: IOCTL implementation
Date: Sun, 26 Dec 2010 10:49:05 -0700 [thread overview]
Message-ID: <20101226104905.6801612f@lembas.zaitcev.lan> (raw)
In-Reply-To: <985550.24725.qm@web65704.mail.ac4.yahoo.com>
On Sat, 25 Dec 2010 21:39:39 -0800 (PST)
Tsozik <tsozik@yahoo.com> wrote:
> +++ mct_u232.c 2010-12-25 21:44:57.714640343 -0500
> +static int mct_u232_ioctl(struct tty_struct *tty, struct file *file,
> + unsigned int cmd, unsigned long arg)
> +{
> + case TIOCGICOUNT:
> + dbg("%s - (%d) TIOCGICOUNT RX=%d, TX=%d", __func__,
> + port->number, mct_u232_port->icount.rx, mct_u232_port->icount.tx);
> + if (copy_to_user((void __user *)arg, &mct_u232_port->icount,
> + sizeof(mct_u232_port->icount)))
> + return -EFAULT;
This looks suspicious. Didn't we relocate the machinery for TIOCGICOUNT
into a generic place? Please examine how ->get_icount works before
hand-rolling the ioctl.
-- Pete
next prev parent reply other threads:[~2010-12-26 17:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-26 5:39 [PATCH 1/1] mct_u232: IOCTL implementation Tsozik
2010-12-26 17:49 ` Pete Zaitcev [this message]
2010-12-26 19:41 ` Tsozik
2010-12-26 18:41 ` Greg KH
2010-12-26 19:51 ` Tsozik
2010-12-26 21:30 ` Randy Dunlap
2010-12-26 22:01 ` Tsozik
2010-12-26 22:03 ` Jesper Juhl
2010-12-26 23:31 ` Tsozik
-- strict thread matches above, loose matches on Subject: below --
2010-12-26 22:14 Tsozik
2010-12-27 0:28 ` Pete Zaitcev
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=20101226104905.6801612f@lembas.zaitcev.lan \
--to=zaitcev@redhat.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=tsozik@yahoo.com \
/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