• Arnaldo Carvalho de Melo's avatar
    o arp: fix seq_file handling bug · 15d9a078
    Arnaldo Carvalho de Melo authored
    When midnigth commander viewer is invoked it first opens the file, read
    4 bytes (probably looking for a magic number), reading only 4 bytes makes
    state->is_pneigh not to be set neither the lock is taken, because only
    the header is being produced (v = (void *)1), so when arp_seq_stop is 
    called the lock is dropped without having being taken: b00m
    
    Thanks to Serge Kuznetsov for reporting this to me. Other seq_file
    code may have this problem, but by using mc viewer in all of /proc/net
    I haven't been able to reproduce this problem with any other file.
    15d9a078
arp.c 33.3 KB