bug? in kernel/net-2 .99pl11 ARP packets

bug? in kernel/net-2 .99pl11 ARP packets

Post by Bruce Miln » Fri, 06 Aug 1993 04:40:16



I just installed the linux .99pl11 kernel with the net-2 software with
memory debugging turned on. I get messages every 30 seconds that says,

DEB_MALLOC size for 0x487594 given as 102, stored 88, from sock.c:134, last arp.c:534
DEB_MALLOC overran block 0x487594:88, free at sock.c:134, last arp.c534

This change below makes the problem go away for me. I do not know if
this is a "correct" solution because I am new to this code. I mimicked what
was being done elsewhere in the file. This just increases the size of
the malloced buffer.

*** linux/net/inet/arp.c.orig   Sat Jul  3 05:50:55 1993
--- linux/net/inet/arp.c        Wed Aug  4 01:26:55 1993
***************
*** 530,536 ****
    DPRINTF((DBG_ARP, "saddr=%s)\n", in_ntoa(saddr)));

    skb = (struct sk_buff *) kmalloc(sizeof(struct sk_buff) +
!               sizeof(struct arphdr) + (2 * dev->addr_len) +
                (2 * 4 /* arp->plen */), GFP_ATOMIC);
    if (skb == NULL) {
        printk("ARP: No memory available for REQUEST %s\n", in_ntoa(paddr));
--- 530,537 ----
    DPRINTF((DBG_ARP, "saddr=%s)\n", in_ntoa(saddr)));

    skb = (struct sk_buff *) kmalloc(sizeof(struct sk_buff) +
!               sizeof(struct arphdr) + dev->hard_header_len +
!               (2 * dev->addr_len) +
                (2 * 4 /* arp->plen */), GFP_ATOMIC);
    if (skb == NULL) {
        printk("ARP: No memory available for REQUEST %s\n", in_ntoa(paddr));

Bruce Milner
University of Utah