diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-11-24 17:50:41 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-14 10:03:48 +0100 |
commit | cbd86110546f7f730a1f5d7de56c944a336c15c4 (patch) | |
tree | bf64ba029d724a85976a1d65dd2c3e407638c40b /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | 462b6beb8c66783d9bc866fb912d06514fe52c23 (diff) |
can: sja1000: fix use after free in ems_pcmcia_add_card()
commit 3ec6ca6b1a8e64389f0212b5a1b0f6fed1909e45 upstream.
If the last channel is not available then "dev" is freed. Fortunately,
we can just use "pdev->irq" instead.
Also we should check if at least one channel was set up.
Fixes: fd734c6f25ae ("can/sja1000: add driver for EMS PCMCIA card")
Link: https://lore.kernel.org/all/20211124145041.GB13656@kili
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions