On Fri, Mar 11, 2016 at 04:28:53PM +0100, Sebastian Andrzej Siewior wrote: > for_each_possible_cpu() with a cpu_online() + `thread' check possibly does > the job. But there is a tiny race: Say CPU5 is reported online but is > going down. And after fcoe_percpu_clean() saw that CPU5 is online it > decided to enqueue a packet. After dev_alloc_skb() returned a skb > that CPU is offline (or say the notifier destroyed the kthread). So we > would OOps because `thread' is NULL. > An alternative would be to lock the CPUs during our loop (so no CPU is > going away) and then we iterate over the online mask. I've looked over this and the following patches, and I suspect the right thing to do for fcoe and bnx2 is to convert them to use the generic workqueue code instead of reinventing it poorly. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html