FreeBSD Bugzilla – Attachment 239448 Details for
Bug 268934
[ena] Counters are alloced after they are available for reading which can cause a kernel crash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Potential Fix
fbsd_patch.diff (text/plain), 1.04 KB, created by
ghuckriede
on 2023-01-13 16:16:47 UTC
(
hide
)
Description:
Potential Fix
Filename:
MIME Type:
Creator:
ghuckriede
Created:
2023-01-13 16:16:47 UTC
Size:
1.04 KB
patch
obsolete
>diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c >index 86ac5941faad..d43e39739a5c 100644 >--- a/sys/dev/ena/ena.c >+++ b/sys/dev/ena/ena.c >@@ -3659,6 +3659,12 @@ ena_attach(device_t pdev) > /* initialize rings basic information */ > ena_init_io_rings(adapter); > >+ /* Initialize statistics */ >+ ena_alloc_counters((counter_u64_t *)&adapter->dev_stats, >+ sizeof(struct ena_stats_dev)); >+ ena_alloc_counters((counter_u64_t *)&adapter->hw_stats, >+ sizeof(struct ena_hw_stats)); >+ > /* setup network interface */ > rc = ena_setup_ifnet(pdev, adapter, &get_feat_ctx); > if (unlikely(rc != 0)) { >@@ -3680,11 +3686,7 @@ ena_attach(device_t pdev) > taskqueue_start_threads(&adapter->metrics_tq, 1, PI_NET, "%s metricsq", > device_get_nameunit(adapter->pdev)); > >- /* Initialize statistics */ >- ena_alloc_counters((counter_u64_t *)&adapter->dev_stats, >- sizeof(struct ena_stats_dev)); >- ena_alloc_counters((counter_u64_t *)&adapter->hw_stats, >- sizeof(struct ena_hw_stats)); >+ /* Initialize sysctls */ > ena_sysctl_add_nodes(adapter); > > #ifdef DEV_NETMAP
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 268934
: 239448