Skip to content

Commit

Permalink
xen-netback: fix debugfs entry creation
Browse files Browse the repository at this point in the history
The original code is bogus. The function gets called in a loop which
leaks entries created in previous rounds.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Zoltan Kiss <zoltan.kiss@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Liu authored and David S. Miller committed Aug 14, 2014
1 parent 5c80700 commit 628fa76
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/xen-netback/xenbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,9 @@ static const struct file_operations xenvif_dbg_io_ring_ops_fops = {
.write = xenvif_write_io_ring,
};

static void xenvif_debugfs_addif(struct xenvif_queue *queue)
static void xenvif_debugfs_addif(struct xenvif *vif)
{
struct dentry *pfile;
struct xenvif *vif = queue->vif;
int i;

if (IS_ERR_OR_NULL(xen_netback_dbg_root))
Expand Down Expand Up @@ -736,10 +735,11 @@ static void connect(struct backend_info *be)
be->vif->num_queues = queue_index;
goto err;
}
}

#ifdef CONFIG_DEBUG_FS
xenvif_debugfs_addif(queue);
xenvif_debugfs_addif(be->vif);
#endif /* CONFIG_DEBUG_FS */
}

/* Initialisation completed, tell core driver the number of
* active queues.
Expand Down

0 comments on commit 628fa76

Please sign in to comment.