aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorDmitriy Ulitin <[email protected]>2021-05-27 17:06:26 +0200
committerMauro Carvalho Chehab <[email protected]>2021-09-30 10:07:44 +0200
commit548fa43a58696450c15b8f5564e99589c5144664 (patch)
treedd4492c2dca5631b86be284ada55305911441351 /tools/perf/scripts/python/flamegraph.py
parent44bc61991508461925e988a41e0b19477c1c1012 (diff)
media: stm32: Potential NULL pointer dereference in dcmi_irq_thread()
At the moment of enabling irq handling: 1922 ret = devm_request_threaded_irq(&pdev->dev, irq, dcmi_irq_callback, 1923 dcmi_irq_thread, IRQF_ONESHOT, 1924 dev_name(&pdev->dev), dcmi); there is still uninitialized field sd_format of struct stm32_dcmi *dcmi. If an interrupt occurs in the interval between the installation of the interrupt handler and the initialization of this field, NULL pointer dereference happens. This field is dereferenced in the handler function without any check: 457 if (dcmi->sd_format->fourcc == V4L2_PIX_FMT_JPEG && 458 dcmi->misr & IT_FRAME) { The patch moves interrupt handler installation after initialization of the sd_format field that happens in dcmi_graph_notify_complete() via dcmi_set_default_fmt(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Dmitriy Ulitin <[email protected]> Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions