• Alexander Viro's avatar
    [PATCH] openpromfs property_read() fix · 622c36a6
    Alexander Viro authored
    openpromfs property_read() is slightly abused by property_write() - the
    latter calls property_read(file, NULL, 0, NULL) if we still hadn't done
    any IO on that file; property_read() will do setup work and, since it's
    called with count equal to 0, do nothing else.
    
    That stopped working - now we check if *ppos is sane before doing
    anything else and that, of course, oopses.  Trivial fix is to move the
    check past that for count == 0...
    Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    622c36a6
inode.c 25.3 KB