• Arnd Bergmann's avatar
    dev_ioctl: pass SIOCDEVPRIVATE data separately · a554bf96
    Arnd Bergmann authored
    The compat handlers for SIOCDEVPRIVATE are incorrect for any driver that
    passes data as part of struct ifreq rather than as an ifr_data pointer, or
    that passes data back this way, since the compat_ifr_data_ioctl() helper
    overwrites the ifr_data pointer and does not copy anything back out.
    
    Since all drivers using devprivate commands are now converted to the
    new .ndo_siocdevprivate callback, fix this by adding the missing piece
    and passing the pointer separately the whole way.
    
    This further unifies the native and compat logic for socket ioctls,
    as the new code now passes the correct pointer as well as the correct
    data for both native and compat ioctls.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a554bf96
socket.c 86.6 KB