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 ]--- _______________________________________________ Speakup mailing list Speakup@xxxxxxxxxxxxxxxxx http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup