diff options
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index f9a034361a8e..1a9976487099 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -1427,8 +1427,8 @@ static ssize_t bonding_show_queue_id(struct device *d, | |||
1427 | 1427 | ||
1428 | read_lock(&bond->lock); | 1428 | read_lock(&bond->lock); |
1429 | bond_for_each_slave(bond, slave, i) { | 1429 | bond_for_each_slave(bond, slave, i) { |
1430 | if (res > (PAGE_SIZE - 6)) { | 1430 | if (res > (PAGE_SIZE - IFNAMSIZ - 6)) { |
1431 | /* not enough space for another interface name */ | 1431 | /* not enough space for another interface_name:queue_id pair */ |
1432 | if ((PAGE_SIZE - res) > 10) | 1432 | if ((PAGE_SIZE - res) > 10) |
1433 | res = PAGE_SIZE - 10; | 1433 | res = PAGE_SIZE - 10; |
1434 | res += sprintf(buf + res, "++more++ "); | 1434 | res += sprintf(buf + res, "++more++ "); |