[LinuxPPS] [pre-PATCH] PPS line discipline support

Johan Bejeryd johbe207 at student.liu.se
Sun Jun 1 18:42:28 CEST 2008


Hello!

On Sun, Jun 1, 2008 at 4:01 PM, Rodolfo Giometti <giometti at enneenne.com> wrote:

> To enable the line discipline (and then got a new PPS source) you can
> use my (little) tool ttyctrl at
> http://ftp.enneenne.com/pub/misc/linuxpps/tools/ publish in both
> binary and source. Just use the command:
>
>        $ ttyctrl -X -s 17 <serial_device>
>
> put at <serial_device> the file /dev/ttyS0, /dev/ttyS1 or whatever
> suites your needs.
>
> If everything goes well you should see a new pps source into the
> /sys/class/pps/ directory and you NTPD should wrok as before.
>
> You should test both standard IRQ support and CONFIG_PPS_IRQ_EVENTS
> and report differences.

Unfortunately  ./ttyctrl -X -s 17 /dev/ttyS0 gives a segmentation
fault on my system (Intel P4, fedora 9).
This is with the latest patch applied on source from the git
repository. I've had similar problems with kernel versions later than
2.6.24 when running setserial. I'm not sure why it fails, maybe
someone else knows?

/Johan

The kernel log follows:

BUG: unable to handle kernel NULL pointer dereference at virtual
address 00000001
printing eip: c04f9c16 *pde = 00000000
Oops: 0000 [#1] SMP
Modules linked in: bridge bnep rfcomm l2cap bluetooth autofs4 fuse
sunrpc iptable_filter ip_tables ip6table_filter ip6_tables x_tables
loop dm_multipath ipv6 snd_intel8x0 snd_ac97_codec ac97_bus
snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device
ppdev snd_pcm_oss snd_mixer_oss snd_pcm e100 mii i2c_i801 snd_timer
snd parport_pc i2c_core button soundcore iTCO_wdt parport pcspkr
snd_page_alloc iTCO_vendor_support sr_mod sg cdrom floppy dm_snapshot
dm_zero dm_mirror dm_mod ata_piix pata_acpi ata_generic libata sd_mod
scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd

Pid: 2494, comm: ttyctrl Not tainted (2.6.24 #3)
EIP: 0060:[<c04f9c16>] EFLAGS: 00210282 CPU: 0
EIP is at strcmp+0xa/0x1d
EAX: c06d0475 EBX: f5e61840 ECX: f5e61bd0 EDX: 00000001
ESI: c06d04e5 EDI: 00000001 EBP: f3710cc0 ESP: f3710cb8
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process ttyctrl (pid: 2494, ti=f3710000 task=f371a000 task.ti=f3710000)
Stack: 00000001 f3710d00 f3710cd0 c04c011a f3710d00 f5e61ea0 f3710cf4 c04c024e
       f5e61bd0 f3710cf4 c04c0391 f5e61bd0 f3710d00 f5e61ea0 fffffff4 f3710d1c
       c04bfe02 f5e61bd0 f5e61bd0 00000000 00000000 00000000 f5d53000 00000000
Call Trace:
 [<c04061e8>] show_stack_log_lvl+0xa0/0xbb
 [<c04062a8>] show_registers+0xa5/0x182
 [<c04064ba>] die+0x135/0x220
 [<c0631609>] do_page_fault+0x531/0x60a
 [<c062fdb2>] error_code+0x72/0x78
 [<c04c011a>] sysfs_find_dirent+0x16/0x27
 [<c04c024e>] sysfs_add_one+0x17/0xe1
 [<c04bfe02>] sysfs_add_file+0x45/0x6d
 [<c04bfe8d>] sysfs_create_file+0x20/0x22
 [<c056b867>] device_create_file+0x1f/0x2f
 [<c056bac6>] device_add+0x24f/0x556
 [<c056bddf>] device_register+0x12/0x15
 [<c056be53>] device_create+0x71/0x92
 [<c059ef53>] pps_register_cdev+0xa0/0xdb
 [<c059f800>] pps_register_source+0x152/0x1da
 [<c059fac4>] pps_tty_open+0x82/0xc2
 [<c054a7a5>] tty_ioctl+0xa17/0xd86
 [<c0490ab6>] do_ioctl+0x52/0x69
 [<c0490cfe>] vfs_ioctl+0x231/0x244
 [<c0490d53>] sys_ioctl+0x42/0x5b
 [<c0405106>] syscall_call+0x7/0xb
 =======================
Code: 89 4d ec 89 d1 f2 ae 4f 8b 4d ec 49 78 06 ac aa 84 c0 75 f7 31
c0 aa 8b 45 f0 5b 5e 5b 5e 5f 5d c3 55 89 e5 57 89 d7 56 89 c6 ac <ae>
75 08 84 c0 75 f8 31 c0 eb 04 19 c0 0c 01 5e 5f 5d c3 55 89
EIP: [<c04f9c16>] strcmp+0xa/0x1d SS:ESP 0068:f3710cb8
---[ end trace 887337bd73d4d72d ]---
PPS source #0 removed



More information about the LinuxPPS mailing list