• Andrew Morton's avatar
    [PATCH] workaround for smb_proc_getattr oops · 1a5cf580
    Andrew Morton authored
    From: Zwane Mwaikambo <zwane@linuxpower.ca>
    
    smbfs tends to oops over a null server->ops->getattr in smb_proc_getattr().
    
    Urban says:
    
     In 2.5 the server->ops is initialized when smbfs gets a connection, to
     match whatever the server is capable of or not. This happens after the
     mount syscall so smbfs is then mounted but not usable.
    
     Not sure if smb_lookup is always called before any other operation that
     uses server->ops. If it is then it would be enough to have a test there.
    
     Otherwise I will just change all users of server->ops to verify the
     pointer first and return -EIO or something.
    
    Al Viro says (paraphrasing)
    
     ugh, we need mount2().
    
    It doesn't look to me like we'll be getting mount2() in the 2.6 timeframe.
    Zwane's patch implement's Urban's workaround.
    1a5cf580
inode.c 19.5 KB