sch_api.c (9ca718743ad8402958637bfc196d7b62371a1b9f) | sch_api.c (872f690341948b502c93318f806d821c56772c42) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * net/sched/sch_api.c Packet scheduler API. 4 * 5 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 6 * 7 * Fixes: 8 * --- 1156 unchanged lines hidden (view full) --- 1165 struct Qdisc *sch; 1166 struct Qdisc_ops *ops; 1167 struct qdisc_size_table *stab; 1168 1169 ops = qdisc_lookup_ops(kind); 1170#ifdef CONFIG_MODULES 1171 if (ops == NULL && kind != NULL) { 1172 char name[IFNAMSIZ]; | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * net/sched/sch_api.c Packet scheduler API. 4 * 5 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 6 * 7 * Fixes: 8 * --- 1156 unchanged lines hidden (view full) --- 1165 struct Qdisc *sch; 1166 struct Qdisc_ops *ops; 1167 struct qdisc_size_table *stab; 1168 1169 ops = qdisc_lookup_ops(kind); 1170#ifdef CONFIG_MODULES 1171 if (ops == NULL && kind != NULL) { 1172 char name[IFNAMSIZ]; |
1173 if (nla_strlcpy(name, kind, IFNAMSIZ) >= 0) { | 1173 if (nla_strscpy(name, kind, IFNAMSIZ) >= 0) { |
1174 /* We dropped the RTNL semaphore in order to 1175 * perform the module load. So, even if we 1176 * succeeded in loading the module we have to 1177 * tell the caller to replay the request. We 1178 * indicate this using -EAGAIN. 1179 * We replay the request because the device may 1180 * go away in the mean time. 1181 */ --- 1122 unchanged lines hidden --- | 1174 /* We dropped the RTNL semaphore in order to 1175 * perform the module load. So, even if we 1176 * succeeded in loading the module we have to 1177 * tell the caller to replay the request. We 1178 * indicate this using -EAGAIN. 1179 * We replay the request because the device may 1180 * go away in the mean time. 1181 */ --- 1122 unchanged lines hidden --- |