diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/pktgen.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index eef1392b7f8e..fda403419ff2 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -3216,11 +3216,24 @@ static int __init pg_init(void) | |||
3216 | register_netdevice_notifier(&pktgen_notifier_block); | 3216 | register_netdevice_notifier(&pktgen_notifier_block); |
3217 | 3217 | ||
3218 | for_each_online_cpu(cpu) { | 3218 | for_each_online_cpu(cpu) { |
3219 | int err; | ||
3219 | char buf[30]; | 3220 | char buf[30]; |
3220 | 3221 | ||
3221 | sprintf(buf, "kpktgend_%i", cpu); | 3222 | sprintf(buf, "kpktgend_%i", cpu); |
3222 | pktgen_create_thread(buf, cpu); | 3223 | err = pktgen_create_thread(buf, cpu); |
3224 | if (err) | ||
3225 | printk("pktgen: WARNING: Cannot create thread for cpu %d (%d)\n", | ||
3226 | cpu, err); | ||
3223 | } | 3227 | } |
3228 | |||
3229 | if (list_empty(&pktgen_threads)) { | ||
3230 | printk("pktgen: ERROR: Initialization failed for all threads\n"); | ||
3231 | unregister_netdevice_notifier(&pktgen_notifier_block); | ||
3232 | remove_proc_entry(PGCTRL, pg_proc_dir); | ||
3233 | proc_net_remove(PG_PROC_DIR); | ||
3234 | return -ENODEV; | ||
3235 | } | ||
3236 | |||
3224 | return 0; | 3237 | return 0; |
3225 | } | 3238 | } |
3226 | 3239 | ||