On Wed, 2010-02-17 at 14:05 -0800, Joe Eykholt wrote:
> Remove an extra call to fc_frame_header_get() in fc_lport_recv_els_req().
>
> Signed-off-by: Joe Eykholt <[email protected]>
> ---
> drivers/scsi/libfc/fc_lport.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
> index a2a49a2..7638812 100644
> --- a/drivers/scsi/libfc/fc_lport.c
> +++ b/drivers/scsi/libfc/fc_lport.c
> @@ -865,7 +865,7 @@ out:
> static void fc_lport_recv_els_req(struct fc_lport *lport, struct fc_seq *sp,
> struct fc_frame *fp)
> {
> - struct fc_frame_header *fh = fc_frame_header_get(fp);
> + struct fc_frame_header *fh;
> void (*recv) (struct fc_seq *, struct fc_frame *, struct fc_lport *);
>
> mutex_lock(&lport->lp_mutex);
>
I believe this patch is causing the following compilation warning:
drivers/scsi/libfc/fc_lport.c: In function ‘fc_lport_recv_req’:
drivers/scsi/libfc/fc_lport.c:879: warning: ‘fh’ may be used
uninitialized in this function
and panic:
Feb 23 15:44:00 10.23.21.83 [ 85.909938] BUG: unable to handle kernel
NULL pointer dereference at 0000000000000008
Feb 23 15:44:00 10.23.21.83 [ 85.909941] IP: [<ffffffffa0018788>]
fc_lport_recv_req+0x38/0x14f [libfc]
Feb 23 15:44:00 10.23.21.83 [ 85.909951] PGD 33c048067 PUD 33c049067
PMD 0
Feb 23 15:44:00 10.23.21.83 [ 85.909955] Oops: 0000 [#1] SMP
Feb 23 15:44:00 10.23.21.83 [ 85.909957] last sysfs
file: /sys/module/fcoe/parameters/enable
Feb 23 15:44:00 10.23.21.83 [ 85.909960] CPU 0
Feb 23 15:44:00 10.23.21.83 [ 85.909964] Pid: 8437, comm: fcoethread/0
Not tainted 2.6.33-rc8 #2 X8DT3/X8DT3
Feb 23 15:44:00 10.23.21.83 [ 85.909967] RIP:
0010:[<ffffffffa0018788>] [<ffffffffa0018788>] fc_lport_recv_req
+0x38/0x14f [libfc]
Feb 23 15:44:00 10.23.21.83 [ 85.909975] RSP: 0018:ffff88013b821d60
EFLAGS: 00010202
Feb 23 15:44:00 10.23.21.83 [ 85.909977] RAX: 0000000000000000 RBX:
ffff88012b49a5d0 RCX: 0000000000000000
Feb 23 15:44:00 10.23.21.83 [ 85.909980] RDX: ffff88012b49a9d8 RSI:
ffff88013b821c80 RDI: ffff88013b821cf0
Feb 23 15:44:00 10.23.21.83 [ 85.909982] RBP: ffff88013b821d90 R08:
ffff88012b49a9d8 R09: 0000000000000000
Feb 23 15:44:00 10.23.21.83 [ 85.909985] R10: ffffffffa0015288 R11:
ffff8801391a04c0 R12: ffff88012ba43700
Feb 23 15:44:00 10.23.21.83 [ 85.909987] R13: ffff88013e12ecb0 R14:
ffff88012b49a9a0 R15: ffff88013e12ecb0
Feb 23 15:44:00 10.23.21.83 [ 85.909990] FS: 0000000000000000(0000)
GS:ffff880028200000(0000) knlGS:0000000000000000
Feb 23 15:44:00 10.23.21.83 [ 85.909993] CS: 0010 DS: 0000 ES: 0000
CR0: 000000008005003b
Feb 23 15:44:00 10.23.21.83 [ 85.909995] CR2: 0000000000000008 CR3:
000000033b89d000 CR4: 00000000000006f0
Feb 23 15:44:00 10.23.21.83 [ 85.909998] DR0: 0000000000000000 DR1:
0000000000000000 DR2: 0000000000000000
Feb 23 15:44:00 10.23.21.83 [ 85.910000] DR3: 0000000000000000 DR6:
00000000ffff0ff0 DR7: 0000000000000400
Feb 23 15:44:00 10.23.21.83 [ 85.910003] Process fcoethread/0 (pid:
8437, threadinfo ffff88013b820000, task ffff8801391ae4e0)
Feb 23 15:44:00 10.23.21.83 [ 85.910005] Stack:
Feb 23 15:44:00 10.23.21.83 [ 85.910006] ffff88013b821d90
ffff88012b49a5d0 ffff88012ba43700 ffff88013e12eb80
Feb 23 15:44:00 10.23.21.83 [ 85.910010] <0> ffff88012ba43730
ffff88013e12ecb0 ffff88013b821df0 ffffffffa0017454
Feb 23 15:44:00 10.23.21.83 [ 85.910014] <0> ffff88012ba7b05c
ffff88013b821e20 ffff880100290000 ffff88013e12eb80
Feb 23 15:44:00 10.23.21.83 [ 85.910018] Call Trace:
Feb 23 15:44:00 10.23.21.83 [ 85.910024] [<ffffffffa0017454>]
fc_exch_recv+0xc01/0xc82 [libfc]
Feb 23 15:44:00 10.23.21.83 [ 85.910030] [<ffffffffa003a647>]
fcoe_recv_frame+0x257/0x266 [fcoe]
Feb 23 15:44:00 10.23.21.83 [ 85.910037] [<ffffffff81043256>] ?
local_bh_enable_ip+0x9/0xb
Feb 23 15:44:00 10.23.21.83 [ 85.910041] [<ffffffffa003bfeb>]
fcoe_percpu_receive_thread+0x7e/0xdb [fcoe]
Feb 23 15:44:00 10.23.21.83 [ 85.910046] [<ffffffffa003bf6d>] ?
fcoe_percpu_receive_thread+0x0/0xdb [fcoe]
Feb 23 15:44:00 10.23.21.83 [ 85.910050] [<ffffffff810571ab>] kthread
+0x7a/0x82
Feb 23 15:44:00 10.23.21.83 [ 85.910055] [<ffffffff810037d4>]
kernel_thread_helper+0x4/0x10
Feb 23 15:44:00 10.23.21.83 [ 85.910061] [<ffffffff814653fc>] ?
restore_args+0x0/0x30
Feb 23 15:44:00 10.23.21.83 [ 85.910064] [<ffffffff81057131>] ?
kthread+0x0/0x82
Feb 23 15:44:00 10.23.21.83 [ 85.910067] [<ffffffff810037d0>] ?
kernel_thread_helper+0x0/0x10
because of the 'else if' in this check:
if (!lport->link_up)
fc_frame_free(fp);
else if (fh->fh_type == FC_TYPE_ELS &&
fh->fh_r_ctl == FC_RCTL_ELS_REQ) {
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel