put_ulong calls in lib_ring_buffer_compat_ioctl() should be compat
authorCorey Minyard <tcminyard@gmail.com>
Wed, 12 Dec 2012 02:45:20 +0000 (21:45 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 Dec 2012 02:46:18 +0000 (21:46 -0500)
I was noticing the that some of the put_ulong calls in
lib_ring_buffer_compat_ioctl() were not compat_put_ulong.  I can't
imagine this is correct.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/ring_buffer_vfs.c

index c69b64e1d9ffea5a17d980f29e64d785b8d23762..899af8124f05c10f296b7ea167383a399fdb1e28 100644 (file)
@@ -331,7 +331,7 @@ long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
                data_size = lib_ring_buffer_get_read_data_size(config, buf);
                if (data_size > UINT_MAX)
                        return -EFBIG;
-               return put_ulong(data_size, arg);
+               return compat_put_ulong(data_size, arg);
        }
        case RING_BUFFER_COMPAT_GET_PADDED_SUBBUF_SIZE:
        {
@@ -341,12 +341,12 @@ long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
                size = PAGE_ALIGN(size);
                if (size > UINT_MAX)
                        return -EFBIG;
-               return put_ulong(size, arg);
+               return compat_put_ulong(size, arg);
        }
        case RING_BUFFER_COMPAT_GET_MAX_SUBBUF_SIZE:
                if (chan->backend.subbuf_size > UINT_MAX)
                        return -EFBIG;
-               return put_ulong(chan->backend.subbuf_size, arg);
+               return compat_put_ulong(chan->backend.subbuf_size, arg);
        case RING_BUFFER_COMPAT_GET_MMAP_LEN:
        {
                unsigned long mmap_buf_len;
@@ -358,7 +358,7 @@ long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
                        mmap_buf_len += chan->backend.subbuf_size;
                if (mmap_buf_len > UINT_MAX)
                        return -EFBIG;
-               return put_ulong(mmap_buf_len, arg);
+               return compat_put_ulong(mmap_buf_len, arg);
        }
        case RING_BUFFER_COMPAT_GET_MMAP_READ_OFFSET:
        {
@@ -371,7 +371,7 @@ long lib_ring_buffer_compat_ioctl(struct file *filp, unsigned int cmd,
                read_offset = buf->backend.array[sb_bindex]->mmap_offset;
                if (read_offset > UINT_MAX)
                        return -EINVAL;
-               return put_ulong(read_offset, arg);
+               return compat_put_ulong(read_offset, arg);
        }
        case RING_BUFFER_COMPAT_FLUSH:
                lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE);
This page took 0.02668 seconds and 4 git commands to generate.