Re: 4.9 regression/bisection - 761ed4a94582 tty: serial_core: convert uart_close to use tty_port_close
On Fri, 2016-10-21 at 10:00 -0500, Rob Herring wrote: > On Fri, Oct 21, 2016 at 9:40 AM, Mike Galbraith > wrote: > > On Fri, 2016-10-21 at 08:51 -0500, Rob Herring wrote: > > > On Fri, Oct 21, 2016 at 7:45 AM, Mike Galbraith > > > wrote: > > > > Greetings, > > > > > > > > My old DL980 G7 is exploding on reboot with master, with only the first > > > > couple lines actually making it to the console. Once (and only once) > > > > during bisection it did manage to get the below emitted. > > > > > > Does this patch[1] fix things for you? Sorry, only the reply seems to > > > be in the archives. > > > > Nope, still went boom. > > Can you try just removing the "port->console = uart_console(uport);" > line completely? That worked. -Mike
Re: 4.9 regression/bisection - 761ed4a94582 tty: serial_core: convert uart_close to use tty_port_close
On Fri, 2016-10-21 at 10:00 -0500, Rob Herring wrote: > On Fri, Oct 21, 2016 at 9:40 AM, Mike Galbraith > wrote: > > On Fri, 2016-10-21 at 08:51 -0500, Rob Herring wrote: > > > On Fri, Oct 21, 2016 at 7:45 AM, Mike Galbraith > > > wrote: > > > > Greetings, > > > > > > > > My old DL980 G7 is exploding on reboot with master, with only > > > > the first > > > > couple lines actually making it to the console. Once (and only > > > > once) > > > > during bisection it did manage to get the below emitted. > > > > > > Does this patch[1] fix things for you? Sorry, only the reply > > > seems to > > > be in the archives. > > > > Nope, still went boom. > > Can you try just removing the "port->console = uart_console(uport);" > line completely? Sure, what's one more dog slow boot cycle... tic toc tic toc... ;-) -Mike
Re: 4.9 regression/bisection - 761ed4a94582 tty: serial_core: convert uart_close to use tty_port_close
On Fri, Oct 21, 2016 at 9:40 AM, Mike Galbraith wrote: > On Fri, 2016-10-21 at 08:51 -0500, Rob Herring wrote: >> On Fri, Oct 21, 2016 at 7:45 AM, Mike Galbraith >> wrote: >> > Greetings, >> > >> > My old DL980 G7 is exploding on reboot with master, with only the first >> > couple lines actually making it to the console. Once (and only once) >> > during bisection it did manage to get the below emitted. >> >> Does this patch[1] fix things for you? Sorry, only the reply seems to >> be in the archives. > > Nope, still went boom. Can you try just removing the "port->console = uart_console(uport);" line completely? Rob
Re: 4.9 regression/bisection - 761ed4a94582 tty: serial_core: convert uart_close to use tty_port_close
On Fri, 2016-10-21 at 08:51 -0500, Rob Herring wrote: > On Fri, Oct 21, 2016 at 7:45 AM, Mike Galbraith > wrote: > > Greetings, > > > > My old DL980 G7 is exploding on reboot with master, with only the first > > couple lines actually making it to the console. Once (and only once) > > during bisection it did manage to get the below emitted. > > Does this patch[1] fix things for you? Sorry, only the reply seems to > be in the archives. Nope, still went boom. --- drivers/tty/serial/serial_core.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2746,8 +2746,6 @@ int uart_add_one_port(struct uart_driver uport->cons = drv->cons; uport->minor = drv->tty_driver->minor_start + uport->line; - port->console = uart_console(uport); - /* * If this port is a console, then the spinlock is already * initialised. @@ -2761,6 +2759,8 @@ int uart_add_one_port(struct uart_driver uart_configure_port(drv, state, uport); + port->console = uart_console(uport); + num_groups = 2; if (uport->attr_group) num_groups++;
Re: 4.9 regression/bisection - 761ed4a94582 tty: serial_core: convert uart_close to use tty_port_close
On Fri, Oct 21, 2016 at 7:45 AM, Mike Galbraith wrote: > Greetings, > > My old DL980 G7 is exploding on reboot with master, with only the first > couple lines actually making it to the console. Once (and only once) > during bisection it did manage to get the below emitted. Does this patch[1] fix things for you? Sorry, only the reply seems to be in the archives. Rob [1] https://lkml.org/lkml/2016/10/19/394 > > [ 358.315713] BUG: unable to handle kernel NULL pointer dereference at > 01e0 > [ 358.400610] IP: [] tty_wakeup+0xc/0x70 > [ 358.460221] PGD 0 > [ 358.481987] Oops: [#1] SMP > [ 358.515036] Dumping ftrace buffer: > [ 358.555845](ftrace buffer empty) > [ 358.591789] Modules linked in: autofs4(E) edd(E) af_packet(E) > cpufreq_conservative(E) cpufreq_userspace(E) fuse(E) loop(E) md_mod(E) > dm_mod(E) vhost_net(E) macvtap(E) macvlan(E) vhost(E) tun(E) ipmi_ssif(E) > iTCO_wdt(E) kvm_intel(E) iTCO_vendor_support(E) gpio_ich(E) ipmi_si(E) kvm(E) > joydev(E) i7core_edac(E) lpc_ich(E) irqbypass(E) bnx2(E) netxen_nic(E) > shpchp(E) sr_mod(E) pcspkr(E) ipmi_msghandler(E) mfd_core(E) cdrom(E) > edac_core(E) hpilo(E) hpwdt(E) pcc_cpufreq(E) sg(E) fjes(E) hid_generic(E) > button(E) acpi_cpufreq(E) ehci_pci(E) acpi_power_meter(E) ext4(E) mbcache(E) > jbd2(E) crc16(E) usbhid(E) uhci_hcd(E) ehci_hcd(E) usbcore(E) sd_mod(E) > thermal(E) scsi_dh_hp_sw(E) scsi_dh_emc(E) scsi_dh_rdac(E) scsi_dh_alua(E) > ata_generic(E) ata_piix(E) libata(E) hpsa(E) scsi_transport_sas(E) cciss(E) > scsi_mod(E) > [ 359.376789] CPU: 0 PID: 1698 Comm: kworker/0:4 Tainted: GE > 4.9.0-default #230 > [ 359.479980] Hardware name: Hewlett-Packard ProLiant DL980 G7, BIOS P66 > 07/07/2010 > [ 359.568962] task: 880273eba240 task.stack: c90001fe4000 > [ 359.635241] RIP: 0010:[] [] > tty_wakeup+0xc/0x70 > [ 359.720193] RSP: 0018:88027fc03df8 EFLAGS: 00010082 > [ 359.781228] RAX: 880274e901a8 RBX: 820941e0 RCX: > > [ 359.863437] RDX: 001b RSI: 02f8 RDI: > > [ 359.946407] RBP: 88027fc03e08 R08: 88027fc17cc0 R09: > > [ 360.024457] R10: ffe4 R11: ff9e R12: > 880274e901a8 > [ 360.105862] R13: R14: 0020 R15: > 00c2 > [ 360.187865] FS: () GS:88027fc0() > knlGS: > [ 360.278200] CS: 0010 DS: ES: CR0: 80050033 > [ 360.345712] CR2: 00b8 CR3: 01c06000 CR4: > 06f0 > [ 360.427968] Stack: > [ 360.449955] 820941e0 880274e901a8 88027fc03e18 > 814319d1 > [ 360.535162] 88027fc03e40 81439e20 820941e0 > 0060 > [ 360.625426] 0046 88027fc03e78 8143a05d > 820941e0 > [ 360.709070] Call Trace: > [ 360.736862] > [ 360.756285] [] uart_write_wakeup+0x21/0x30 > [ 360.823321] [] serial8250_tx_chars+0x220/0x280 > [ 360.894461] [] serial8250_handle_irq.part.22+0xdd/0x100 > [ 360.970372] [] serial8250_default_handle_irq+0x47/0x70 > [ 361.046833] [] serial8250_interrupt+0x63/0x130 > [ 361.109593] [] __handle_irq_event_percpu+0x3f/0x1a0 > [ 361.177384] [] handle_irq_event_percpu+0x23/0x60 > [ 361.240864] [] handle_irq_event+0x3e/0x60 > [ 361.302754] [] handle_edge_irq+0x99/0x150 > [ 361.386869] [] handle_irq+0x1d/0x30 > [ 361.445032] [] do_IRQ+0x4d/0xd0 > [ 361.494099] [] common_interrupt+0x8c/0x8c > [ 361.552523] > [ 361.572270] [] ? > native_queued_spin_lock_slowpath+0x12f/0x1a0 > [ 361.652790] [] queued_spin_lock_slowpath+0xb/0xf > [ 361.725628] [] _raw_spin_lock+0x20/0x30 > [ 361.789215] [] find_vmap_area+0x19/0x60 > [ 361.852010] [] remove_vm_area+0x11/0x70 > [ 361.911002] [] __vunmap+0x2a/0xd0 > [ 361.967589] [] vfree+0x2e/0x70 > [ 362.020037] [] put_task_stack+0x75/0x110 > [ 362.083000] [] finish_task_switch+0x1c7/0x240 > [ 362.149896] [] __schedule+0x224/0x6a0 > [ 362.212147] [] schedule+0x36/0x80 > [ 362.268175] [] worker_thread+0x1a2/0x4b0 > [ 362.332810] [] ? rescuer_thread+0x350/0x350 > [ 362.399906] [] kthread+0xca/0xe0 > [ 362.457034] [] ? kthread_park+0x60/0x60 > [ 362.519201] [] ret_from_fork+0x25/0x30 > [ 362.582964] Code: 00 00 48 85 c0 74 05 48 89 df ff d0 4c 89 ee 4c 89 e7 e8 > 18 98 1e 00 5b 41 5c 41 5d 5d c3 90 66 66 66 66 90 55 48 89 e5 41 54 53 <48> > 8b 87 e0 01 00 00 48 89 fb a8 20 75 20 48 8d bb 30 02 00 00 > [ 362.799640] RIP [] tty_wakeup+0xc/0x70 > [ 362.860880] RSP > [ 362.901975] CR2: 01e0 > > 761ed4a94582ab291aa24dcbea4e01e8936488c8 is the first bad commit > commit 761ed4a94582ab291aa24dcbea4e01e8936488c8 > Author: Rob Herring > Date: Mon Aug 22 17:39:10 2016 -0500 > > tty: serial_core: convert uart_close to use tty_port_close > > tty_port_close handles much of the common parts of tty close. Convert > uart_
4.9 regression/bisection - 761ed4a94582 tty: serial_core: convert uart_close to use tty_port_close
Greetings, My old DL980 G7 is exploding on reboot with master, with only the first couple lines actually making it to the console. Once (and only once) during bisection it did manage to get the below emitted. [ 358.315713] BUG: unable to handle kernel NULL pointer dereference at 01e0 [ 358.400610] IP: [] tty_wakeup+0xc/0x70 [ 358.460221] PGD 0 [ 358.481987] Oops: [#1] SMP [ 358.515036] Dumping ftrace buffer: [ 358.555845](ftrace buffer empty) [ 358.591789] Modules linked in: autofs4(E) edd(E) af_packet(E) cpufreq_conservative(E) cpufreq_userspace(E) fuse(E) loop(E) md_mod(E) dm_mod(E) vhost_net(E) macvtap(E) macvlan(E) vhost(E) tun(E) ipmi_ssif(E) iTCO_wdt(E) kvm_intel(E) iTCO_vendor_support(E) gpio_ich(E) ipmi_si(E) kvm(E) joydev(E) i7core_edac(E) lpc_ich(E) irqbypass(E) bnx2(E) netxen_nic(E) shpchp(E) sr_mod(E) pcspkr(E) ipmi_msghandler(E) mfd_core(E) cdrom(E) edac_core(E) hpilo(E) hpwdt(E) pcc_cpufreq(E) sg(E) fjes(E) hid_generic(E) button(E) acpi_cpufreq(E) ehci_pci(E) acpi_power_meter(E) ext4(E) mbcache(E) jbd2(E) crc16(E) usbhid(E) uhci_hcd(E) ehci_hcd(E) usbcore(E) sd_mod(E) thermal(E) scsi_dh_hp_sw(E) scsi_dh_emc(E) scsi_dh_rdac(E) scsi_dh_alua(E) ata_generic(E) ata_piix(E) libata(E) hpsa(E) scsi_transport_sas(E) cciss(E) scsi_mod(E) [ 359.376789] CPU: 0 PID: 1698 Comm: kworker/0:4 Tainted: GE 4.9.0-default #230 [ 359.479980] Hardware name: Hewlett-Packard ProLiant DL980 G7, BIOS P66 07/07/2010 [ 359.568962] task: 880273eba240 task.stack: c90001fe4000 [ 359.635241] RIP: 0010:[] [] tty_wakeup+0xc/0x70 [ 359.720193] RSP: 0018:88027fc03df8 EFLAGS: 00010082 [ 359.781228] RAX: 880274e901a8 RBX: 820941e0 RCX: [ 359.863437] RDX: 001b RSI: 02f8 RDI: [ 359.946407] RBP: 88027fc03e08 R08: 88027fc17cc0 R09: [ 360.024457] R10: ffe4 R11: ff9e R12: 880274e901a8 [ 360.105862] R13: R14: 0020 R15: 00c2 [ 360.187865] FS: () GS:88027fc0() knlGS: [ 360.278200] CS: 0010 DS: ES: CR0: 80050033 [ 360.345712] CR2: 00b8 CR3: 01c06000 CR4: 06f0 [ 360.427968] Stack: [ 360.449955] 820941e0 880274e901a8 88027fc03e18 814319d1 [ 360.535162] 88027fc03e40 81439e20 820941e0 0060 [ 360.625426] 0046 88027fc03e78 8143a05d 820941e0 [ 360.709070] Call Trace: [ 360.736862] [ 360.756285] [] uart_write_wakeup+0x21/0x30 [ 360.823321] [] serial8250_tx_chars+0x220/0x280 [ 360.894461] [] serial8250_handle_irq.part.22+0xdd/0x100 [ 360.970372] [] serial8250_default_handle_irq+0x47/0x70 [ 361.046833] [] serial8250_interrupt+0x63/0x130 [ 361.109593] [] __handle_irq_event_percpu+0x3f/0x1a0 [ 361.177384] [] handle_irq_event_percpu+0x23/0x60 [ 361.240864] [] handle_irq_event+0x3e/0x60 [ 361.302754] [] handle_edge_irq+0x99/0x150 [ 361.386869] [] handle_irq+0x1d/0x30 [ 361.445032] [] do_IRQ+0x4d/0xd0 [ 361.494099] [] common_interrupt+0x8c/0x8c [ 361.552523] [ 361.572270] [] ? native_queued_spin_lock_slowpath+0x12f/0x1a0 [ 361.652790] [] queued_spin_lock_slowpath+0xb/0xf [ 361.725628] [] _raw_spin_lock+0x20/0x30 [ 361.789215] [] find_vmap_area+0x19/0x60 [ 361.852010] [] remove_vm_area+0x11/0x70 [ 361.911002] [] __vunmap+0x2a/0xd0 [ 361.967589] [] vfree+0x2e/0x70 [ 362.020037] [] put_task_stack+0x75/0x110 [ 362.083000] [] finish_task_switch+0x1c7/0x240 [ 362.149896] [] __schedule+0x224/0x6a0 [ 362.212147] [] schedule+0x36/0x80 [ 362.268175] [] worker_thread+0x1a2/0x4b0 [ 362.332810] [] ? rescuer_thread+0x350/0x350 [ 362.399906] [] kthread+0xca/0xe0 [ 362.457034] [] ? kthread_park+0x60/0x60 [ 362.519201] [] ret_from_fork+0x25/0x30 [ 362.582964] Code: 00 00 48 85 c0 74 05 48 89 df ff d0 4c 89 ee 4c 89 e7 e8 18 98 1e 00 5b 41 5c 41 5d 5d c3 90 66 66 66 66 90 55 48 89 e5 41 54 53 <48> 8b 87 e0 01 00 00 48 89 fb a8 20 75 20 48 8d bb 30 02 00 00 [ 362.799640] RIP [] tty_wakeup+0xc/0x70 [ 362.860880] RSP [ 362.901975] CR2: 01e0 761ed4a94582ab291aa24dcbea4e01e8936488c8 is the first bad commit commit 761ed4a94582ab291aa24dcbea4e01e8936488c8 Author: Rob Herring Date: Mon Aug 22 17:39:10 2016 -0500 tty: serial_core: convert uart_close to use tty_port_close tty_port_close handles much of the common parts of tty close. Convert uart_close to use it and move the serial_core specific parts into tty_port.shutdown function. This will be needed to use tty_port functions directly from in kernel clients. This change causes ops->stop_rx() to be called after uart_wait_until_sent() is called which I think should be fine. Otherwise, the sequence of the close should be the same. Cc: Peter Hurley

