[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] netback accel: Avoid BUG_ON when vifs have conflicting MAC addresses
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1206467699 0 # Node ID 14b9877742337506d1885d21763c31fe465b5512 # Parent de57c3f218fb5c23bb767d2192e9beb1b4d09681 netback accel: Avoid BUG_ON when vifs have conflicting MAC addresses Signed-off-by: Kieran Mansley <kmansley@xxxxxxxxxxxxxx> --- drivers/xen/sfc_netback/accel_fwd.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff -r de57c3f218fb -r 14b987774233 drivers/xen/sfc_netback/accel_fwd.c --- a/drivers/xen/sfc_netback/accel_fwd.c Thu Mar 20 11:35:25 2008 +0000 +++ b/drivers/xen/sfc_netback/accel_fwd.c Tue Mar 25 17:54:59 2008 +0000 @@ -196,8 +196,13 @@ int netback_accel_fwd_add(const __u8 *ma index = rc; /* Shouldn't already be in the table */ - BUG_ON(cuckoo_hash_lookup(&fwd_set->fwd_hash_table, - (cuckoo_hash_key *)(&key), &rc) != 0); + if (cuckoo_hash_lookup(&fwd_set->fwd_hash_table, + (cuckoo_hash_key *)(&key), &rc) != 0) { + spin_unlock_irqrestore(&fwd_set->fwd_lock, flags); + EPRINTK("MAC address " MAC_FMT " already accelerated.\n", + MAC_ARG(mac)); + return -EEXIST; + } if ((rc = cuckoo_hash_add(&fwd_set->fwd_hash_table, (cuckoo_hash_key *)(&key), index, 1)) == 0) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |