]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00291843 V4L2_PXP: fix a dangling pointer accessing issue
authorFancy Fang <B47543@freescale.com>
Thu, 12 Dec 2013 05:52:26 +0000 (13:52 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:49 +0000 (10:06 +0200)
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 <B47543@freescale.com>
drivers/media/platform/mxc/output/mxc_pxp_v4l2.c

index 98bbe83bcf63c46fbe2e8acc347eb169e3313c3b..8fe072ecbf1ca0890edc40c3386ea4a6252445dc 100644 (file)
@@ -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;