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

Use after free, double lock found by coccinelle

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.6.0
    • None
    • 3
    • 14857

    Description

      When coccinelle (a static analyser) is run on the Lustre code, with the current Linux kernel scripts, it finds, amongst other things, the following errors:

        
      lustre/include/obd_support.h:792:19-22: ERROR: reference preceded by free on line 791
      lustre/ptlrpc/nrs_tbf.c:312:2-8: preceding lock on line 307
      lustre/fid/fid_handler.c:73:43-51: ERROR: cli is NULL but dereferenced.
      lustre/lfsck/lfsck_lib.c:1564:1-10: second lock on line 1571
      

      Attachments

        Issue Links

          Activity

            [LU-5320] Use after free, double lock found by coccinelle
            emoly.liu Emoly Liu made changes -
            Link New: This issue is related to IEEL-102 [ IEEL-102 ]
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-2753 [ LU-2753 ]
            pjones Peter Jones made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            pjones Peter Jones added a comment -

            Landed for 2.6

            pjones Peter Jones added a comment - Landed for 2.6
            fzago Frank Zago (Inactive) added a comment - - edited

            I'm running it from Ubuntu. I installed the PPA then coccinelle (http://coccinelle.lip6.fr/download.php). It's the latest version (1.0.0-rc21).

            I then run it from a linux kernel tree:

            make coccicheck -j7 M=<path to lustre>/lustre-release
            
            fzago Frank Zago (Inactive) added a comment - - edited I'm running it from Ubuntu. I installed the PPA then coccinelle ( http://coccinelle.lip6.fr/download.php ). It's the latest version (1.0.0-rc21). I then run it from a linux kernel tree: make coccicheck -j7 M=<path to lustre>/lustre-release
            jhammond John Hammond added a comment -

            Hi Frank,

            I'm curious. Which version of coccinelle are you using? I used it some it a while ago but had too many issues with it. How well do you find it to work? Perhaps I should try it again.

            jhammond John Hammond added a comment - Hi Frank, I'm curious. Which version of coccinelle are you using? I used it some it a while ago but had too many issues with it. How well do you find it to work? Perhaps I should try it again.
            adilger Andreas Dilger made changes -
            Summary Original: Bug found by coccinelle New: Use after free, double lock found by coccinelle
            jlevi Jodi Levi (Inactive) made changes -
            Assignee Original: WC Triage [ wc-triage ] New: Jodi Levi [ jlevi ]
            jlevi Jodi Levi (Inactive) made changes -
            Priority Original: Minor [ 4 ] New: Critical [ 2 ]
            jlevi Jodi Levi (Inactive) made changes -
            Fix Version/s New: Lustre 2.6.0 [ 10595 ]

            People

              jlevi Jodi Levi (Inactive)
              fzago Frank Zago (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: