Re: [PATCH] [media] s5p-jpeg: Fix crash in jpeg isr due to multiple interrupts.
On 17/12/14 07:25, Tony K Nadackal wrote: > In case of corrupt images, multiple interrupts may occur > due to different error scenarios. > > Since we are removing the src and dest buffers in the first > interrupt itself, crash occurs in the second error interrupts. > > Disable the global interrupt before we start processing > the interrupt avoid the crash. > > Disable System interrupt in isr to avoid the crash below. Rather than disabling all interrupts, is there no way to check the interrupt reason from some status register and decide whether we return the buffers or just ignore the interrupt ? -- Thanks, Sylwester -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH] [media] s5p-jpeg: Fix crash in jpeg isr due to multiple interrupts.
Gentle Reminder. Thanks Tony > -Original Message- > From: Tony K Nadackal [mailto:tony...@samsung.com] > Sent: Wednesday, December 17, 2014 11:55 AM > To: linux-me...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; linux- > samsung-...@vger.kernel.org > Cc: mche...@osg.samsung.com; j.anaszew...@samsung.com; > kg...@kernel.org; k.deb...@samsung.com; s.nawro...@samsung.com; > bhusha...@samsung.com; Tony K Nadackal > Subject: [PATCH] [media] s5p-jpeg: Fix crash in jpeg isr due to multiple interrupts. > > In case of corrupt images, multiple interrupts may occur due to different error > scenarios. > > Since we are removing the src and dest buffers in the first interrupt itself, crash > occurs in the second error interrupts. > > Disable the global interrupt before we start processing the interrupt avoid the > crash. > > Disable System interrupt in isr to avoid the crash below. > > Unable to handle kernel NULL pointer dereference at virtual address 00c8 > pgd = ffc0007db000 [00c8] *pgd=fb006003, > *pud=fb006003, *pmd=fb007003, *pte=006011001707 > Internal error: Oops: 9607 [#1] PREEMPT SMP Modules linked in: > CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.18.0-next-20141210+ #22 Hardware > name: Samsung Exynos7 Espresso board based on EXYNOS7 (DT) > task: ffc00075e5c0 ti: ffc00074c000 task.ti: ffc00074c000 PC is at > exynos4_jpeg_irq+0x30/0x15c LR is at exynos4_jpeg_irq+0x2c/0x15c pc : > [] lr : [] pstate: 81c5 sp : > ffc00074fc60 > x29: ffc00074fc60 x28: 00404000 > x27: ffc000673928 x26: ffc000673940 > x25: ffc0007a030c x24: ffc0bb20a400 > x23: 0030 x22: ffc0ba56ba40 > x21: x20: > x19: ffc0ba56ba18 x18: > x17: x16: ffc00018b508 > x15: x14: > x13: 00989680 x12: 00989680 > x11: 0004 x10: 0101010101010101 > x9 : 0020a285a9ea x8 : ffc0007af880 > x7 : ffc0bac001a8 x6 : ffc0bac0 > x5 : fffa x4 : ffc00040870c > x3 : 0003 x2 : 00010003 > x1 : 00010002 x0 : > > Process swapper/0 (pid: 0, stack limit = 0xffc00074c058) > Stack: (0xffc00074fc60 to 0xffc00075) > fc60: 0074fca0 ffc0 000e4508 ffc0 bb225300 ffc0 bb20a494 ffc0 > fc80: 0030 000f8c6c ffc0 > fca0: 0074fd00 ffc0 000e4644 ffc0 bb20a400 ffc0 bb20a494 ffc0 > fcc0: 00776a00 ffc0 00670da8 ffc0 0001 > fce0: bb008000 ffc0 407db000 00081230 ffc0 000e4638 ffc0 > fd00: 0074fd40 ffc0 000e7338 ffc0 bb20a400 ffc0 bb20a494 ffc0 > fd20: 00776a00 ffc0 000e7280 ffc0 bb225300 ffc0 000e72e0 ffc0 > fd40: 0074fd70 ffc0 000e3d60 ffc0 0030 00743000 ffc0 > fd60: 0066e000 ffc0 006c2000 ffc0 0074fd90 ffc0 000e3e90 ffc0 > fd80: 007437c8 ffc0 000e3e6c ffc0 0074fdf0 ffc0 00082404 ffc0 > fda0: 0074fe20 ffc0 0075a000 ffc0 200c ff80 2010 ff80 > fdc0: 6145 00672cc8 ffc0 407d9000 befb9b40 ffc0 > fde0: 0074fe20 ffc0 01d2 0074ff40 ffc0 00085da8 ffc0 > fe00: 00758584 ffc0 0052c000 ffc0 0074ff40 ffc0 00087114 ffc0 > fe20: 0074ff50 ffc0 0067d760 ffc0 befb9adc ffc0 > fe40: 0001 d4414200 0020 d6a39c00 0020 007a6a18 ffc0 > fe60: 0075eb00 ffc0 0074fd60 ffc0 c185 0020 > fe80: 0052d340 ffc0 0030 fffe 0fff > fea0: 0018b508 ffc0 00758584 ffc0 > fec0: 0052c000 ffc0 006c24e8 ffc0 007a030a ffc0 0001 > fee0: 00672cc8 ffc0 407d9000 407db000 00081230 ffc0 > ff00: 4000 0040 0074ff40 ffc0 00087110 ffc0 0074ff40 ffc0 > ff20: 00087114 ffc0 6145 00758584 ffc0 0052c000 ffc0 > ff40: 0074ff50 ffc0 000db568 ffc0 0074ff90 ffc0 00515fdc ffc0 > ff60: 00758000 ffc0 007a3000 ffc0 007a3000 ffc0 befc8940 ffc0 > ff80: 4076 4000 0074ffb0 ffc0 006ff998 ffc0 > ffa0: 0002 006ff988 ffc0 400826c0 > ffc0: 8f03a688 0e11 4800 410fd030 > > ffe0: 0072c250 ffc0 > Call trace: > [] exynos4_jpeg_irq+0x30/0x15c [] > handle_irq_event_percpu+0x6c/0x160 >
[PATCH] [media] s5p-jpeg: Fix crash in jpeg isr due to multiple interrupts.
In case of corrupt images, multiple interrupts may occur due to different error scenarios. Since we are removing the src and dest buffers in the first interrupt itself, crash occurs in the second error interrupts. Disable the global interrupt before we start processing the interrupt avoid the crash. Disable System interrupt in isr to avoid the crash below. Unable to handle kernel NULL pointer dereference at virtual address 00c8 pgd = ffc0007db000 [00c8] *pgd=fb006003, *pud=fb006003, *pmd=fb007003, *pte=006011001707 Internal error: Oops: 9607 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.18.0-next-20141210+ #22 Hardware name: Samsung Exynos7 Espresso board based on EXYNOS7 (DT) task: ffc00075e5c0 ti: ffc00074c000 task.ti: ffc00074c000 PC is at exynos4_jpeg_irq+0x30/0x15c LR is at exynos4_jpeg_irq+0x2c/0x15c pc : [] lr : [] pstate: 81c5 sp : ffc00074fc60 x29: ffc00074fc60 x28: 00404000 x27: ffc000673928 x26: ffc000673940 x25: ffc0007a030c x24: ffc0bb20a400 x23: 0030 x22: ffc0ba56ba40 x21: x20: x19: ffc0ba56ba18 x18: x17: x16: ffc00018b508 x15: x14: x13: 00989680 x12: 00989680 x11: 0004 x10: 0101010101010101 x9 : 0020a285a9ea x8 : ffc0007af880 x7 : ffc0bac001a8 x6 : ffc0bac0 x5 : fffa x4 : ffc00040870c x3 : 0003 x2 : 00010003 x1 : 00010002 x0 : Process swapper/0 (pid: 0, stack limit = 0xffc00074c058) Stack: (0xffc00074fc60 to 0xffc00075) fc60: 0074fca0 ffc0 000e4508 ffc0 bb225300 ffc0 bb20a494 ffc0 fc80: 0030 000f8c6c ffc0 fca0: 0074fd00 ffc0 000e4644 ffc0 bb20a400 ffc0 bb20a494 ffc0 fcc0: 00776a00 ffc0 00670da8 ffc0 0001 fce0: bb008000 ffc0 407db000 00081230 ffc0 000e4638 ffc0 fd00: 0074fd40 ffc0 000e7338 ffc0 bb20a400 ffc0 bb20a494 ffc0 fd20: 00776a00 ffc0 000e7280 ffc0 bb225300 ffc0 000e72e0 ffc0 fd40: 0074fd70 ffc0 000e3d60 ffc0 0030 00743000 ffc0 fd60: 0066e000 ffc0 006c2000 ffc0 0074fd90 ffc0 000e3e90 ffc0 fd80: 007437c8 ffc0 000e3e6c ffc0 0074fdf0 ffc0 00082404 ffc0 fda0: 0074fe20 ffc0 0075a000 ffc0 200c ff80 2010 ff80 fdc0: 6145 00672cc8 ffc0 407d9000 befb9b40 ffc0 fde0: 0074fe20 ffc0 01d2 0074ff40 ffc0 00085da8 ffc0 fe00: 00758584 ffc0 0052c000 ffc0 0074ff40 ffc0 00087114 ffc0 fe20: 0074ff50 ffc0 0067d760 ffc0 befb9adc ffc0 fe40: 0001 d4414200 0020 d6a39c00 0020 007a6a18 ffc0 fe60: 0075eb00 ffc0 0074fd60 ffc0 c185 0020 fe80: 0052d340 ffc0 0030 fffe 0fff fea0: 0018b508 ffc0 00758584 ffc0 fec0: 0052c000 ffc0 006c24e8 ffc0 007a030a ffc0 0001 fee0: 00672cc8 ffc0 407d9000 407db000 00081230 ffc0 ff00: 4000 0040 0074ff40 ffc0 00087110 ffc0 0074ff40 ffc0 ff20: 00087114 ffc0 6145 00758584 ffc0 0052c000 ffc0 ff40: 0074ff50 ffc0 000db568 ffc0 0074ff90 ffc0 00515fdc ffc0 ff60: 00758000 ffc0 007a3000 ffc0 007a3000 ffc0 befc8940 ffc0 ff80: 4076 4000 0074ffb0 ffc0 006ff998 ffc0 ffa0: 0002 006ff988 ffc0 400826c0 ffc0: 8f03a688 0e11 4800 410fd030 ffe0: 0072c250 ffc0 Call trace: [] exynos4_jpeg_irq+0x30/0x15c [] handle_irq_event_percpu+0x6c/0x160 [] handle_irq_event+0x48/0x78 [] handle_fasteoi_irq+0xe0/0x198 [] generic_handle_irq+0x24/0x40 [] __handle_domain_irq+0x80/0xf0 [] gic_handle_irq+0x30/0x80 Exception stack(0xffc00074fe00 to 0xffc00074ff20) fe00: 00758584 ffc0 0052c000 ffc0 0074ff40 ffc0 00087114 ffc0 fe20: 0074ff50 ffc0 0067d760 ffc0 befb9adc ffc0 fe40: 0001 d4414200 0020 d6a39c00 0020 007a6a18 ffc0 fe60: 0075eb00 ffc0 0074fd60 ffc0 c185 0020 fe80: 0052d340 ffc0 0030 fffe 0fff fea0: 0018b508 ffc0 00758584 ffc0 fec0: 0052c000 ffc0 006c24e8 ffc0 007a030a ffc0 0001 fee0: 00672cc8 ffc0 407d9000 407db000 00081230 ffc0 ff00: 4000 0040 0074ff40 ffc0 00087110 ffc0 0074ff40 ffc0