We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fc1fe5 commit bb3455dCopy full SHA for bb3455d
driver/main.c
@@ -2058,7 +2058,11 @@ int sysdig_init(void)
2058
2059
g_ppm_major = MAJOR(dev);
2060
g_ppm_numdevs = num_cpus;
2061
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
2062
+ g_ppm_devs = kmalloc(g_ppm_numdevs * sizeof(struct ppm_device), GFP_KERNEL);
2063
+#else
2064
g_ppm_devs = kmalloc_array(g_ppm_numdevs, sizeof(struct ppm_device), GFP_KERNEL);
2065
+#endif
2066
if (!g_ppm_devs) {
2067
pr_err("can't allocate devices\n");
2068
ret = -ENOMEM;
0 commit comments