From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id E821D1F0FC3; Sat, 1 Apr 2017 14:45:09 -0400 (EDT) Received: from mail-wr0-x22c.google.com (mail-wr0-x22c.google.com [IPv6:2a00:1450:400c:c0c::22c]) by befuddled.reisers.ca (Postfix) with ESMTPS id 3EAF91F0ED1 for ; Sat, 1 Apr 2017 14:45:07 -0400 (EDT) Received: by mail-wr0-x22c.google.com with SMTP id w11so124174206wrc.3 for ; Sat, 01 Apr 2017 11:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=x/eowXW4LtdoWKbce7fdjCEAwKq09EwvIxCrrlGfdWQ=; b=kLbsvbpmXKdC2LV7hVDuZN+dcLLYaFkj4dIBlRF9rgzZIBCzuaxY66teZwtQLW73j5 gpJO+0d0LPWspLZzrg3UuD5KdzOLZiJtvZ0DEw+tUa9XQV0Tbj9/loTGBwVgal8m7ITY T8zID8cdDmVOH3JUJvn20snulfE/w68xaZsY/riQh4PO5EYff3A1/zafnhgtoXGRUqO5 gGUfk2k5uLyxtto7dWvNrO+m+n0EpOAGbCTNLy5sLAw533Zgcr8+ebqkpsqsegDfgsqT phRSO/L9XCxz50NeYmJIL0CZO5mIOgxeA7548mCMZoRwj315WeqU6M+ZUxj53uC53zwg kLSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=x/eowXW4LtdoWKbce7fdjCEAwKq09EwvIxCrrlGfdWQ=; b=l5dQ9P74b7XWkmc9+nEdeAbjxNf3Ujmmpdhsg/gMOsXhiksd7ahCQYLx4AL/fpOk4l Sgdgd8ZjQoF6VTHFqNR04QAbkzhrVsBfIFxQu2iRlwBO0I4yKeBllucy41jc3qgL4uQG MlVQrDZzzO4IYjFIgTzCinlBxpf3BNve4TtXzCB+vYYWyUw08Wp6K8JqxP6hkp62Dsb1 DhJDF/gjRGcaXAR0nQ0UUMrXbPg9F0CDoLDI/e8N6iV9sa/2sHuwcL/jhigh5rQ6ezLl mM+ZJgIAj9DK8xc8kNzZDcMc3WAiPkhSwDv9byiV/BSYYEJH5cDPoFNBa7oAsQIiQRHJ T0Gw== X-Gm-Message-State: AFeK/H3eQ0lH2b/8nBV05ku8HeWsjX9Nz6sz/WFeUuiVPkDBZR99iG7mPDibqv8NpOCL+w== X-Received: by 10.223.134.219 with SMTP id 27mr8259900wry.104.1491072304166; Sat, 01 Apr 2017 11:45:04 -0700 (PDT) Received: from sanghar ([2a00:23c4:7320:5e00:224:d6ff:fe76:7136]) by smtp.gmail.com with ESMTPSA id y69sm7614570wmh.27.2017.04.01.11.45.03 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 01 Apr 2017 11:45:03 -0700 (PDT) Date: Sat, 1 Apr 2017 19:45:02 +0100 From: Okash Khawaja To: Samuel Thibault Cc: speakup@linux-speakup.org Subject: Re: problem when testing with ttyUSB Message-ID: <20170401184502.GA31369@sanghar> References: <20170401181209.GA31249@sanghar> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170401181209.GA31249@sanghar> User-Agent: Mutt/1.7.2 (2016-11-26) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2017 18:45:10 -0000 Okay, it was me trying to play with tty->driver_data. But usb-serial.c uses it for its own purposes. Thanks, Okash On Sat, Apr 01, 2017 at 07:12:09PM +0100, Okash Khawaja wrote: > Hi, > > I am testing Apollo and DoubleTalk LT using USB serial converter, so > over ttyUSB0. In the call to tty_open_by_driver I am passing in (188,0). > TTY opens without errors and ldsic is assigned too. But as soon as an > operation is called on the tty_struct, there is a general protection or > segmentation fault. Following is call trace from Apollo calling > speakup_tty->ops->write. Similar call trace results from ltlk calling > tty_write_room(speakup_tty) through spk_ttyio_synth_immediate. > Kernel version is 4.10 but i'm using the speakup code from > Greg K-H staging-next branch as that's what my patches apply to. Could > this be the problem? > > I'm investigating it but any hints to speed it up will be helpful. > > Thanks. > > pr 01 12:54:29 sanghar kernel: speakup: loading out-of-tree module taints kernel. > Apr 01 12:54:29 sanghar kernel: speakup: module is from the staging directory, the quality is unknown, you have been warned. > Apr 01 12:54:29 sanghar kernel: input: Speakup as /devices/virtual/input/input19 > Apr 01 12:54:29 sanghar kernel: initialized device: /dev/synth, node (MAJOR 10, MINOR 25) > Apr 01 12:54:29 sanghar kernel: speakup 3.1.6: initialized > Apr 01 12:54:29 sanghar kernel: synth name on entry is: (null) > Apr 01 12:54:34 sanghar kernel: speakup_apollo: module is from the staging directory, the quality is unknown, you have been warned. > Apr 01 12:54:34 sanghar kernel: synth probe > Apr 01 12:54:34 sanghar kernel: speakup: completed probe > Apr 01 12:54:34 sanghar kernel: speakup: Going to call tty->ops->write. tty->port=0x18571808 > Apr 01 12:54:34 sanghar kernel: general protection fault: 0000 [#1] PREEMPT SMP > Apr 01 12:54:34 sanghar kernel: Modules linked in: speakup_apollo(CO) speakup(CO) ctr ccm joydev iTCO_wdt iTCO_vendor_support gpio_ich uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 arc4 videobuf2_core videodev iwldvm media dell_wmi sparse_keymap mac80211 dell_rbtn ppdev dell_laptop dell_smbios dcdbas dell_smm_hwmon coretemp kvm_intel snd_hda_codec_hdmi kvm iwlwifi cfg80211 snd_hda_codec_idt snd_hda_codec_generic irqbypass rfkill psmouse pcspkr i2c_i801 i915 lpc_ich cdc_ether usbnet mii pl2303 cdc_wdm cdc_acm usbserial snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep shpchp drm_kms_helper snd_pcm evdev snd_timer snd input_leds mousedev soundcore mac_hid thermal button battery drm e1000e wmi syscopyarea sysfillrect sysimgblt fb_sys_fops parport_pc i2c_algo_bit parport acpi_als ptp acpi_cpufreq pps_core > Apr 01 12:54:34 sanghar kernel: tpm_tis tpm_tis_core kfifo_buf video intel_agp tpm intel_gtt industrialio ac sch_fq_codel ip_tables x_tables ext4 crc16 jbd2 fscrypto mbcache sr_mod cdrom sd_mod hid_generic usbhid hid uhci_hcd serio_raw atkbd libps2 sdhci_pci sdhci led_class ahci libahci libata scsi_mod firewire_ohci mmc_core firewire_core crc_itu_t ehci_pci ehci_hcd usbcore usb_common i8042 serio > Apr 01 12:54:34 sanghar kernel: CPU: 1 PID: 4806 Comm: speakup Tainted: G C O 4.10.0-ARCH-00001-g6a2306b7d1e1-dirty #5 > Apr 01 12:54:34 sanghar kernel: Hardware name: Dell Inc. Latitude E4300 /0D201R, BIOS A13 10/29/2009 > Apr 01 12:54:34 sanghar kernel: task: ffff880086c5c240 task.stack: ffffc900006f0000 > Apr 01 12:54:34 sanghar kernel: RIP: 0010:serial_write+0x1d/0xa0 [usbserial] > Apr 01 12:54:34 sanghar kernel: RSP: 0018:ffffc900006f3dc8 EFLAGS: 00010282 > Apr 01 12:54:34 sanghar kernel: RAX: ffffffffa065e082 RBX: ffffffffa065f000 RCX: 32006f6c6c6f7061 > Apr 01 12:54:34 sanghar kernel: RDX: 0000000000000001 RSI: ffffc900006f3dfc RDI: ffff88009b11b400 > Apr 01 12:54:34 sanghar kernel: RBP: ffffc900006f3de8 R08: 0000000000000001 R09: 0000000000000363 > Apr 01 12:54:34 sanghar kernel: R10: 00000000000000dc R11: 0000000000000363 R12: ffff880086c5c240 > Apr 01 12:54:34 sanghar kernel: R13: 0000000000000040 R14: ffffffffa065f000 R15: 0000000000000246 > Apr 01 12:54:34 sanghar kernel: FS: 0000000000000000(0000) GS:ffff88011fd00000(0000) knlGS:0000000000000000 > Apr 01 12:54:34 sanghar kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > Apr 01 12:54:34 sanghar kernel: CR2: 00007f0934283cc4 CR3: 0000000001a09000 CR4: 00000000000406e0 > Apr 01 12:54:34 sanghar kernel: Call Trace: > Apr 01 12:54:34 sanghar kernel: spk_ttyio_out+0x6d/0xb0 [speakup] > Apr 01 12:54:34 sanghar kernel: do_catch_up+0x142/0x259 [speakup_apollo] > Apr 01 12:54:34 sanghar kernel: speakup_thread+0x222/0x230 [speakup] > Apr 01 12:54:34 sanghar kernel: ? wake_atomic_t_function+0x60/0x60 > Apr 01 12:54:34 sanghar kernel: kthread+0x101/0x140 > Apr 01 12:54:34 sanghar kernel: ? synth_release+0x20/0x20 [speakup] > Apr 01 12:54:34 sanghar kernel: ? kthread_create_on_node+0x60/0x60 > Apr 01 12:54:34 sanghar kernel: ret_from_fork+0x2c/0x40 > Apr 01 12:54:34 sanghar kernel: Code: 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 89 e5 41 56 41 55 41 54 53 4c 8b b7 68 02 00 00 49 8b 06 48 8b 08 <8b> 49 18 85 c9 74 75 41 89 d4 49 89 f5 48 89 fb 66 66 66 66 90 > Apr 01 12:54:34 sanghar kernel: RIP: serial_write+0x1d/0xa0 [usbserial] RSP: ffffc900006f3dc8 > Apr 01 12:54:34 sanghar kernel: ---[ end trace 27b76f7f163ce3c9 ]---