new file mode 100644
@@ -0,0 +1,10 @@
+#ifndef __BP_LINUX_BITMAP_H
+#define __BP_LINUX_BITMAP_H
+#include_next <linux/bitmap.h>
+
+#if LINUX_VERSION_IS_LESS(4,19,0)
+unsigned long *bitmap_zalloc(unsigned int nbits, gfp_t flags);
+void bitmap_free(const unsigned long *bitmap);
+#endif /* < 4.19 */
+
+#endif /* __BP_LINUX_BITMAP_H */
@@ -8,6 +8,7 @@ compat-y += main.o
# Kernel backport compatibility code
compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o
+compat-$(CPTCFG_KERNEL_4_19) += backport-4.19.o
compat-$(CPTCFG_KERNEL_5_2) += backport-5.2.o backport-genetlink.o
compat-$(CPTCFG_KERNEL_5_3) += backport-5.3.o
compat-$(CPTCFG_KERNEL_5_5) += backport-5.5.o
new file mode 100644
@@ -0,0 +1,15 @@
+#include <linux/bitmap.h>
+#include <linux/slab.h>
+
+unsigned long *
+bitmap_zalloc(unsigned int nbits, gfp_t flags)
+{
+ return kzalloc(BITS_TO_LONGS(nbits) * sizeof(unsigned long), flags);
+}
+EXPORT_SYMBOL(bitmap_zalloc);
+
+void bitmap_free(const unsigned long *bitmap)
+{
+ kfree(bitmap);
+}
+EXPORT_SYMBOL(bitmap_free);