Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.17.0
    • None
    • 3
    • 9223372036854775807

    Description

      Passing of valid pointers to PTR_ERR is unlikely to lead to desired effects, so we really need to do something about it.

      one example:

              wobdo = object_update_param_get(update, 0, &size);
              if (IS_ERR(wobdo) || size != sizeof(*wobdo)) {
                      CERROR("%s: obdo is NULL, invalid RPC: rc = %ld\n",
                             tgt_name(tsi->tsi_tgt), PTR_ERR(wobdo));
                      RETURN(PTR_ERR(wobdo));
              }
      

      List of triggers:

      lustre/target/out_handler.c:120 out_create() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:122 out_create() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:134 out_create() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:136 out_create() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:173 out_attr_set() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:175 out_attr_set() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:390 out_xattr_set() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:392 out_xattr_set() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:487 out_index_insert() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:489 out_index_insert() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:503 out_index_insert() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:505 out_index_insert() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:590 out_write() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:592 out_write() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:599 out_write() warn: passing a valid pointer to 'PTR_ERR'
      lustre/target/out_handler.c:601 out_write() warn: passing a valid pointer to 'PTR_ERR'
      

      Attachments

        Issue Links

          Activity

            [LU-11029] passing a valid pointer to PTR_ERR

            People

              ckansal Chakshu Kansal
              green Oleg Drokin
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: