OSDN Git Service

bpf: undo prog rejection on read-only lock failure
[uclinux-h8/linux.git] / kernel / relay.c
index c955b10..04f2486 100644 (file)
@@ -39,7 +39,7 @@ static void relay_file_mmap_close(struct vm_area_struct *vma)
 /*
  * fault() vm_op implementation for relay file mapping.
  */
-static int relay_buf_fault(struct vm_fault *vmf)
+static vm_fault_t relay_buf_fault(struct vm_fault *vmf)
 {
        struct page *page;
        struct rchan_buf *buf = vmf->vma->vm_private_data;
@@ -169,7 +169,8 @@ static struct rchan_buf *relay_create_buf(struct rchan *chan)
        buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);
        if (!buf)
                return NULL;
-       buf->padding = kmalloc(chan->n_subbufs * sizeof(size_t *), GFP_KERNEL);
+       buf->padding = kmalloc_array(chan->n_subbufs, sizeof(size_t *),
+                                    GFP_KERNEL);
        if (!buf->padding)
                goto free_buf;