Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-7766

LNetEQAlloc() misuses roundup_pow_of_two()

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • Lustre 2.8.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      After http://review.whamcloud.com/16914 we see the following when starting LNet:

      [690112.179415] LNet: 8882:0:(lib-eq.c:87:LNetEQAlloc()) EQ callback is guaranteed to get every event, do you still want to set eqcount 1 for polling event which will have locking overhead? Please contact with developer to confirm
      

      Here LNetEQAlloc() is being called with a count of 0 and passing that to roundup_pow_of_two(). This is undefined behavior according to http://lxr.free-electrons.com/source/tools/include/linux/log2.h#L161.

      Attachments

        Activity

          [LU-7766] LNetEQAlloc() misuses roundup_pow_of_two()
          pjones Peter Jones added a comment -

          Landed for 2.8

          pjones Peter Jones added a comment - Landed for 2.8

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18370/
          Subject: LU-7766 lnet: Don't call roundup_pow_of_two on zero in LNetEQAlloc
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: e3705effd8d94be11493da754c5678de5523c877

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/18370/ Subject: LU-7766 lnet: Don't call roundup_pow_of_two on zero in LNetEQAlloc Project: fs/lustre-release Branch: master Current Patch Set: Commit: e3705effd8d94be11493da754c5678de5523c877

          just noticed the annoying new lnet warning message today. talked about it on Skype. good to know there's already a patch in flight to fix it.

          bogl Bob Glossman (Inactive) added a comment - just noticed the annoying new lnet warning message today. talked about it on Skype. good to know there's already a patch in flight to fix it.
          green Oleg Drokin added a comment -

          I submitted the same patch upstream a few days ago, but did not notice we imported this bug into our tree too.

          green Oleg Drokin added a comment - I submitted the same patch upstream a few days ago, but did not notice we imported this bug into our tree too.

          Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: http://review.whamcloud.com/18370
          Subject: LU-7766 lnet: Don't call roundup_pow_of_two on zero in LNetEQAlloc
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: c0cd8205473d7198ca48278449dcdfb09110f2de

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: http://review.whamcloud.com/18370 Subject: LU-7766 lnet: Don't call roundup_pow_of_two on zero in LNetEQAlloc Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: c0cd8205473d7198ca48278449dcdfb09110f2de

          Oleg is planning to submit a patch for this.

          jgmitter Joseph Gmitter (Inactive) added a comment - Oleg is planning to submit a patch for this.

          People

            green Oleg Drokin
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: