From: Jiri Slaby <jslaby@suse.cz>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Fengguang Wu <fengguang.wu@intel.com>,
Yuanhan Liu <yuanhan.liu@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-serial@vger.kernel.org, Bill Pemberton <wfp5p@virginia.edu>
Subject: Re: [tty:tty-next 17/23] drivers/staging/dgrp/dgrp_net_ops.c:229:8: error: 'struct tty_struct' has no member named 'read_cnt'
Date: Sat, 27 Oct 2012 14:20:28 +0200 [thread overview]
Message-ID: <508BD18C.4070602@suse.cz> (raw)
In-Reply-To: <20121023105330.13d31938@pyramind.ukuu.org.uk>
On 10/23/2012 11:53 AM, Alan Cox wrote:
> On Tue, 23 Oct 2012 10:30:54 +0800
> Fengguang Wu <fengguang.wu@intel.com> wrote:
>
>> Hi Jiri,
>>
>> FYI, kernel build failed on
>>
>> tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
>> head: ecbbfd44a08fa80e0d664814efd4c187721b85f6
>> commit: ba2e68ac6157004ee4922fb39ebd9459bbae883e [17/23] TTY: move ldisc data from tty_struct: read_* and echo_* and canon_* stuff
>> config: x86_64-allmodconfig # make ARCH=x86_64 allmodconfig
>>
>> All error/warnings:
>>
>> drivers/staging/dgrp/dgrp_net_ops.c: In function 'dgrp_input':
>> drivers/staging/dgrp/dgrp_net_ops.c:216:27: error: 'struct tty_struct' has no member named 'real_raw'
>> drivers/staging/dgrp/dgrp_net_ops.c:229:8: error: 'struct tty_struct' has no member named 'read_cnt'
>> drivers/staging/dgrp/dgrp_net_ops.c:229:8: error: 'struct tty_struct' has no member named 'read_cnt'
>> drivers/staging/dgrp/dgrp_net_ops.c:261:30: error: 'struct tty_struct' has no member named 'real_raw'
>> drivers/staging/dgrp/dgrp_net_ops.c:276:28: error: 'struct tty_struct' has no member named 'real_raw'
>>
>> vim +229 drivers/staging/dgrp/dgrp_net_ops.c
>>
>> 0b52b749 Bill Pemberton 2012-09-20 228 /* take into consideration length of ldisc */
>> 0b52b749 Bill Pemberton 2012-09-20 @229 len = min(len, (N_TTY_BUF_SIZE - 1) - tty->read_cnt);
>
> This is broken and unsafe. It's always been broken and unsafe. Probably
> the report wants directing to whoever signed up to fix it all in staging.
And that function looks strange alltogether. It's like it's trying to
optimize in case of raw TTY by sending the data directly to ldisc. In a
completely racy way. I think that it should remain marked as BROKEN
until this is converted to tty_prepare_flip_string.
Or is there any use-case this optimization makes a difference?
thanks,
--
js
suse labs
next prev parent reply other threads:[~2012-10-27 12:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 2:30 [tty:tty-next 17/23] drivers/staging/dgrp/dgrp_net_ops.c:229:8: error: 'struct tty_struct' has no member named 'read_cnt' Fengguang Wu
2012-10-23 9:53 ` Alan Cox
2012-10-23 10:00 ` Fengguang Wu
2012-10-27 12:20 ` Jiri Slaby [this message]
2012-10-27 15:01 ` Greg Kroah-Hartman
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=508BD18C.4070602@suse.cz \
--to=jslaby@suse.cz \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=fengguang.wu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=wfp5p@virginia.edu \
--cc=yuanhan.liu@linux.intel.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 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.