Hi,
This set adds and enforces 1 second minimum value for bridge multicast
query and startup query intervals in order to avoid rearming the timers
too often which could lock and crash the host. I doubt anyone is using
such low values or anything lower than 1 second, so it seems like a good
minimum. In order to be compatible if the value is lower then it is
overwritten and a log message is emitted, since we can't return an error
at this point.
Eric, I looked for the syzbot reports in its dashboard but couldn't find
them so I've added you as the reporter. If you point me to the reports
I can respin to give syzbot the credit.
I've prepared a global bridge igmp rate limiting patch but wasn't
sure if it's ok for -net. It adds a static limit of 32k packets per
second, I plan to send it for net-next with added drop counters for
each bridge so it can be easily debugged.
Original report can be seen at:
https://lore.kernel.org/netdev/e8b9ce41-57b9-b6e2-a46a-ff9c791cf0ba@gmail.c…
Thanks,
Nik
Nikolay Aleksandrov (2):
net: bridge: mcast: add and enforce query interval minimum
net: bridge: mcast: add and enforce startup query interval minimum
net/bridge/br_multicast.c | 32 ++++++++++++++++++++++++++++++++
net/bridge/br_netlink.c | 4 ++--
net/bridge/br_private.h | 6 ++++++
net/bridge/br_sysfs_br.c | 4 ++--
net/bridge/br_vlan_options.c | 4 ++--
5 files changed, 44 insertions(+), 6 deletions(-)
--
2.33.1
From: Mike Marciniszyn <mike.marciniszyn(a)cornelisnetworks.com>
Despite the patch noted below, the warning still happens with
certain kernel configs.
It appears that either check_preemption_disabled() is inconsistent with
with debug_rcu_read_lock() or the patch incorrectly assumes that an RCU
critical section will prevent the current cpu from changing.
A clarification has been solicited via:
https://lore.kernel.org/linux-rdma/CH0PR01MB71536FB1BD5ECF16E65CB3BFF26F9@C…
This patch will silence the warning for now by using get_cpu()/put_cpu().
Fixes: b6d57e24ce6c ("IB/hfi1: Insure use of smp_processor_id() is preempt disabled")
Cc: stable(a)vger.kernel.org
Reviewed-by: Dennis Dalessandro <dennis.dalessandro(a)cornelisnetworks.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn(a)cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro(a)cornelisnetworks.com>
---
drivers/infiniband/hw/hfi1/sdma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c
index f07d328..809096d 100644
--- a/drivers/infiniband/hw/hfi1/sdma.c
+++ b/drivers/infiniband/hw/hfi1/sdma.c
@@ -839,15 +839,15 @@ struct sdma_engine *sdma_select_user_engine(struct hfi1_devdata *dd,
goto out;
rcu_read_lock();
- cpu_id = smp_processor_id();
+ cpu_id = get_cpu();
rht_node = rhashtable_lookup(dd->sdma_rht, &cpu_id,
sdma_rht_params);
-
if (rht_node && rht_node->map[vl]) {
struct sdma_rht_map_elem *map = rht_node->map[vl];
sde = map->sde[selector & map->mask];
}
+ put_cpu();
rcu_read_unlock();
if (sde)