• Louis Rilling's avatar
    [PATCH] configfs: Prevent userspace from creating new entries under attaching directories · 2a109f2a
    Louis Rilling authored
    process 1: 					process 2:
    configfs_mkdir("A")
      attach_group("A")
        attach_item("A")
          d_instantiate("A")
        populate_groups("A")
          mutex_lock("A")
          attach_group("A/B")
            attach_item("A")
              d_instantiate("A/B")
    						mkdir("A/B/C")
    						  do_path_lookup("A/B/C", LOOKUP_PARENT)
    						    ok
    						  lookup_create("A/B/C")
    						    mutex_lock("A/B")
    						    ok
    						  configfs_mkdir("A/B/C")
    						    ok
          attach_group("A/C")
            attach_item("A/C")
              d_instantiate("A/C")
            populate_groups("A/C")
              mutex_lock("A/C")
              attach_group("A/C/D")
                attach_item("A/C/D")
                  failure
              mutex_unlock("A/C")
              detach_groups("A/C")
                nothing to do
    						mkdir("A/C/E")
    						  do_path_lookup("A/C/E", LOOKUP_PARENT)
    						    ok
    						  lookup_create("A/C/E")
    						    mutex_lock("A/C")
    						    ok
    						  configfs_mkd...
    2a109f2a
configfs_internal.h 4.92 KB