stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tilman Schmidt <tilman@imap.cc>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: Jiri Slaby <jslaby@suse.cz>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 3.12 16/33] isdn/gigaset: reset tty->receive_room when attaching ser_gigaset
Date: Mon, 21 Sep 2015 18:07:36 +0200	[thread overview]
Message-ID: <56002B48.7090008@imap.cc> (raw)
In-Reply-To: <5600028B.4050904@hurleysoftware.com>

[-- Attachment #1: Type: text/plain, Size: 2976 bytes --]



Am 21.09.2015 um 15:13 schrieb Peter Hurley:
> On 09/18/2015 08:38 AM, Tilman Schmidt wrote:
>> Am 17.09.2015 um 20:13 schrieb Peter Hurley:

[...]

>>> So for example, if you manually set N_PPP (as if by user error)
>>
>> User error wouldn't suffice, as the LD would get reset to N_TTY when the
>> serial device is closed. You would have to write a program that
>> deliberately switched the LD first to N_PPP and then to N_GIGASET_M101
>> without closing the device in between.
> 
> ???
> 
> The tool you authored will do it from the command line
> 
> $ ldattach PPP /dev/ttyS1
> $ ldattach GIGASET_M101 /dev/ttyS1
> 
> Note that nothing here closes the serial device 'in between', and
> the tty core has switched directly from PPP to GIGASET_M101.
> n_tty->receive_room is now 64K.

Indeed it does. I stand corrected. The possibility of running ldattach a
second time without terminating the first instance didn't occur to me.

> Please add switching from line disciplines other than N_TTY to your
> regression testing.

I don't do regression tests for the driver anymore since I stepped down
as a maintainer, so that would be up to the present maintainer of
ser_gigaset. But I see no reason for that. As I already explained, N_TTY
is the only problematic case.

>>> and then set this line discipline, tty->receive_room will be 64K, not 4K.
>>
>> That wouldn't affect the operation of ser_gigaset,
> 
> I've explained this before to you, but here it is again:
> 
> tty->receive_room announces the maximum amt of data the line discipline
> can accept from tty core with each call to its receive_buf() method (for
> line disciplines that don't provide flow control).
> 
> If the line discipline sets ->receive_room to 64K but can only handle
> 8K (as in the case of GIGASET_M101), then data loss should be the expected
> result.

If you'd care to look at the actual code you'd notice that it truly
won't make any difference. The receive_buf() method of ser_gigaset is
prepared to drop data and log an error when its receive buffer
overflows, no matter how big the block of data passed from tty core is.
The only difference a smaller ->receive_room value might possibly make
is to distribute the overflowing data to more receive_buf() calls.

(Note that the Gigaset M101 device operates at 115200 bits/sec max. so
it takes at least 700 msecs to transmit 8k bytes. If we ever get into a
situation where tty core actually accumulates more than that amount of
data before forwarding it to GIGASET_M101 then we have a more serious
problem anyway.)

Again, I won't oppose applying this patch to stable releases before
3.10. I just don't see the need, so it would be up to you to advocate
such a request.

-- 
Tilman Schmidt                              E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  parent reply	other threads:[~2015-09-21 16:07 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15 14:22 [PATCH 3.12 00/33] 3.12.48-stable review Jiri Slaby
2015-09-15 14:21 ` [PATCH 3.12 01/33] mfd: lpc_ich: Assign subdevice ids automatically Jiri Slaby
2015-09-15 14:21 ` [PATCH 3.12 02/33] drm/radeon: fix hotplug race at startup Jiri Slaby
2015-09-15 14:21 ` [PATCH 3.12 03/33] ipv6: Make MLD packets to only be processed locally Jiri Slaby
2015-09-15 14:21 ` [PATCH 3.12 04/33] net: graceful exit from netif_alloc_netdev_queues() Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 05/33] rtnetlink: verify IFLA_VF_INFO attributes before passing them to driver Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 06/33] ip_tunnel: fix ipv4 pmtu check to honor inner ip header df Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 07/33] net/tipc: initialize security state for new connection socket Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 08/33] bridge: mdb: zero out the local br_ip variable before use Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 09/33] net: pktgen: fix race between pktgen_thread_worker() and kthread_stop() Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 10/33] net: do not process device backlog during unregistration Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 11/33] net: call rcu_read_lock early in process_backlog Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 12/33] net: Clone skb before setting peeked flag Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 13/33] net: Fix skb csum races when peeking Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 14/33] net: Fix skb_set_peeked use-after-free bug Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 15/33] bridge: mdb: fix double add notification Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 16/33] isdn/gigaset: reset tty->receive_room when attaching ser_gigaset Jiri Slaby
     [not found]   ` <CAKU3ayUyyYZzDr-AiZEW7uy=kwTtNptnOZMAKEYyn+=dd_47bg@mail.gmail.com>
2015-09-16  0:37     ` Tilman Schmidt
2015-09-16  1:18       ` Peter Hurley
2015-09-16 11:26         ` Tilman Schmidt
2015-09-17 18:13           ` Peter Hurley
2015-09-18 12:38             ` Tilman Schmidt
2015-09-21 13:13               ` Peter Hurley
2015-09-21 13:38                 ` Tilman Schmidt
2015-09-21 16:54                   ` Peter Hurley
2015-09-21 17:31                     ` Tilman Schmidt
2015-09-21 16:07                 ` Tilman Schmidt [this message]
2015-10-06 21:00                   ` Paul Bolle
2015-10-12  9:18                     ` Tilman Schmidt
2015-09-15 14:22 ` [PATCH 3.12 17/33] ipv6: lock socket in ip6_datagram_connect() Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 18/33] bonding: fix destruction of bond with devices different from arphrd_ether Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 19/33] bonding: correct the MAC address for "follow" fail_over_mac policy Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 20/33] inet: frags: fix defragmented packet's IP header for af_packet Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 21/33] netlink: don't hold mutex in rcu callback when releasing mmapd ring Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 22/33] net/mlx4_core: Fix wrong index in propagating port change event to VFs Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 23/33] rds: fix an integer overflow test in rds_info_getsockopt() Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 24/33] mtip32xx: dynamically allocate buffer in debugfs functions Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 25/33] cifs: Send a logoff request before removing a smb session Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 26/33] lpfc: Fix scsi prep dma buf error Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 27/33] bio: fix argument of __bio_add_page() for max_sectors > 0xffff Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 28/33] dm cache mq: fix memory allocation failure for large cache devices Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 29/33] aio: fix reqs_available handling Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 30/33] netfilter: nf_conntrack: fix RCU race in nf_conntrack_find_get Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 31/33] netfilter: nf_conntrack: don't release a conntrack with non-zero refcnt Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 32/33] PCI: Add dev_flags bit to access VPD through function 0 Jiri Slaby
2015-09-15 14:22 ` [PATCH 3.12 33/33] PCI: Add VPD function 0 quirk for Intel Ethernet devices Jiri Slaby
2015-09-15 14:53 ` [PATCH 3.12 00/33] 3.12.48-stable review Nikolay Borisov
2015-09-16 13:59   ` Jiri Slaby
2015-09-15 16:12 ` Shuah Khan
2015-09-16  9:29   ` Jiri Slaby
2015-09-18  8:11   ` Jiri Slaby
2015-09-18 16:31     ` Rustad, Mark D
2015-09-15 16:27 ` Guenter Roeck
2015-09-18  8:12   ` Jiri Slaby

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=56002B48.7090008@imap.cc \
    --to=tilman@imap.cc \
    --cc=davem@davemloft.net \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    --cc=stable@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;
as well as URLs for NNTP newsgroup(s).