Re: kernel 2.6.26.3 qla2xxx oopsing on Fire 280R

David Miller
2008-09-08T21:23:51Z

From: Andrew Vasquez <andrew.vasquez@qlogic.com>
Date: Mon, 8 Sep 2008 14:13:31 -0700

> That's odd, as fc_flush_work() is quite minimal:
>
> static void
> fc_flush_work(struct Scsi_Host *shost)
> {
> if (!fc_host_work_q(shost)) {
> printk(KERN_ERR
> "ERROR: FC host '%s' attempted to flush work, "
> "when no workqueue created.\n", shost->hostt->name);
> dump_stack();
> return;
> }
>
> flush_workqueue(fc_host_work_q(shost));
> }
>
> there's not much chance here for a NULL-dereference.

There are several.

In this particular case, looking at the instruction dump, it appears
to be shost->shost_data is NULL in this case, via the expansion of
fc_host_work_q which is defined as:

#define fc_host_work_q(x) \
(((struct fc_host_attrs *)(x)->shost_data)->work_q)