#78 Kernel oops when dhcpcd aborted

closed-fixed
Jeff Garzik
tulip (7)
8
2001-12-18
2001-12-17
John Zielinski
No

When I aborted dhcpcd with a CTRL-C as it was taking
forever because the media type for the interface
wasn't being set properly I got a kernel oops. After
I fixed the media type problem, dhcpcd hung after I
brought the interface down and back up again. CTRL-C
again and I got the oops again.

Dec 17 00:06:09 gatekeeper kernel: eth1: enabling
interface
Dec 17 00:06:09 gatekeeper kernel: eth1: set link
10baseT auto, mode 7ffc0040, sia
10c4,ffffef01,ffffffff,ffff0008
Dec 17 00:06:09 gatekeeper kernel:
set mode 7ffc0000, set sia ef01,ffff,8
Dec 17 00:06:09 gatekeeper kernel: eth1: link up,
media 10baseT auto
Dec 17 00:07:07 gatekeeper kernel: eth1: 10baseT auto
link ok, mode 7ffc2002 status 50c8
Dec 17 00:08:07 gatekeeper kernel: eth1: 10baseT auto
link ok, mode 7ffc2002 status 50c8
Dec 17 00:09:07 gatekeeper kernel: eth1: 10baseT auto
link ok, mode 7ffc2002 status 50c8
Dec 17 00:10:07 gatekeeper kernel: eth1: 10baseT auto
link ok, mode 7ffc2002 status 50c8
Dec 17 00:11:07 gatekeeper kernel: eth1: 10baseT auto
link ok, mode 7ffc2002 status 50c8
Dec 17 00:12:07 gatekeeper kernel: eth1: 10baseT auto
link ok, mode 7ffc2002 status 50c8
Dec 17 00:13:07 gatekeeper kernel: eth1: 10baseT auto
link ok, mode 7ffc2002 status 50c8
Dec 17 00:13:40 gatekeeper kernel: eth1: disabling
interface
Dec 17 00:13:40 gatekeeper kernel: eth1: timeout
expired stopping DMA
Dec 17 00:13:40 gatekeeper kernel: Unable to handle
kernel NULL pointer dereference at virtual address
00000072
Dec 17 00:13:40 gatekeeper kernel: printing eip:
Dec 17 00:13:40 gatekeeper kernel: c017e6ca
Dec 17 00:13:40 gatekeeper kernel: *pde = 00000000
Dec 17 00:13:40 gatekeeper kernel: Oops: 0000
Dec 17 00:13:40 gatekeeper kernel: CPU: 0
Dec 17 00:13:40 gatekeeper kernel: EIP: 0010:
[de_clean_rings+130/196] Not tainted
Dec 17 00:13:40 gatekeeper kernel: EFLAGS: 00010212
Dec 17 00:13:40 gatekeeper kernel: eax: 00000013
ebx: c7ef6960 ecx: c7864000 edx: 00000002
Dec 17 00:13:40 gatekeeper kernel: esi: c7ef6940
edi: 00000013 ebp: c7ef6b60 esp: c6e83ea0
Dec 17 00:13:40 gatekeeper kernel: ds: 0018 es:
0018 ss: 0018
Dec 17 00:13:40 gatekeeper kernel: Process dhcpcd
(pid: 329, stackpage=c6e83000)
Dec 17 00:13:40 gatekeeper kernel: Stack: c7ef6940
c7ef6800 00001023 00000000 c017e717 c7ef6940 c7ef6940
c017e86d
Dec 17 00:13:40 gatekeeper kernel: c7ef6940
0000000b c7ef6800 c7ef6940 c7ef6ec4 c7ef6800 00000002
c0199c33
Dec 17 00:13:40 gatekeeper kernel: c7ef6800
c7ef6800 c019a9ed c7ef6800 c6e83f4c 00000000 c6e83f6c
c7d8b8c0
Dec 17 00:13:40 gatekeeper kernel: Call Trace:
[de_free_rings+11/60] [de_close+81/108]
[dev_close+55/108] [dev_change_flags+81/260]
[devinet_ioctl+773/1620]
Dec 17 00:13:40 gatekeeper kernel:
[inet_ioctl+307/388] [sock_ioctl+33/40]
[sys_ioctl+363/388] [system_call+47/52]
Dec 17 00:13:40 gatekeeper kernel:
Dec 17 00:13:40 gatekeeper kernel: Code: 8b 42 70 83
f8 01 74 0a ff 4a 70 0f 94 c0 84 c0 74 09 52 e8

Discussion

  • Jeff Garzik
    Jeff Garzik
    2001-12-17

    • assigned_to: nobody --> jgarzik
     
  • John Zielinski
    John Zielinski
    2001-12-18

    Logged In: YES
    user_id=361391

    No, didn't fix it. It actually broke downing the
    interface. After downing it and then trying to bring it
    back up I got a SIOCSIFFLAGS: No such device. After
    removing the patch I could bring the interface up and down
    no problem.

    I did find the cause of the oops:

    --- linux/drivers/net/de2104x.c.orig Mon Dec 17 18:07:08
    2001
    +++ linux/drivers/net/de2104x.c Mon Dec 17 21:26:22 2001
    @@ -1321,11 +1321,20 @@

    for (i = 0; i < DE_TX_RING_SIZE; i++) {
    if (de->tx_skb[i].skb) {
    - struct sk_buff *skb = de->tx_skb
    [i].skb;
    - pci_unmap_single(de->pdev, de-
    >tx_skb[i].mapping,
    - skb->len,
    PCI_DMA_TODEVICE);
    - dev_kfree_skb(skb);
    - de->net_stats.tx_dropped++;
    + struct sk_buff *skb = de->tx_skb
    [i].skb;
    +
    + if (unlikely(skb == DE_DUMMY_SKB)) {
    + } else {
    + if (unlikely(skb ==
    DE_SETUP_SKB)) {
    + pci_unmap_single(de-
    >pdev, de->tx_skb[i].mapping,
    +
    sizeof(de->setup_frame), PCI_DMA_TODEVICE);
    + } else {
    + pci_unmap_single(de-
    >pdev, de->tx_skb[i].mapping,
    +
    skb->len, PCI_DMA_TODEVICE);
    + dev_kfree_skb(skb);
    + de-
    >net_stats.tx_dropped++;
    + }
    + }
    }
    }

    The problem I'm having now is that after downing the
    interface the transmit and recieve leds stay on. When
    bringing the card back up they start working again but
    dhcpcd won't work anymore. Assigning a static address
    works OK.

     
  • Jeff Garzik
    Jeff Garzik
    2001-12-18

    Logged In: YES
    user_id=17443

    The following patch to fix the oops has been checked into
    gkernel cvs modules linux_2_4 and linux_2_5, and has been
    posted at
    ftp://ftp.kernel.org/pub/linux/kernel/people/jgarzik/patches/2.5.1/de2104x-fix1-2.5.1.patch.gz

    Please update the other bug report or open a new bug report
    with the other dhcpcd problems, to assist in better bug
    tracking.

    Thanks.

     
  • Jeff Garzik
    Jeff Garzik
    2001-12-18

    • priority: 5 --> 8
    • status: open --> closed-fixed
     
  • John Zielinski
    John Zielinski
    2001-12-19

    Logged In: YES
    user_id=361391

    Took a look at your patch, skb->len isn't valid for a
    DE_SETUP_SKB. Further up in the file you used sizeof(de-
    >setup_frame) for the length.

    --- linux-test2/drivers/net/de2104x.c Tue Dec 18 23:46:55
    2001
    +++ linux/drivers/net/de2104x.c Wed Dec 19 00:21:06 2001
    @@ -1311,11 +1311,14 @@
    for (i = 0; i < DE_TX_RING_SIZE; i++) {
    struct sk_buff *skb = de->tx_skb[i].skb;
    if ((skb) && (skb != DE_DUMMY_SKB)) {
    - pci_unmap_single(de->pdev, de-
    >tx_skb[i].mapping,
    - skb->len,
    PCI_DMA_TODEVICE);
    if (skb != DE_SETUP_SKB) {
    + pci_unmap_single(de->pdev,
    de->tx_skb[i].mapping,
    + skb->len,
    PCI_DMA_TODEVICE);
    dev_kfree_skb(skb);
    de->net_stats.tx_dropped++;
    + } else {
    + pci_unmap_single(de->pdev,
    de->tx_skb[i].mapping,
    + sizeof(de-
    >setup_frame), PCI_DMA_TODEVICE);
    }
    }
    }