// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright(c) 2020-2023 Intel Corporation
+ * Copyright(c) 2020-2024 Intel Corporation
  */
 
 #include "iwl-drv.h"
        }
 
        new_len = pnvm->size;
-       *data = kmemdup(pnvm->data, pnvm->size, GFP_KERNEL);
+       *data = kvmemdup(pnvm->data, pnvm->size, GFP_KERNEL);
        release_firmware(pnvm);
 
        if (!*data)
                        if (*len >= sizeof(*package)) {
                                /* we need only the data */
                                *len -= sizeof(*package);
-                               image = kmemdup(package->data,
-                                               *len, GFP_KERNEL);
+                               image = kvmemdup(package->data,
+                                                *len, GFP_KERNEL);
                        }
                        /*
                         * free package regardless of whether kmemdup
 set:
        iwl_trans_set_pnvm(trans, capa);
 free:
-       kfree(data);
+       kvfree(data);
        kfree(pnvm_data);
 }