Skip to content

Commit

Permalink
bond_sysfs: use real_num_tx_queues rather than params.tx_queue
Browse files Browse the repository at this point in the history
Since now number of tx queues can be specified during bond instance
creation and therefore it may differ from params.tx_queues, use rather
real_num_tx_queues for boundary check.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jul 20, 2012
1 parent df4ab5b commit 8a540ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,7 @@ static ssize_t bonding_store_queue_id(struct device *d,
/* Check buffer length, valid ifname and queue id */
if (strlen(buffer) > IFNAMSIZ ||
!dev_valid_name(buffer) ||
qid > bond->params.tx_queues)
qid > bond->dev->real_num_tx_queues)
goto err_no_cmd;

/* Get the pointer to that interface if it exists */
Expand Down

0 comments on commit 8a540ff

Please sign in to comment.