author | Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com> |
Sat, 20 Oct 2012 07:13:05 -0700 | |
branch | s11-sru |
changeset 2392 | 19355fbf02e9 |
permissions | -rw-r--r-- |
2392
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
1 |
--- net-snmp-5.4.1/agent/mibgroup/hardware/cpu/cpu_kstat.c Thu Oct 5 08:53:42 2006 |
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
2 |
+++ net-snmp-5.4.1.mod/agent/mibgroup/hardware/cpu/cpu_kstat.c Thu Mar 29 07:57:19 2012 |
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
3 |
@@ -103,6 +103,8 @@ |
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
4 |
if (strcmp(ksp->ks_module, "cpu_stat") == 0) { |
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
5 |
i = ksp->ks_instance; |
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
6 |
cpu2 = netsnmp_cpu_get_byIdx( i, 0 ); |
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
7 |
+ if ( !cpu2 ) |
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
8 |
+ break; /* or continue ?*/ /*Skip new CPUs */ |
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
9 |
if ((ksp->ks_type != KSTAT_TYPE_RAW) || |
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
10 |
(ksp->ks_data_size != sizeof(cs))|| |
19355fbf02e9
7186501 net-snmp crashes in net_cpu_arch_load
Lijo George - Oracle Corporation - Bangalore India <lijo.x.george@oracle.com>
parents:
diff
changeset
|
11 |
(kstat_read(kstat_fd, ksp, &cs) == -1)) { |