On Wed, Dec 02, 2015 at 03:56:27PM -0500, ira.weiny@xxxxxxxxx wrote: > - for (i = tx->idx; i >= 0; i--) { > - if (tx->iovecs[i].flags & TXREQ_FLAGS_IOVEC_LAST_PKT) > - unpin_vector_pages(tx->iovecs[i].vec); > + /* > + * If we have any io vectors associated with this txreq, > + * check whether they need to be 'freed'. We can't free them > + * here because the unpin function needs to be able to sleep. > + */ > + i = tx->idx; > + while (i) > + if (tx->iovecs[i--].flags & TXREQ_FLAGS_IOVEC_LAST_PKT) { > + defer = true; > + break; > } In the original code, we checked tx->iovecs[0].flags but now we skip that one. Going back to the original for loop is probably the right way to fix this. regards, dan carpenter _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel