Hi, hverkuil wrote: > > This patch fixes these dangling pointers in the available queue by removing > > all matching pending events on unsubscription. > > The idea is fine, but the implementation is inefficient. > > Instead of the list_for_each_entry_safe you can just do: > > for (i = 0; i < sev->in_use; i++) { > list_del(&sev->events[sev_pos(sev, i)].list); > fh->navailable--; > } > > It's untested, but this should do the trick. Agreed, I've modified my patch to use this construction instead. Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html