Whamcloud - gitweb
LU-9680 lnet: handle multi-rail setups
[fs/lustre-release.git] / lustre / obdclass / kernelcomm.c
index 98c21e8..8407825 100644 (file)
@@ -121,7 +121,12 @@ static int lustre_device_list_start(struct netlink_callback *cb)
                struct nlattr *dev;
                int rem;
 
-               nla_for_each_attr(dev, params, msg_len, rem) {
+               if (!(nla_type(params) & LN_SCALAR_ATTR_LIST)) {
+                       NL_SET_ERR_MSG(extack, "no configuration");
+                       GOTO(report_err, rc);
+               }
+
+               nla_for_each_nested(dev, params, rem) {
                        struct nlattr *prop;
                        int rem2;