linux-stable/drivers/net/ipa
Alex Elder 15b4f993d1 net: ipa: avoid a null pointer dereference
Dan Carpenter reported that Smatch found an instance where a pointer
which had previously been assumed could be null (as indicated by a
null check) was later dereferenced without a similar check.

In practice this doesn't lead to a problem because currently the
pointers used are all non-null.  Nevertheless this patch addresses
the reported problem.

In addition, I spotted another bug that arose in the same commit.
When the command to initialize a routing table memory region was
added, the number of entries computed for the non-hashed table
was wrong (it ended up being a Boolean rather than the count
intended).  This bug is fixed here as well.

Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/kernel-janitors/Y3OOP9dXK6oEydkf@kili
Tested-by: Caleb Connolly <caleb.connolly@linaro.com>
Fixes: 5cb76899fb ("net: ipa: reduce arguments to ipa_table_init_add()")
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-11-18 11:46:18 +00:00
..
data Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-10-27 16:56:36 -07:00
reg net: ipa: add a parameter to suspend registers 2022-11-04 10:16:53 +00:00
gsi.c net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
gsi.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
gsi_private.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
gsi_reg.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
gsi_trans.c net: ipa: Proactively round up to kmalloc bucket size 2022-10-20 10:13:54 +02:00
gsi_trans.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa.h net: ipa: use a bitmap for enabled endpoints 2022-11-04 10:16:53 +00:00
ipa_cmd.c net: ipa: determine filter table size from memory region 2022-10-27 13:38:13 +02:00
ipa_cmd.h net: ipa: introduce ipa_cmd_init() 2022-10-25 11:15:19 +02:00
ipa_data.h net: ipa: don't assume 8 modem routing table entries 2022-10-27 13:38:13 +02:00
ipa_endpoint.c net: ipa: use a bitmap for enabled endpoints 2022-11-04 10:16:53 +00:00
ipa_endpoint.h net: ipa: support more filtering endpoints 2022-11-04 10:16:53 +00:00
ipa_gsi.c
ipa_gsi.h net: ipa: fix kerneldoc comments 2020-07-13 17:11:53 -07:00
ipa_interrupt.c net: ipa: use a bitmap for available endpoints 2022-11-04 10:16:53 +00:00
ipa_interrupt.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_main.c net: ipa: permit GSI firmware loading to be skipped 2022-11-17 21:46:55 -08:00
ipa_mem.c net: ipa: change an IPA v5.0 memory requirement 2022-10-28 22:06:46 -07:00
ipa_mem.h net: ipa: don't index mem data array by ID 2021-06-10 14:50:08 -07:00
ipa_modem.c net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_modem.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_power.c net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_power.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_qmi.c net: ipa: don't assume 8 modem routing table entries 2022-10-27 13:38:13 +02:00
ipa_qmi.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_qmi_msg.c net: ipa: Make QMI message rules const 2022-10-21 12:39:16 +01:00
ipa_qmi_msg.h net: ipa: Make QMI message rules const 2022-10-21 12:39:16 +01:00
ipa_reg.c net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_reg.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_resource.c net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_resource.h net: ipa: get rid of empty IPA functions 2021-04-09 20:57:25 -07:00
ipa_smp2p.c net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_smp2p.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_sysfs.c net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_sysfs.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_table.c net: ipa: avoid a null pointer dereference 2022-11-18 11:46:18 +00:00
ipa_table.h net: ipa: support more filtering endpoints 2022-11-04 10:16:53 +00:00
ipa_uc.c net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_uc.h net: ipa: update copyrights 2022-10-03 16:49:20 -07:00
ipa_version.h net: ipa: define IPA v5.0 2022-10-28 22:06:46 -07:00
Kconfig net: ipa: add an interconnect dependency 2022-03-02 22:14:05 -08:00
Makefile net: ipa: add per-version IPA register definition files 2022-09-27 18:42:49 -07:00