Skip to content

Commit

Permalink
Phonet: fix /proc/net/phonet with network namespaces
Browse files Browse the repository at this point in the history
seq_open_net() and seq_release() are needed for seq_file_net().

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rémi Denis-Courmont authored and David S. Miller committed Aug 13, 2009
1 parent 859b1e4 commit cb7d9e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/phonet/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,13 +498,14 @@ static const struct seq_operations pn_sock_seq_ops = {

static int pn_sock_open(struct inode *inode, struct file *file)
{
return seq_open(file, &pn_sock_seq_ops);
return seq_open_net(inode, file, &pn_sock_seq_ops,
sizeof(struct seq_net_private));
}

const struct file_operations pn_sock_seq_fops = {
.owner = THIS_MODULE,
.open = pn_sock_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
.release = seq_release_net,
};

0 comments on commit cb7d9e7

Please sign in to comment.