Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.6.0
    • None
    • None
    • 3
    • 10991

    Description

      Found by Thomas Meyer <thomas@m3y3r.de> and submitted to mainline kernel:

      Author: Thomas Meyer <thomas@m3y3r.de>
      Date:   Thu Sep 19 23:45:46 2013 +0200
      
          staging: lustre: Cocci spatch "noderef"
          
          sizeof when applied to a pointer typed expression gives the size of the
          pointer.
          Found by coccinelle spatch "misc/noderef.cocci"
          
          Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
          Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/stagi
      index 2644edf..c8b4344 100644
      --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
      +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
      @@ -1387,7 +1387,7 @@ echo_copyout_lsm (struct lov_stripe_md *lsm, void *_ulsm, 
              if (nob > ulsm_nob)
                      return (-EINVAL);
       
      -       if (copy_to_user (ulsm, lsm, sizeof(ulsm)))
      +       if (copy_to_user (ulsm, lsm, sizeof(*ulsm)))
                      return (-EFAULT);
      

      Attachments

        Activity

          People

            wc-triage WC Triage
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: