From: Fancy Fang Date: Thu, 12 Dec 2013 05:52:26 +0000 (+0800) Subject: ENGR00291843 V4L2_PXP: fix a dangling pointer accessing issue X-Git-Tag: KARO-TX6-2014-07-10~107 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f9daf39dd894c3b35bd9e2aa8a57bce46d4e9180;p=karo-tx-linux.git ENGR00291843 V4L2_PXP: fix a dangling pointer accessing issue After dynamically alloc/free tx descriptors enabled, the descriptors will be freed in PXP ISR which happens before pxp_buf_free() is called. Signed-off-by: Fancy Fang --- diff --git a/drivers/media/platform/mxc/output/mxc_pxp_v4l2.c b/drivers/media/platform/mxc/output/mxc_pxp_v4l2.c index 98bbe83bcf63..8fe072ecbf1c 100644 --- a/drivers/media/platform/mxc/output/mxc_pxp_v4l2.c +++ b/drivers/media/platform/mxc/output/mxc_pxp_v4l2.c @@ -696,7 +696,6 @@ static int pxp_buf_setup(struct videobuf_queue *q, static void pxp_buf_free(struct videobuf_queue *q, struct pxp_buffer *buf) { struct videobuf_buffer *vb = &buf->vb; - struct dma_async_tx_descriptor *txd = buf->txd; BUG_ON(in_interrupt()); @@ -708,8 +707,6 @@ static void pxp_buf_free(struct videobuf_queue *q, struct pxp_buffer *buf) * longer in STATE_QUEUED or STATE_ACTIVE */ videobuf_waiton(q, vb, 0, 0); - if (txd) - async_tx_ack(txd); videobuf_dma_contig_free(q, vb); buf->txd = NULL;