lkml.org 
[lkml]   [2011]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 8/8] pmcraid: Pass pointers to access_ok(), not integers
    From
    Date
    Most architectures define access_ok() as a macro that casts its
    argument such that an argument of type unsigned long will be accepted
    without complaint. However, the proper type is void *, and passing
    unsigned long results in a warning on sparc64.

    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/scsi/pmcraid.c | 3 ++-
    1 files changed, 2 insertions(+), 1 deletions(-)

    diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
    index 5163edb..01b29a6 100644
    --- a/drivers/scsi/pmcraid.c
    +++ b/drivers/scsi/pmcraid.c
    @@ -3807,7 +3807,8 @@ static long pmcraid_ioctl_passthrough(
    }

    if (request_size > 0) {
    - rc = access_ok(access, arg, request_offset + request_size);
    + rc = access_ok(access, (void *)arg,
    + request_offset + request_size);

    if (!rc) {
    rc = -EFAULT;
    --
    1.7.7.3



    \
     
     \ /
      Last update: 2011-12-21 02:39    [W:5.149 / U:0.176 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site