Merge tag 'trace-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux...
[cascardo/linux.git] / drivers / target / target_core_configfs.c
index f0e85b1..bf55c5a 100644 (file)
@@ -457,6 +457,10 @@ static int target_fabric_tf_ops_check(
                pr_err("Missing tfo->queue_tm_rsp()\n");
                return -EINVAL;
        }
+       if (!tfo->aborted_task) {
+               pr_err("Missing tfo->aborted_task()\n");
+               return -EINVAL;
+       }
        /*
         * We at least require tfo->fabric_make_wwn(), tfo->fabric_drop_wwn()
         * tfo->fabric_make_tpg() and tfo->fabric_drop_tpg() in
@@ -2223,6 +2227,11 @@ static ssize_t target_core_alua_tg_pt_gp_store_attr_alua_access_state(
                        " tg_pt_gp ID: %hu\n", tg_pt_gp->tg_pt_gp_valid_id);
                return -EINVAL;
        }
+       if (!(dev->dev_flags & DF_CONFIGURED)) {
+               pr_err("Unable to set alua_access_state while device is"
+                      " not configured\n");
+               return -ENODEV;
+       }
 
        ret = kstrtoul(page, 0, &tmp);
        if (ret < 0) {