Re: [PATCH] libata: fix use-after-free during driver unload/unplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Garzik wrote:

qstor's ->host_stop() disables global interrupts, and I didn't know if you really wanted to do that prior to ->port_stop().

I would much prefer to eliminate the ->host_stop_prewalk() hook, and simply call ->host_stop after all ->port_stop() calls complete, if qstor doesn't need the pre-walk.

Ahh.. of course.  I must have misread your original.

Yes, sata_qstor generally assumes that host_stop should completely
stop the host from operating.. and thereby expects any port_stop()
calls to happen before host_stop().  So, yup, the changes you have
seem to be useful here.

If we didn't want to have a prewalk() method, then we could hack
sata_qstor to keep a count of active ("non stopped") ports,
and automatically do the global (chip) interrupt disable from
port_stop() whenever the count hits zero.

Cheers
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux