Merge tag 'ceph-for-5.14-rc1' of git://github.com/ceph/ceph-client
[linux-2.6-microblaze.git] / ipc / shm.c
index 003234f..748933e 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -222,7 +222,7 @@ static void shm_rcu_free(struct rcu_head *head)
        struct shmid_kernel *shp = container_of(ptr, struct shmid_kernel,
                                                        shm_perm);
        security_shm_free(&shp->shm_perm);
-       kvfree(shp);
+       kfree(shp);
 }
 
 static inline void shm_rmid(struct ipc_namespace *ns, struct shmid_kernel *s)
@@ -619,7 +619,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
                        ns->shm_tot + numpages > ns->shm_ctlall)
                return -ENOSPC;
 
-       shp = kvmalloc(sizeof(*shp), GFP_KERNEL);
+       shp = kmalloc(sizeof(*shp), GFP_KERNEL);
        if (unlikely(!shp))
                return -ENOMEM;
 
@@ -630,7 +630,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
        shp->shm_perm.security = NULL;
        error = security_shm_alloc(&shp->shm_perm);
        if (error) {
-               kvfree(shp);
+               kfree(shp);
                return error;
        }