]> git.baikalelectronics.ru Git - kernel.git/commit
pktgen: fix module unload for good
authorEric Dumazet <edumazet@google.com>
Thu, 17 May 2012 23:52:26 +0000 (23:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 May 2012 17:54:33 +0000 (13:54 -0400)
commit959b325de90d8d179a40b35293d84c415ecf20d6
tree8d50b39901dbcd06d181ad505f7aff76ca9388d7
parent47ef5afc772c1ce6e9cd221a95677075adc0f0d7
pktgen: fix module unload for good

commit e96dae9ade7 (pktgen: fix crash at module unload) did a very poor
job with list primitives.

1) list_splice() arguments were in the wrong order

2) list_splice(list, head) has undefined behavior if head is not
initialized.

3) We should use the list_splice_init() variant to clear pktgen_threads
list.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/pktgen.c