• Chris Leech's avatar
    libfc: sanity check cpu number extracted from xid · fa068832
    Chris Leech authored
    In the receive path libfc extracts a cpu number from the ox_id in the
    fiber channel header and uses that to do a per_cpu_ptr conversion.  If,
    for some reason, a frame is received with an invalid ox_id, per_cpu_ptr
    will return an invalid pointer and the libfc receive path will panic the
    system trying to use it.
    
    I'm currently looking at such a case, and I don't yet know why a cpu
    number > nr_cpu_ids is appearing in an exchange id.  But adding a sanity
    check in libfc prevents a system panic, and seems like good idea when
    dealing with frames coming in from the network.
    Signed-off-by: default avatarChris Leech <cleech@redhat.com>
    Acked-by: default avatarJohannes Thumshirn <jth@kernel.org>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    fa068832
Name
Last commit
Last update
..
Makefile Loading commit data...
fc_disc.c Loading commit data...
fc_elsct.c Loading commit data...
fc_exch.c Loading commit data...
fc_fcp.c Loading commit data...
fc_frame.c Loading commit data...
fc_libfc.c Loading commit data...
fc_libfc.h Loading commit data...
fc_lport.c Loading commit data...
fc_npiv.c Loading commit data...
fc_rport.c Loading commit data...