Skip to content
  • Alexey Dobriyan's avatar
    Fix select on /proc files without ->poll · dd23aae4
    Alexey Dobriyan authored
    Taneli Vähäkangas <vahakang@cs.helsinki.fi> reported that commit
    786d7e16
    
     aka "Fix rmmod/read/write races
    in /proc entries" broke SBCL + SLIME combo.
    
    The old code in do_select() used DEFAULT_POLLMASK, if couldn't find
    ->poll handler.  The new code makes ->poll always there and returns 0 by
    default, which is not correct.  Return DEFAULT_POLLMASK instead.
    
    Steps to reproduce:
    
    	install emacs, SBCL, SLIME
    	emacs
    	M-x slime	in *inferior-lisp* buffer
    	[watch it doing "Connecting to Swank on port X.."]
    
    Please, apply before 2.6.23.
    
    P.S.: why SBCL can't just read(2) /proc/cpuinfo is a mystery.
    
    Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
    Cc: T Taneli Vahakangas <vahakang@cs.helsinki.fi>
    Cc: Oleg Nesterov <oleg@tv-sign.ru>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    dd23aae4