lkml.org 
[lkml]   [2012]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 30/38] block, sx8: fix pointer math issue getting fw version
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------
    From: Dan Carpenter <dan.carpenter@oracle.com>

    commit ea5f4db8ece896c2ab9eafa0924148a2596c52e4 upstream.

    "mem" is type u8. We need parenthesis here or it screws up the pointer
    math probably leading to an oops.

    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Acked-by: Jeff Garzik <jgarzik@redhat.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/block/sx8.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)
    --- a/drivers/block/sx8.c
    +++ b/drivers/block/sx8.c
    @@ -1116,7 +1116,7 @@ static inline void carm_handle_resp(stru
    break;
    case MISC_GET_FW_VER: {
    struct carm_fw_ver *ver = (struct carm_fw_ver *)
    - mem + sizeof(struct carm_msg_get_fw_ver);
    + (mem + sizeof(struct carm_msg_get_fw_ver));
    if (!error) {
    host->fw_ver = le32_to_cpu(ver->version);
    host->flags |= (ver->features & FL_FW_VER_MASK);



    \
     
     \ /
      Last update: 2012-03-17 00:41    [from the cache]
    ©2003-2014 Jasper Spaans. Advertise on this site