Well, either that or you change struct nsid_cache (line 138) to

struct nsid_cache {
        struct hlist_node       nsid_hash;
        struct hlist_node       name_hash;
        int                     nsid;
        char                    name[1];
};

I think that that would do the same.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to iproute2 in Ubuntu.
https://bugs.launchpad.net/bugs/1615209

Title:
  ip crashes after a few times adding and removing network namespaces

Status in iproute2 package in Ubuntu:
  In Progress

Bug description:
  # which ip
  /sbin/ip
  # valgrind ip netns add black2
  ==22804== Memcheck, a memory error detector
  ==22804== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
  ==22804== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
  ==22804== Command: ip netns add black2
  ==22804== 
  ==22804== Invalid write of size 1
  ==22804==    at 0x4031F43: memcpy (in 
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
  ==22804==    by 0x8059C83: ??? (in /bin/ip)
  ==22804==    by 0x805AF9A: netns_map_init (in /bin/ip)
  ==22804==    by 0x805B01F: do_netns (in /bin/ip)
  ==22804==    by 0x804DF67: ??? (in /bin/ip)
  ==22804==    by 0x804DA11: main (in /bin/ip)
  ==22804==  Address 0x4227094 is 0 bytes after a block of size 28 alloc'd
  ==22804==    at 0x402D17C: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
  ==22804==    by 0x8059C5E: ??? (in /bin/ip)
  ==22804==    by 0x805AF9A: netns_map_init (in /bin/ip)
  ==22804==    by 0x805B01F: do_netns (in /bin/ip)
  ==22804==    by 0x804DF67: ??? (in /bin/ip)
  ==22804==    by 0x804DA11: main (in /bin/ip)
  ==22804== 
  Cannot create namespace file "/var/run/netns/black2": File exists
  ==22804== 
  ==22804== HEAP SUMMARY:
  ==22804==     in use at exit: 28 bytes in 1 blocks
  ==22804==   total heap usage: 2 allocs, 1 frees, 32,824 bytes allocated
  ==22804== 
  ==22804== LEAK SUMMARY:
  ==22804==    definitely lost: 0 bytes in 0 blocks
  ==22804==    indirectly lost: 0 bytes in 0 blocks
  ==22804==      possibly lost: 0 bytes in 0 blocks
  ==22804==    still reachable: 28 bytes in 1 blocks
  ==22804==         suppressed: 0 bytes in 0 blocks
  ==22804== Rerun with --leak-check=full to see details of leaked memory
  ==22804== 
  ==22804== For counts of detected and suppressed errors, rerun with: -v
  ==22804== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/iproute2/+bug/1615209/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to