diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 485af5691d64270a02322925a6ccfad9d02b7f78..43e49f46ad430cff6ce35dad1785624ee2c6c79b 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1878,7 +1878,7 @@ static void *packet_seq_start(struct seq_file *seq, loff_t *pos) static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos) { - struct net *net = seq->private; + struct net *net = seq_file_net(seq); ++*pos; return (v == SEQ_START_TOKEN) ? sk_head(&net->packet.sklist) @@ -1887,7 +1887,7 @@ static void *packet_seq_next(struct seq_file *seq, void *v, loff_t *pos) static void packet_seq_stop(struct seq_file *seq, void *v) { - struct net *net = seq->private; + struct net *net = seq_file_net(seq); read_unlock(&net->packet.sklist_lock); }