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

lov_iocontrol: BUG: unable to handle kernel NULL pointer dereference at 0000000000000100

Details

    • 3
    • 9223372036854775807

    Description

      For inactive OST lov->lov_tgts[index]->ltd_exp is NULL, it should be checked before accessing lov->lov_tgts[index]->ltd_exp->exp_obd.

      static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
                               void *karg, void __user *uarg)
      ...
                      imp = lov->lov_tgts[index]->ltd_exp->exp_obd->u.cli.cl_import;
                      if (!lov->lov_tgts[index]->ltd_active &&
                          imp->imp_state != LUSTRE_IMP_IDLE)
                              RETURN(-ENODATA);
      ...
      

      The problem can be seen with:

      # REFORMAT=yes sh llmount.sh
      # lctl conf_param lustre-OST0001.osc.active=0
      # sh llmountcleanup.sh
      # NOFORMAT=yes sh llmount.sh
      # lfs df
      

      It causes:

      [ 2659.212961] BUG: unable to handle kernel NULL pointer dereference at 0000000000000100
      [ 2659.216168] IP: [<ffffffffc0cbd3b8>] lov_iocontrol+0x308/0x21f0 [lov]
      

      Attachments

        Activity

          People

            vsaveliev Vladimir Saveliev
            vsaveliev Vladimir Saveliev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: