Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'nla_nest_start'

Michal Kubecek says:

====================
make nla_nest_start() add NLA_F_NESTED flag

One of the comments in recent review of the ethtool netlink series pointed
out that proposed ethnl_nest_start() helper which adds NLA_F_NESTED to
second argument of nla_nest_start() is not really specific to ethtool
netlink code. That is hard to argue with as closer inspection revealed that
exactly the same helper already exists in ipset code (except it's a macro
rather than an inline function).

Another observation was that even if NLA_F_NESTED flag was introduced in
2007, only few netlink based interfaces set it in kernel generated messages
and even many recently added APIs omit it. That is unfortunate as without
the flag, message parsers not familiar with attribute semantics cannot
recognize nested attributes and do not see message structure; this affects
e.g. wireshark dissector or mnl_nlmsg_fprintf() from libmnl.

This is why I'm suggesting to rename existing nla_nest_start() to different
name (nla_nest_start_noflag) and reintroduce nla_nest_start() as a wrapper
adding NLA_F_NESTED flag. This is implemented in first patch which is
mostly generated by spatch. Second patch drops ipset helper macros which
lose their purpose. Third patch cleans up minor coding style issues found
by checkpatch.pl in first patch.

We could leave nla_nest_start() untouched and simply add a wrapper adding
NLA_F_NESTED but that would probably preserve the state when even most new
code doesn't set the flag.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+565 -494
+4 -4
drivers/block/drbd/drbd_nl.c
··· 114 114 if (!info || !info[0]) 115 115 return 0; 116 116 117 - nla = nla_nest_start(skb, DRBD_NLA_CFG_REPLY); 117 + nla = nla_nest_start_noflag(skb, DRBD_NLA_CFG_REPLY); 118 118 if (!nla) 119 119 return err; 120 120 ··· 135 135 int err = -EMSGSIZE; 136 136 int len; 137 137 138 - nla = nla_nest_start(skb, DRBD_NLA_CFG_REPLY); 138 + nla = nla_nest_start_noflag(skb, DRBD_NLA_CFG_REPLY); 139 139 if (!nla) 140 140 return err; 141 141 ··· 3269 3269 struct drbd_device *device) 3270 3270 { 3271 3271 struct nlattr *nla; 3272 - nla = nla_nest_start(skb, DRBD_NLA_CFG_CONTEXT); 3272 + nla = nla_nest_start_noflag(skb, DRBD_NLA_CFG_CONTEXT); 3273 3273 if (!nla) 3274 3274 goto nla_put_failure; 3275 3275 if (device && ··· 3837 3837 if (err) 3838 3838 goto nla_put_failure; 3839 3839 3840 - nla = nla_nest_start(skb, DRBD_NLA_STATE_INFO); 3840 + nla = nla_nest_start_noflag(skb, DRBD_NLA_STATE_INFO); 3841 3841 if (!nla) 3842 3842 goto nla_put_failure; 3843 3843 if (nla_put_u32(skb, T_sib_reason, sib ? sib->sib_reason : SIB_GET_STATUS_REPLY) ||
+2 -2
drivers/block/nbd.c
··· 2047 2047 */ 2048 2048 if (refcount_read(&nbd->config_refs)) 2049 2049 connected = 1; 2050 - dev_opt = nla_nest_start(reply, NBD_DEVICE_ITEM); 2050 + dev_opt = nla_nest_start_noflag(reply, NBD_DEVICE_ITEM); 2051 2051 if (!dev_opt) 2052 2052 return -EMSGSIZE; 2053 2053 ret = nla_put_u32(reply, NBD_DEVICE_INDEX, nbd->index); ··· 2095 2095 goto out; 2096 2096 } 2097 2097 2098 - dev_list = nla_nest_start(reply, NBD_ATTR_DEVICE_LIST); 2098 + dev_list = nla_nest_start_noflag(reply, NBD_ATTR_DEVICE_LIST); 2099 2099 if (index == -1) { 2100 2100 ret = idr_for_each(&nbd_index_idr, &status_cb, reply); 2101 2101 if (ret) {
+5 -4
drivers/infiniband/core/nldev.c
··· 292 292 { 293 293 struct nlattr *entry_attr; 294 294 295 - entry_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY); 295 + entry_attr = nla_nest_start_noflag(msg, 296 + RDMA_NLDEV_ATTR_RES_SUMMARY_ENTRY); 296 297 if (!entry_attr) 297 298 return -EMSGSIZE; 298 299 ··· 328 327 if (fill_nldev_handle(msg, device)) 329 328 return -EMSGSIZE; 330 329 331 - table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_RES_SUMMARY); 330 + table_attr = nla_nest_start_noflag(msg, RDMA_NLDEV_ATTR_RES_SUMMARY); 332 331 if (!table_attr) 333 332 return -EMSGSIZE; 334 333 ··· 1109 1108 goto err; 1110 1109 } 1111 1110 1112 - table_attr = nla_nest_start(skb, fe->nldev_attr); 1111 + table_attr = nla_nest_start_noflag(skb, fe->nldev_attr); 1113 1112 if (!table_attr) { 1114 1113 ret = -EMSGSIZE; 1115 1114 goto err; ··· 1135 1134 1136 1135 filled = true; 1137 1136 1138 - entry_attr = nla_nest_start(skb, fe->entry); 1137 + entry_attr = nla_nest_start_noflag(skb, fe->entry); 1139 1138 if (!entry_attr) { 1140 1139 ret = -EMSGSIZE; 1141 1140 rdma_restrack_put(res);
+4 -4
drivers/infiniband/hw/cxgb4/restrack.c
··· 149 149 if (qhp->ucontext) 150 150 return 0; 151 151 152 - table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER); 152 + table_attr = nla_nest_start_noflag(msg, RDMA_NLDEV_ATTR_DRIVER); 153 153 if (!table_attr) 154 154 goto err; 155 155 ··· 216 216 if (!uep) 217 217 return 0; 218 218 219 - table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER); 219 + table_attr = nla_nest_start_noflag(msg, RDMA_NLDEV_ATTR_DRIVER); 220 220 if (!table_attr) 221 221 goto err_free_uep; 222 222 ··· 387 387 if (ibcq->uobject) 388 388 return 0; 389 389 390 - table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER); 390 + table_attr = nla_nest_start_noflag(msg, RDMA_NLDEV_ATTR_DRIVER); 391 391 if (!table_attr) 392 392 goto err; 393 393 ··· 447 447 if (!stag) 448 448 return 0; 449 449 450 - table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER); 450 + table_attr = nla_nest_start_noflag(msg, RDMA_NLDEV_ATTR_DRIVER); 451 451 if (!table_attr) 452 452 goto err; 453 453
+4 -4
drivers/net/bonding/bond_netlink.c
··· 546 546 if (nla_put_u32(skb, IFLA_BOND_ARP_INTERVAL, bond->params.arp_interval)) 547 547 goto nla_put_failure; 548 548 549 - targets = nla_nest_start(skb, IFLA_BOND_ARP_IP_TARGET); 549 + targets = nla_nest_start_noflag(skb, IFLA_BOND_ARP_IP_TARGET); 550 550 if (!targets) 551 551 goto nla_put_failure; 552 552 ··· 644 644 if (!bond_3ad_get_active_agg_info(bond, &info)) { 645 645 struct nlattr *nest; 646 646 647 - nest = nla_nest_start(skb, IFLA_BOND_AD_INFO); 647 + nest = nla_nest_start_noflag(skb, IFLA_BOND_AD_INFO); 648 648 if (!nest) 649 649 goto nla_put_failure; 650 650 ··· 711 711 return -EINVAL; 712 712 } 713 713 714 - nest = nla_nest_start(skb, LINK_XSTATS_TYPE_BOND); 714 + nest = nla_nest_start_noflag(skb, LINK_XSTATS_TYPE_BOND); 715 715 if (!nest) 716 716 return -EMSGSIZE; 717 717 if (BOND_MODE(bond) == BOND_MODE_8023AD) { ··· 722 722 else 723 723 stats = &BOND_AD_INFO(bond).stats; 724 724 725 - nest2 = nla_nest_start(skb, BOND_XSTATS_3AD); 725 + nest2 = nla_nest_start_noflag(skb, BOND_XSTATS_3AD); 726 726 if (!nest2) { 727 727 nla_nest_end(skb, nest); 728 728 return -EMSGSIZE;
+4 -2
drivers/net/ieee802154/mac802154_hwsim.c
··· 227 227 return 0; 228 228 } 229 229 230 - nl_edges = nla_nest_start(skb, MAC802154_HWSIM_ATTR_RADIO_EDGES); 230 + nl_edges = nla_nest_start_noflag(skb, 231 + MAC802154_HWSIM_ATTR_RADIO_EDGES); 231 232 if (!nl_edges) { 232 233 rcu_read_unlock(); 233 234 return -ENOBUFS; 234 235 } 235 236 236 237 list_for_each_entry_rcu(e, &phy->edges, list) { 237 - nl_edge = nla_nest_start(skb, MAC802154_HWSIM_ATTR_RADIO_EDGE); 238 + nl_edge = nla_nest_start_noflag(skb, 239 + MAC802154_HWSIM_ATTR_RADIO_EDGE); 238 240 if (!nl_edge) { 239 241 rcu_read_unlock(); 240 242 nla_nest_cancel(skb, nl_edges);
+15 -12
drivers/net/macsec.c
··· 2365 2365 static int nla_put_secy(struct macsec_secy *secy, struct sk_buff *skb) 2366 2366 { 2367 2367 struct macsec_tx_sc *tx_sc = &secy->tx_sc; 2368 - struct nlattr *secy_nest = nla_nest_start(skb, MACSEC_ATTR_SECY); 2368 + struct nlattr *secy_nest = nla_nest_start_noflag(skb, 2369 + MACSEC_ATTR_SECY); 2369 2370 u64 csid; 2370 2371 2371 2372 if (!secy_nest) ··· 2436 2435 if (nla_put_secy(secy, skb)) 2437 2436 goto nla_put_failure; 2438 2437 2439 - attr = nla_nest_start(skb, MACSEC_ATTR_TXSC_STATS); 2438 + attr = nla_nest_start_noflag(skb, MACSEC_ATTR_TXSC_STATS); 2440 2439 if (!attr) 2441 2440 goto nla_put_failure; 2442 2441 if (copy_tx_sc_stats(skb, tx_sc->stats)) { ··· 2445 2444 } 2446 2445 nla_nest_end(skb, attr); 2447 2446 2448 - attr = nla_nest_start(skb, MACSEC_ATTR_SECY_STATS); 2447 + attr = nla_nest_start_noflag(skb, MACSEC_ATTR_SECY_STATS); 2449 2448 if (!attr) 2450 2449 goto nla_put_failure; 2451 2450 if (copy_secy_stats(skb, macsec_priv(dev)->stats)) { ··· 2454 2453 } 2455 2454 nla_nest_end(skb, attr); 2456 2455 2457 - txsa_list = nla_nest_start(skb, MACSEC_ATTR_TXSA_LIST); 2456 + txsa_list = nla_nest_start_noflag(skb, MACSEC_ATTR_TXSA_LIST); 2458 2457 if (!txsa_list) 2459 2458 goto nla_put_failure; 2460 2459 for (i = 0, j = 1; i < MACSEC_NUM_AN; i++) { ··· 2464 2463 if (!tx_sa) 2465 2464 continue; 2466 2465 2467 - txsa_nest = nla_nest_start(skb, j++); 2466 + txsa_nest = nla_nest_start_noflag(skb, j++); 2468 2467 if (!txsa_nest) { 2469 2468 nla_nest_cancel(skb, txsa_list); 2470 2469 goto nla_put_failure; ··· 2479 2478 goto nla_put_failure; 2480 2479 } 2481 2480 2482 - attr = nla_nest_start(skb, MACSEC_SA_ATTR_STATS); 2481 + attr = nla_nest_start_noflag(skb, MACSEC_SA_ATTR_STATS); 2483 2482 if (!attr) { 2484 2483 nla_nest_cancel(skb, txsa_nest); 2485 2484 nla_nest_cancel(skb, txsa_list); ··· 2497 2496 } 2498 2497 nla_nest_end(skb, txsa_list); 2499 2498 2500 - rxsc_list = nla_nest_start(skb, MACSEC_ATTR_RXSC_LIST); 2499 + rxsc_list = nla_nest_start_noflag(skb, MACSEC_ATTR_RXSC_LIST); 2501 2500 if (!rxsc_list) 2502 2501 goto nla_put_failure; 2503 2502 ··· 2505 2504 for_each_rxsc_rtnl(secy, rx_sc) { 2506 2505 int k; 2507 2506 struct nlattr *rxsa_list; 2508 - struct nlattr *rxsc_nest = nla_nest_start(skb, j++); 2507 + struct nlattr *rxsc_nest = nla_nest_start_noflag(skb, j++); 2509 2508 2510 2509 if (!rxsc_nest) { 2511 2510 nla_nest_cancel(skb, rxsc_list); ··· 2520 2519 goto nla_put_failure; 2521 2520 } 2522 2521 2523 - attr = nla_nest_start(skb, MACSEC_RXSC_ATTR_STATS); 2522 + attr = nla_nest_start_noflag(skb, MACSEC_RXSC_ATTR_STATS); 2524 2523 if (!attr) { 2525 2524 nla_nest_cancel(skb, rxsc_nest); 2526 2525 nla_nest_cancel(skb, rxsc_list); ··· 2534 2533 } 2535 2534 nla_nest_end(skb, attr); 2536 2535 2537 - rxsa_list = nla_nest_start(skb, MACSEC_RXSC_ATTR_SA_LIST); 2536 + rxsa_list = nla_nest_start_noflag(skb, 2537 + MACSEC_RXSC_ATTR_SA_LIST); 2538 2538 if (!rxsa_list) { 2539 2539 nla_nest_cancel(skb, rxsc_nest); 2540 2540 nla_nest_cancel(skb, rxsc_list); ··· 2549 2547 if (!rx_sa) 2550 2548 continue; 2551 2549 2552 - rxsa_nest = nla_nest_start(skb, k++); 2550 + rxsa_nest = nla_nest_start_noflag(skb, k++); 2553 2551 if (!rxsa_nest) { 2554 2552 nla_nest_cancel(skb, rxsa_list); 2555 2553 nla_nest_cancel(skb, rxsc_nest); ··· 2557 2555 goto nla_put_failure; 2558 2556 } 2559 2557 2560 - attr = nla_nest_start(skb, MACSEC_SA_ATTR_STATS); 2558 + attr = nla_nest_start_noflag(skb, 2559 + MACSEC_SA_ATTR_STATS); 2561 2560 if (!attr) { 2562 2561 nla_nest_cancel(skb, rxsa_list); 2563 2562 nla_nest_cancel(skb, rxsc_nest);
+1 -1
drivers/net/macvlan.c
··· 1624 1624 if (nla_put_u32(skb, IFLA_MACVLAN_MACADDR_COUNT, vlan->macaddr_count)) 1625 1625 goto nla_put_failure; 1626 1626 if (vlan->macaddr_count > 0) { 1627 - nest = nla_nest_start(skb, IFLA_MACVLAN_MACADDR_DATA); 1627 + nest = nla_nest_start_noflag(skb, IFLA_MACVLAN_MACADDR_DATA); 1628 1628 if (nest == NULL) 1629 1629 goto nla_put_failure; 1630 1630
+4 -4
drivers/net/team/team.c
··· 2290 2290 if (err) 2291 2291 return err; 2292 2292 2293 - option_item = nla_nest_start(skb, TEAM_ATTR_ITEM_OPTION); 2293 + option_item = nla_nest_start_noflag(skb, TEAM_ATTR_ITEM_OPTION); 2294 2294 if (!option_item) 2295 2295 return -EMSGSIZE; 2296 2296 ··· 2404 2404 2405 2405 if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex)) 2406 2406 goto nla_put_failure; 2407 - option_list = nla_nest_start(skb, TEAM_ATTR_LIST_OPTION); 2407 + option_list = nla_nest_start_noflag(skb, TEAM_ATTR_LIST_OPTION); 2408 2408 if (!option_list) 2409 2409 goto nla_put_failure; 2410 2410 ··· 2626 2626 { 2627 2627 struct nlattr *port_item; 2628 2628 2629 - port_item = nla_nest_start(skb, TEAM_ATTR_ITEM_PORT); 2629 + port_item = nla_nest_start_noflag(skb, TEAM_ATTR_ITEM_PORT); 2630 2630 if (!port_item) 2631 2631 goto nest_cancel; 2632 2632 if (nla_put_u32(skb, TEAM_ATTR_PORT_IFINDEX, port->dev->ifindex)) ··· 2681 2681 2682 2682 if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex)) 2683 2683 goto nla_put_failure; 2684 - port_list = nla_nest_start(skb, TEAM_ATTR_LIST_PORT); 2684 + port_list = nla_nest_start_noflag(skb, TEAM_ATTR_LIST_PORT); 2685 2685 if (!port_list) 2686 2686 goto nla_put_failure; 2687 2687
+2 -2
drivers/net/wireless/ath/wil6210/cfg80211.c
··· 2679 2679 QCA_ATTR_PAD)) 2680 2680 goto nla_put_failure; 2681 2681 2682 - nl_cfgs = nla_nest_start(msg, QCA_ATTR_DMG_RF_SECTOR_CFG); 2682 + nl_cfgs = nla_nest_start_noflag(msg, QCA_ATTR_DMG_RF_SECTOR_CFG); 2683 2683 if (!nl_cfgs) 2684 2684 goto nla_put_failure; 2685 2685 for (i = 0; i < WMI_MAX_RF_MODULES_NUM; i++) { 2686 2686 if (!(rf_modules_vec & BIT(i))) 2687 2687 continue; 2688 - nl_cfg = nla_nest_start(msg, i); 2688 + nl_cfg = nla_nest_start_noflag(msg, i); 2689 2689 if (!nl_cfg) 2690 2690 goto nla_put_failure; 2691 2691 si = &reply.evt.sectors_info[i];
+4 -7
include/linux/netfilter/ipset/ip_set.h
··· 401 401 return ntohs(nla_get_be16(attr)); 402 402 } 403 403 404 - #define ipset_nest_start(skb, attr) nla_nest_start(skb, attr | NLA_F_NESTED) 405 - #define ipset_nest_end(skb, start) nla_nest_end(skb, start) 406 - 407 404 static inline int nla_put_ipaddr4(struct sk_buff *skb, int type, __be32 ipaddr) 408 405 { 409 - struct nlattr *__nested = ipset_nest_start(skb, type); 406 + struct nlattr *__nested = nla_nest_start(skb, type); 410 407 int ret; 411 408 412 409 if (!__nested) 413 410 return -EMSGSIZE; 414 411 ret = nla_put_in_addr(skb, IPSET_ATTR_IPADDR_IPV4, ipaddr); 415 412 if (!ret) 416 - ipset_nest_end(skb, __nested); 413 + nla_nest_end(skb, __nested); 417 414 return ret; 418 415 } 419 416 420 417 static inline int nla_put_ipaddr6(struct sk_buff *skb, int type, 421 418 const struct in6_addr *ipaddrptr) 422 419 { 423 - struct nlattr *__nested = ipset_nest_start(skb, type); 420 + struct nlattr *__nested = nla_nest_start(skb, type); 424 421 int ret; 425 422 426 423 if (!__nested) 427 424 return -EMSGSIZE; 428 425 ret = nla_put_in6_addr(skb, IPSET_ATTR_IPADDR_IPV6, ipaddrptr); 429 426 if (!ret) 430 - ipset_nest_end(skb, __nested); 427 + nla_nest_end(skb, __nested); 431 428 return ret; 432 429 } 433 430
+23 -3
include/net/netlink.h
··· 1415 1415 } 1416 1416 1417 1417 /** 1418 - * nla_nest_start - Start a new level of nested attributes 1418 + * nla_nest_start_noflag - Start a new level of nested attributes 1419 1419 * @skb: socket buffer to add attributes to 1420 1420 * @attrtype: attribute type of container 1421 1421 * 1422 - * Returns the container attribute 1422 + * This function exists for backward compatibility to use in APIs which never 1423 + * marked their nest attributes with NLA_F_NESTED flag. New APIs should use 1424 + * nla_nest_start() which sets the flag. 1425 + * 1426 + * Returns the container attribute or NULL on error 1423 1427 */ 1424 - static inline struct nlattr *nla_nest_start(struct sk_buff *skb, int attrtype) 1428 + static inline struct nlattr *nla_nest_start_noflag(struct sk_buff *skb, 1429 + int attrtype) 1425 1430 { 1426 1431 struct nlattr *start = (struct nlattr *)skb_tail_pointer(skb); 1427 1432 ··· 1434 1429 return NULL; 1435 1430 1436 1431 return start; 1432 + } 1433 + 1434 + /** 1435 + * nla_nest_start - Start a new level of nested attributes, with NLA_F_NESTED 1436 + * @skb: socket buffer to add attributes to 1437 + * @attrtype: attribute type of container 1438 + * 1439 + * Unlike nla_nest_start_noflag(), mark the nest attribute with NLA_F_NESTED 1440 + * flag. This is the preferred function to use in new code. 1441 + * 1442 + * Returns the container attribute or NULL on error 1443 + */ 1444 + static inline struct nlattr *nla_nest_start(struct sk_buff *skb, int attrtype) 1445 + { 1446 + return nla_nest_start_noflag(skb, attrtype | NLA_F_NESTED); 1437 1447 } 1438 1448 1439 1449 /**
+1 -1
kernel/taskstats.c
··· 375 375 ? TASKSTATS_TYPE_AGGR_PID 376 376 : TASKSTATS_TYPE_AGGR_TGID; 377 377 378 - na = nla_nest_start(skb, aggr); 378 + na = nla_nest_start_noflag(skb, aggr); 379 379 if (!na) 380 380 goto err; 381 381
+2 -2
net/8021q/vlan_netlink.c
··· 227 227 goto nla_put_failure; 228 228 } 229 229 if (vlan->nr_ingress_mappings) { 230 - nest = nla_nest_start(skb, IFLA_VLAN_INGRESS_QOS); 230 + nest = nla_nest_start_noflag(skb, IFLA_VLAN_INGRESS_QOS); 231 231 if (nest == NULL) 232 232 goto nla_put_failure; 233 233 ··· 245 245 } 246 246 247 247 if (vlan->nr_egress_mappings) { 248 - nest = nla_nest_start(skb, IFLA_VLAN_EGRESS_QOS); 248 + nest = nla_nest_start_noflag(skb, IFLA_VLAN_EGRESS_QOS); 249 249 if (nest == NULL) 250 250 goto nla_put_failure; 251 251
+9 -8
net/bridge/br_mdb.c
··· 26 26 if (!br->multicast_router || hlist_empty(&br->router_list)) 27 27 return 0; 28 28 29 - nest = nla_nest_start(skb, MDBA_ROUTER); 29 + nest = nla_nest_start_noflag(skb, MDBA_ROUTER); 30 30 if (nest == NULL) 31 31 return -EMSGSIZE; 32 32 33 33 hlist_for_each_entry_rcu(p, &br->router_list, rlist) { 34 34 if (!p) 35 35 continue; 36 - port_nest = nla_nest_start(skb, MDBA_ROUTER_PORT); 36 + port_nest = nla_nest_start_noflag(skb, MDBA_ROUTER_PORT); 37 37 if (!port_nest) 38 38 goto fail; 39 39 if (nla_put_nohdr(skb, sizeof(u32), &p->dev->ifindex) || ··· 86 86 if (!br_opt_get(br, BROPT_MULTICAST_ENABLED)) 87 87 return 0; 88 88 89 - nest = nla_nest_start(skb, MDBA_MDB); 89 + nest = nla_nest_start_noflag(skb, MDBA_MDB); 90 90 if (nest == NULL) 91 91 return -EMSGSIZE; 92 92 ··· 98 98 if (idx < s_idx) 99 99 goto skip; 100 100 101 - nest2 = nla_nest_start(skb, MDBA_MDB_ENTRY); 101 + nest2 = nla_nest_start_noflag(skb, MDBA_MDB_ENTRY); 102 102 if (!nest2) { 103 103 err = -EMSGSIZE; 104 104 break; ··· 124 124 e.addr.u.ip6 = p->addr.u.ip6; 125 125 #endif 126 126 e.addr.proto = p->addr.proto; 127 - nest_ent = nla_nest_start(skb, MDBA_MDB_ENTRY_INFO); 127 + nest_ent = nla_nest_start_noflag(skb, 128 + MDBA_MDB_ENTRY_INFO); 128 129 if (!nest_ent) { 129 130 nla_nest_cancel(skb, nest2); 130 131 err = -EMSGSIZE; ··· 249 248 memset(bpm, 0, sizeof(*bpm)); 250 249 bpm->family = AF_BRIDGE; 251 250 bpm->ifindex = dev->ifindex; 252 - nest = nla_nest_start(skb, MDBA_MDB); 251 + nest = nla_nest_start_noflag(skb, MDBA_MDB); 253 252 if (nest == NULL) 254 253 goto cancel; 255 - nest2 = nla_nest_start(skb, MDBA_MDB_ENTRY); 254 + nest2 = nla_nest_start_noflag(skb, MDBA_MDB_ENTRY); 256 255 if (nest2 == NULL) 257 256 goto end; 258 257 ··· 445 444 memset(bpm, 0, sizeof(*bpm)); 446 445 bpm->family = AF_BRIDGE; 447 446 bpm->ifindex = dev->ifindex; 448 - nest = nla_nest_start(skb, MDBA_ROUTER); 447 + nest = nla_nest_start_noflag(skb, MDBA_ROUTER); 449 448 if (!nest) 450 449 goto cancel; 451 450
+4 -4
net/bridge/br_netlink.c
··· 413 413 goto nla_put_failure; 414 414 415 415 if (event == RTM_NEWLINK && port) { 416 - struct nlattr *nest 417 - = nla_nest_start(skb, IFLA_PROTINFO | NLA_F_NESTED); 416 + struct nlattr *nest; 418 417 418 + nest = nla_nest_start(skb, IFLA_PROTINFO); 419 419 if (nest == NULL || br_port_fill_attrs(skb, port) < 0) 420 420 goto nla_put_failure; 421 421 nla_nest_end(skb, nest); ··· 439 439 rcu_read_unlock(); 440 440 goto done; 441 441 } 442 - af = nla_nest_start(skb, IFLA_AF_SPEC); 442 + af = nla_nest_start_noflag(skb, IFLA_AF_SPEC); 443 443 if (!af) { 444 444 rcu_read_unlock(); 445 445 goto nla_put_failure; ··· 1569 1569 return -EINVAL; 1570 1570 } 1571 1571 1572 - nest = nla_nest_start(skb, LINK_XSTATS_TYPE_BRIDGE); 1572 + nest = nla_nest_start_noflag(skb, LINK_XSTATS_TYPE_BRIDGE); 1573 1573 if (!nest) 1574 1574 return -EMSGSIZE; 1575 1575
+44 -34
net/core/devlink.c
··· 1671 1671 struct devlink_dpipe_field *field = &header->fields[match->field_id]; 1672 1672 struct nlattr *match_attr; 1673 1673 1674 - match_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_MATCH); 1674 + match_attr = nla_nest_start_noflag(skb, DEVLINK_ATTR_DPIPE_MATCH); 1675 1675 if (!match_attr) 1676 1676 return -EMSGSIZE; 1677 1677 ··· 1696 1696 { 1697 1697 struct nlattr *matches_attr; 1698 1698 1699 - matches_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_TABLE_MATCHES); 1699 + matches_attr = nla_nest_start_noflag(skb, 1700 + DEVLINK_ATTR_DPIPE_TABLE_MATCHES); 1700 1701 if (!matches_attr) 1701 1702 return -EMSGSIZE; 1702 1703 ··· 1719 1718 struct devlink_dpipe_field *field = &header->fields[action->field_id]; 1720 1719 struct nlattr *action_attr; 1721 1720 1722 - action_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_ACTION); 1721 + action_attr = nla_nest_start_noflag(skb, DEVLINK_ATTR_DPIPE_ACTION); 1723 1722 if (!action_attr) 1724 1723 return -EMSGSIZE; 1725 1724 ··· 1744 1743 { 1745 1744 struct nlattr *actions_attr; 1746 1745 1747 - actions_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_TABLE_ACTIONS); 1746 + actions_attr = nla_nest_start_noflag(skb, 1747 + DEVLINK_ATTR_DPIPE_TABLE_ACTIONS); 1748 1748 if (!actions_attr) 1749 1749 return -EMSGSIZE; 1750 1750 ··· 1767 1765 u64 table_size; 1768 1766 1769 1767 table_size = table->table_ops->size_get(table->priv); 1770 - table_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_TABLE); 1768 + table_attr = nla_nest_start_noflag(skb, DEVLINK_ATTR_DPIPE_TABLE); 1771 1769 if (!table_attr) 1772 1770 return -EMSGSIZE; 1773 1771 ··· 1847 1845 1848 1846 if (devlink_nl_put_handle(skb, devlink)) 1849 1847 goto nla_put_failure; 1850 - tables_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_TABLES); 1848 + tables_attr = nla_nest_start_noflag(skb, DEVLINK_ATTR_DPIPE_TABLES); 1851 1849 if (!tables_attr) 1852 1850 goto nla_put_failure; 1853 1851 ··· 1948 1946 int err; 1949 1947 1950 1948 for (i = 0; i < values_count; i++) { 1951 - action_attr = nla_nest_start(skb, 1952 - DEVLINK_ATTR_DPIPE_ACTION_VALUE); 1949 + action_attr = nla_nest_start_noflag(skb, 1950 + DEVLINK_ATTR_DPIPE_ACTION_VALUE); 1953 1951 if (!action_attr) 1954 1952 return -EMSGSIZE; 1955 1953 err = devlink_dpipe_action_value_put(skb, &values[i]); ··· 1985 1983 int err; 1986 1984 1987 1985 for (i = 0; i < values_count; i++) { 1988 - match_attr = nla_nest_start(skb, 1989 - DEVLINK_ATTR_DPIPE_MATCH_VALUE); 1986 + match_attr = nla_nest_start_noflag(skb, 1987 + DEVLINK_ATTR_DPIPE_MATCH_VALUE); 1990 1988 if (!match_attr) 1991 1989 return -EMSGSIZE; 1992 1990 err = devlink_dpipe_match_value_put(skb, &values[i]); ··· 2007 2005 struct nlattr *entry_attr, *matches_attr, *actions_attr; 2008 2006 int err; 2009 2007 2010 - entry_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_ENTRY); 2008 + entry_attr = nla_nest_start_noflag(skb, DEVLINK_ATTR_DPIPE_ENTRY); 2011 2009 if (!entry_attr) 2012 2010 return -EMSGSIZE; 2013 2011 ··· 2019 2017 entry->counter, DEVLINK_ATTR_PAD)) 2020 2018 goto nla_put_failure; 2021 2019 2022 - matches_attr = nla_nest_start(skb, 2023 - DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES); 2020 + matches_attr = nla_nest_start_noflag(skb, 2021 + DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES); 2024 2022 if (!matches_attr) 2025 2023 goto nla_put_failure; 2026 2024 ··· 2032 2030 } 2033 2031 nla_nest_end(skb, matches_attr); 2034 2032 2035 - actions_attr = nla_nest_start(skb, 2036 - DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES); 2033 + actions_attr = nla_nest_start_noflag(skb, 2034 + DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES); 2037 2035 if (!actions_attr) 2038 2036 goto nla_put_failure; 2039 2037 ··· 2090 2088 devlink = dump_ctx->info->user_ptr[0]; 2091 2089 if (devlink_nl_put_handle(dump_ctx->skb, devlink)) 2092 2090 goto nla_put_failure; 2093 - dump_ctx->nest = nla_nest_start(dump_ctx->skb, 2094 - DEVLINK_ATTR_DPIPE_ENTRIES); 2091 + dump_ctx->nest = nla_nest_start_noflag(dump_ctx->skb, 2092 + DEVLINK_ATTR_DPIPE_ENTRIES); 2095 2093 if (!dump_ctx->nest) 2096 2094 goto nla_put_failure; 2097 2095 return 0; ··· 2201 2199 2202 2200 for (i = 0; i < header->fields_count; i++) { 2203 2201 field = &header->fields[i]; 2204 - field_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_FIELD); 2202 + field_attr = nla_nest_start_noflag(skb, 2203 + DEVLINK_ATTR_DPIPE_FIELD); 2205 2204 if (!field_attr) 2206 2205 return -EMSGSIZE; 2207 2206 if (nla_put_string(skb, DEVLINK_ATTR_DPIPE_FIELD_NAME, field->name) || ··· 2225 2222 struct nlattr *fields_attr, *header_attr; 2226 2223 int err; 2227 2224 2228 - header_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_HEADER); 2225 + header_attr = nla_nest_start_noflag(skb, DEVLINK_ATTR_DPIPE_HEADER); 2229 2226 if (!header_attr) 2230 2227 return -EMSGSIZE; 2231 2228 ··· 2234 2231 nla_put_u8(skb, DEVLINK_ATTR_DPIPE_HEADER_GLOBAL, header->global)) 2235 2232 goto nla_put_failure; 2236 2233 2237 - fields_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_HEADER_FIELDS); 2234 + fields_attr = nla_nest_start_noflag(skb, 2235 + DEVLINK_ATTR_DPIPE_HEADER_FIELDS); 2238 2236 if (!fields_attr) 2239 2237 goto nla_put_failure; 2240 2238 ··· 2282 2278 2283 2279 if (devlink_nl_put_handle(skb, devlink)) 2284 2280 goto nla_put_failure; 2285 - headers_attr = nla_nest_start(skb, DEVLINK_ATTR_DPIPE_HEADERS); 2281 + headers_attr = nla_nest_start_noflag(skb, DEVLINK_ATTR_DPIPE_HEADERS); 2286 2282 if (!headers_attr) 2287 2283 goto nla_put_failure; 2288 2284 ··· 2506 2502 struct nlattr *child_resource_attr; 2507 2503 struct nlattr *resource_attr; 2508 2504 2509 - resource_attr = nla_nest_start(skb, DEVLINK_ATTR_RESOURCE); 2505 + resource_attr = nla_nest_start_noflag(skb, DEVLINK_ATTR_RESOURCE); 2510 2506 if (!resource_attr) 2511 2507 return -EMSGSIZE; 2512 2508 ··· 2530 2526 resource->size_valid)) 2531 2527 goto nla_put_failure; 2532 2528 2533 - child_resource_attr = nla_nest_start(skb, DEVLINK_ATTR_RESOURCE_LIST); 2529 + child_resource_attr = nla_nest_start_noflag(skb, 2530 + DEVLINK_ATTR_RESOURCE_LIST); 2534 2531 if (!child_resource_attr) 2535 2532 goto nla_put_failure; 2536 2533 ··· 2582 2577 if (devlink_nl_put_handle(skb, devlink)) 2583 2578 goto nla_put_failure; 2584 2579 2585 - resources_attr = nla_nest_start(skb, DEVLINK_ATTR_RESOURCE_LIST); 2580 + resources_attr = nla_nest_start_noflag(skb, 2581 + DEVLINK_ATTR_RESOURCE_LIST); 2586 2582 if (!resources_attr) 2587 2583 goto nla_put_failure; 2588 2584 ··· 2837 2831 { 2838 2832 struct nlattr *param_value_attr; 2839 2833 2840 - param_value_attr = nla_nest_start(msg, DEVLINK_ATTR_PARAM_VALUE); 2834 + param_value_attr = nla_nest_start_noflag(msg, 2835 + DEVLINK_ATTR_PARAM_VALUE); 2841 2836 if (!param_value_attr) 2842 2837 goto nla_put_failure; 2843 2838 ··· 2929 2922 if (nla_put_u32(msg, DEVLINK_ATTR_PORT_INDEX, port_index)) 2930 2923 goto genlmsg_cancel; 2931 2924 2932 - param_attr = nla_nest_start(msg, DEVLINK_ATTR_PARAM); 2925 + param_attr = nla_nest_start_noflag(msg, DEVLINK_ATTR_PARAM); 2933 2926 if (!param_attr) 2934 2927 goto genlmsg_cancel; 2935 2928 if (nla_put_string(msg, DEVLINK_ATTR_PARAM_NAME, param->name)) ··· 2943 2936 if (nla_put_u8(msg, DEVLINK_ATTR_PARAM_TYPE, nla_type)) 2944 2937 goto param_nest_cancel; 2945 2938 2946 - param_values_list = nla_nest_start(msg, DEVLINK_ATTR_PARAM_VALUES_LIST); 2939 + param_values_list = nla_nest_start_noflag(msg, 2940 + DEVLINK_ATTR_PARAM_VALUES_LIST); 2947 2941 if (!param_values_list) 2948 2942 goto param_nest_cancel; 2949 2943 ··· 3344 3336 struct nlattr *snap_attr; 3345 3337 int err; 3346 3338 3347 - snap_attr = nla_nest_start(msg, DEVLINK_ATTR_REGION_SNAPSHOT); 3339 + snap_attr = nla_nest_start_noflag(msg, DEVLINK_ATTR_REGION_SNAPSHOT); 3348 3340 if (!snap_attr) 3349 3341 return -EINVAL; 3350 3342 ··· 3368 3360 struct nlattr *snapshots_attr; 3369 3361 int err; 3370 3362 3371 - snapshots_attr = nla_nest_start(msg, DEVLINK_ATTR_REGION_SNAPSHOTS); 3363 + snapshots_attr = nla_nest_start_noflag(msg, 3364 + DEVLINK_ATTR_REGION_SNAPSHOTS); 3372 3365 if (!snapshots_attr) 3373 3366 return -EINVAL; 3374 3367 ··· 3585 3576 struct nlattr *chunk_attr; 3586 3577 int err; 3587 3578 3588 - chunk_attr = nla_nest_start(msg, DEVLINK_ATTR_REGION_CHUNK); 3579 + chunk_attr = nla_nest_start_noflag(msg, DEVLINK_ATTR_REGION_CHUNK); 3589 3580 if (!chunk_attr) 3590 3581 return -EINVAL; 3591 3582 ··· 3718 3709 if (err) 3719 3710 goto nla_put_failure; 3720 3711 3721 - chunks_attr = nla_nest_start(skb, DEVLINK_ATTR_REGION_CHUNKS); 3712 + chunks_attr = nla_nest_start_noflag(skb, DEVLINK_ATTR_REGION_CHUNKS); 3722 3713 if (!chunks_attr) { 3723 3714 err = -EMSGSIZE; 3724 3715 goto nla_put_failure; ··· 3794 3785 struct nlattr *nest; 3795 3786 int err; 3796 3787 3797 - nest = nla_nest_start(req->msg, attr); 3788 + nest = nla_nest_start_noflag(req->msg, attr); 3798 3789 if (!nest) 3799 3790 return -EMSGSIZE; 3800 3791 ··· 4322 4313 int i = 0; 4323 4314 int err; 4324 4315 4325 - fmsg_nlattr = nla_nest_start(skb, DEVLINK_ATTR_FMSG); 4316 + fmsg_nlattr = nla_nest_start_noflag(skb, DEVLINK_ATTR_FMSG); 4326 4317 if (!fmsg_nlattr) 4327 4318 return -EMSGSIZE; 4328 4319 ··· 4674 4665 if (devlink_nl_put_handle(msg, devlink)) 4675 4666 goto genlmsg_cancel; 4676 4667 4677 - reporter_attr = nla_nest_start(msg, DEVLINK_ATTR_HEALTH_REPORTER); 4668 + reporter_attr = nla_nest_start_noflag(msg, 4669 + DEVLINK_ATTR_HEALTH_REPORTER); 4678 4670 if (!reporter_attr) 4679 4671 goto genlmsg_cancel; 4680 4672 if (nla_put_string(msg, DEVLINK_ATTR_HEALTH_REPORTER_NAME,
+1 -1
net/core/lwt_bpf.c
··· 453 453 if (!prog->prog) 454 454 return 0; 455 455 456 - nest = nla_nest_start(skb, attr); 456 + nest = nla_nest_start_noflag(skb, attr); 457 457 if (!nest) 458 458 return -EMSGSIZE; 459 459
+1 -1
net/core/lwtunnel.c
··· 237 237 lwtstate->type > LWTUNNEL_ENCAP_MAX) 238 238 return 0; 239 239 240 - nest = nla_nest_start(skb, encap_attr); 240 + nest = nla_nest_start_noflag(skb, encap_attr); 241 241 if (!nest) 242 242 return -EMSGSIZE; 243 243
+1 -1
net/core/neighbour.c
··· 1979 1979 { 1980 1980 struct nlattr *nest; 1981 1981 1982 - nest = nla_nest_start(skb, NDTA_PARMS); 1982 + nest = nla_nest_start_noflag(skb, NDTA_PARMS); 1983 1983 if (nest == NULL) 1984 1984 return -ENOBUFS; 1985 1985
+25 -23
net/core/rtnetlink.c
··· 634 634 if (nla_put_string(skb, IFLA_INFO_SLAVE_KIND, ops->kind) < 0) 635 635 return -EMSGSIZE; 636 636 if (ops->fill_slave_info) { 637 - slave_data = nla_nest_start(skb, IFLA_INFO_SLAVE_DATA); 637 + slave_data = nla_nest_start_noflag(skb, IFLA_INFO_SLAVE_DATA); 638 638 if (!slave_data) 639 639 return -EMSGSIZE; 640 640 err = ops->fill_slave_info(skb, master_dev, dev); ··· 666 666 return err; 667 667 } 668 668 if (ops->fill_info) { 669 - data = nla_nest_start(skb, IFLA_INFO_DATA); 669 + data = nla_nest_start_noflag(skb, IFLA_INFO_DATA); 670 670 if (data == NULL) 671 671 return -EMSGSIZE; 672 672 err = ops->fill_info(skb, dev); ··· 686 686 struct nlattr *linkinfo; 687 687 int err = -EMSGSIZE; 688 688 689 - linkinfo = nla_nest_start(skb, IFLA_LINKINFO); 689 + linkinfo = nla_nest_start_noflag(skb, IFLA_LINKINFO); 690 690 if (linkinfo == NULL) 691 691 goto out; 692 692 ··· 755 755 struct nlattr *mx; 756 756 int i, valid = 0; 757 757 758 - mx = nla_nest_start(skb, RTA_METRICS); 758 + mx = nla_nest_start_noflag(skb, RTA_METRICS); 759 759 if (mx == NULL) 760 760 return -ENOBUFS; 761 761 ··· 1036 1036 int vf; 1037 1037 int err; 1038 1038 1039 - vf_ports = nla_nest_start(skb, IFLA_VF_PORTS); 1039 + vf_ports = nla_nest_start_noflag(skb, IFLA_VF_PORTS); 1040 1040 if (!vf_ports) 1041 1041 return -EMSGSIZE; 1042 1042 1043 1043 for (vf = 0; vf < dev_num_vf(dev->dev.parent); vf++) { 1044 - vf_port = nla_nest_start(skb, IFLA_VF_PORT); 1044 + vf_port = nla_nest_start_noflag(skb, IFLA_VF_PORT); 1045 1045 if (!vf_port) 1046 1046 goto nla_put_failure; 1047 1047 if (nla_put_u32(skb, IFLA_PORT_VF, vf)) ··· 1070 1070 struct nlattr *port_self; 1071 1071 int err; 1072 1072 1073 - port_self = nla_nest_start(skb, IFLA_PORT_SELF); 1073 + port_self = nla_nest_start_noflag(skb, IFLA_PORT_SELF); 1074 1074 if (!port_self) 1075 1075 return -EMSGSIZE; 1076 1076 ··· 1247 1247 vf_linkstate.link_state = ivi.linkstate; 1248 1248 vf_rss_query_en.setting = ivi.rss_query_en; 1249 1249 vf_trust.setting = ivi.trusted; 1250 - vf = nla_nest_start(skb, IFLA_VF_INFO); 1250 + vf = nla_nest_start_noflag(skb, IFLA_VF_INFO); 1251 1251 if (!vf) 1252 1252 goto nla_put_vfinfo_failure; 1253 1253 if (nla_put(skb, IFLA_VF_MAC, sizeof(vf_mac), &vf_mac) || ··· 1266 1266 nla_put(skb, IFLA_VF_TRUST, 1267 1267 sizeof(vf_trust), &vf_trust)) 1268 1268 goto nla_put_vf_failure; 1269 - vfvlanlist = nla_nest_start(skb, IFLA_VF_VLAN_LIST); 1269 + vfvlanlist = nla_nest_start_noflag(skb, IFLA_VF_VLAN_LIST); 1270 1270 if (!vfvlanlist) 1271 1271 goto nla_put_vf_failure; 1272 1272 if (nla_put(skb, IFLA_VF_VLAN_INFO, sizeof(vf_vlan_info), ··· 1279 1279 if (dev->netdev_ops->ndo_get_vf_stats) 1280 1280 dev->netdev_ops->ndo_get_vf_stats(dev, vfs_num, 1281 1281 &vf_stats); 1282 - vfstats = nla_nest_start(skb, IFLA_VF_STATS); 1282 + vfstats = nla_nest_start_noflag(skb, IFLA_VF_STATS); 1283 1283 if (!vfstats) 1284 1284 goto nla_put_vf_failure; 1285 1285 if (nla_put_u64_64bit(skb, IFLA_VF_STATS_RX_PACKETS, ··· 1329 1329 if (!dev->netdev_ops->ndo_get_vf_config) 1330 1330 return 0; 1331 1331 1332 - vfinfo = nla_nest_start(skb, IFLA_VFINFO_LIST); 1332 + vfinfo = nla_nest_start_noflag(skb, IFLA_VFINFO_LIST); 1333 1333 if (!vfinfo) 1334 1334 return -EMSGSIZE; 1335 1335 ··· 1414 1414 int err; 1415 1415 u8 mode; 1416 1416 1417 - xdp = nla_nest_start(skb, IFLA_XDP); 1417 + xdp = nla_nest_start_noflag(skb, IFLA_XDP); 1418 1418 if (!xdp) 1419 1419 return -EMSGSIZE; 1420 1420 ··· 1541 1541 const struct rtnl_af_ops *af_ops; 1542 1542 struct nlattr *af_spec; 1543 1543 1544 - af_spec = nla_nest_start(skb, IFLA_AF_SPEC); 1544 + af_spec = nla_nest_start_noflag(skb, IFLA_AF_SPEC); 1545 1545 if (!af_spec) 1546 1546 return -EMSGSIZE; 1547 1547 ··· 1552 1552 if (!af_ops->fill_link_af) 1553 1553 continue; 1554 1554 1555 - af = nla_nest_start(skb, af_ops->family); 1555 + af = nla_nest_start_noflag(skb, af_ops->family); 1556 1556 if (!af) 1557 1557 return -EMSGSIZE; 1558 1558 ··· 4273 4273 nla_put_u32(skb, IFLA_LINK, dev_get_iflink(dev)))) 4274 4274 goto nla_put_failure; 4275 4275 4276 - br_afspec = nla_nest_start(skb, IFLA_AF_SPEC); 4276 + br_afspec = nla_nest_start_noflag(skb, IFLA_AF_SPEC); 4277 4277 if (!br_afspec) 4278 4278 goto nla_put_failure; 4279 4279 ··· 4297 4297 } 4298 4298 nla_nest_end(skb, br_afspec); 4299 4299 4300 - protinfo = nla_nest_start(skb, IFLA_PROTINFO | NLA_F_NESTED); 4300 + protinfo = nla_nest_start(skb, IFLA_PROTINFO); 4301 4301 if (!protinfo) 4302 4302 goto nla_put_failure; 4303 4303 ··· 4776 4776 4777 4777 if (ops && ops->fill_linkxstats) { 4778 4778 *idxattr = IFLA_STATS_LINK_XSTATS; 4779 - attr = nla_nest_start(skb, 4780 - IFLA_STATS_LINK_XSTATS); 4779 + attr = nla_nest_start_noflag(skb, 4780 + IFLA_STATS_LINK_XSTATS); 4781 4781 if (!attr) 4782 4782 goto nla_put_failure; 4783 4783 ··· 4799 4799 ops = master->rtnl_link_ops; 4800 4800 if (ops && ops->fill_linkxstats) { 4801 4801 *idxattr = IFLA_STATS_LINK_XSTATS_SLAVE; 4802 - attr = nla_nest_start(skb, 4803 - IFLA_STATS_LINK_XSTATS_SLAVE); 4802 + attr = nla_nest_start_noflag(skb, 4803 + IFLA_STATS_LINK_XSTATS_SLAVE); 4804 4804 if (!attr) 4805 4805 goto nla_put_failure; 4806 4806 ··· 4815 4815 if (stats_attr_valid(filter_mask, IFLA_STATS_LINK_OFFLOAD_XSTATS, 4816 4816 *idxattr)) { 4817 4817 *idxattr = IFLA_STATS_LINK_OFFLOAD_XSTATS; 4818 - attr = nla_nest_start(skb, IFLA_STATS_LINK_OFFLOAD_XSTATS); 4818 + attr = nla_nest_start_noflag(skb, 4819 + IFLA_STATS_LINK_OFFLOAD_XSTATS); 4819 4820 if (!attr) 4820 4821 goto nla_put_failure; 4821 4822 ··· 4835 4834 struct rtnl_af_ops *af_ops; 4836 4835 4837 4836 *idxattr = IFLA_STATS_AF_SPEC; 4838 - attr = nla_nest_start(skb, IFLA_STATS_AF_SPEC); 4837 + attr = nla_nest_start_noflag(skb, IFLA_STATS_AF_SPEC); 4839 4838 if (!attr) 4840 4839 goto nla_put_failure; 4841 4840 ··· 4845 4844 struct nlattr *af; 4846 4845 int err; 4847 4846 4848 - af = nla_nest_start(skb, af_ops->family); 4847 + af = nla_nest_start_noflag(skb, 4848 + af_ops->family); 4849 4849 if (!af) { 4850 4850 rcu_read_unlock(); 4851 4851 goto nla_put_failure;
+21 -19
net/dcb/dcbnl.c
··· 246 246 if (ret) 247 247 return ret; 248 248 249 - nest = nla_nest_start(skb, DCB_ATTR_PFC_CFG); 249 + nest = nla_nest_start_noflag(skb, DCB_ATTR_PFC_CFG); 250 250 if (!nest) 251 251 return -EMSGSIZE; 252 252 ··· 304 304 if (ret) 305 305 return ret; 306 306 307 - nest = nla_nest_start(skb, DCB_ATTR_CAP); 307 + nest = nla_nest_start_noflag(skb, DCB_ATTR_CAP); 308 308 if (!nest) 309 309 return -EMSGSIZE; 310 310 ··· 348 348 if (ret) 349 349 return ret; 350 350 351 - nest = nla_nest_start(skb, DCB_ATTR_NUMTCS); 351 + nest = nla_nest_start_noflag(skb, DCB_ATTR_NUMTCS); 352 352 if (!nest) 353 353 return -EMSGSIZE; 354 354 ··· 479 479 up = dcb_getapp(netdev, &app); 480 480 } 481 481 482 - app_nest = nla_nest_start(skb, DCB_ATTR_APP); 482 + app_nest = nla_nest_start_noflag(skb, DCB_ATTR_APP); 483 483 if (!app_nest) 484 484 return -EMSGSIZE; 485 485 ··· 578 578 if (ret) 579 579 return ret; 580 580 581 - pg_nest = nla_nest_start(skb, DCB_ATTR_PG_CFG); 581 + pg_nest = nla_nest_start_noflag(skb, DCB_ATTR_PG_CFG); 582 582 if (!pg_nest) 583 583 return -EMSGSIZE; 584 584 ··· 598 598 if (ret) 599 599 goto err_pg; 600 600 601 - param_nest = nla_nest_start(skb, i); 601 + param_nest = nla_nest_start_noflag(skb, i); 602 602 if (!param_nest) 603 603 goto err_pg; 604 604 ··· 889 889 if (ret) 890 890 return ret; 891 891 892 - bcn_nest = nla_nest_start(skb, DCB_ATTR_BCN); 892 + bcn_nest = nla_nest_start_noflag(skb, DCB_ATTR_BCN); 893 893 if (!bcn_nest) 894 894 return -EMSGSIZE; 895 895 ··· 1002 1002 */ 1003 1003 err = -EMSGSIZE; 1004 1004 1005 - app = nla_nest_start(skb, app_nested_type); 1005 + app = nla_nest_start_noflag(skb, app_nested_type); 1006 1006 if (!app) 1007 1007 goto nla_put_failure; 1008 1008 ··· 1036 1036 if (nla_put_string(skb, DCB_ATTR_IFNAME, netdev->name)) 1037 1037 return -EMSGSIZE; 1038 1038 1039 - ieee = nla_nest_start(skb, DCB_ATTR_IEEE); 1039 + ieee = nla_nest_start_noflag(skb, DCB_ATTR_IEEE); 1040 1040 if (!ieee) 1041 1041 return -EMSGSIZE; 1042 1042 ··· 1106 1106 return -EMSGSIZE; 1107 1107 } 1108 1108 1109 - app = nla_nest_start(skb, DCB_ATTR_IEEE_APP_TABLE); 1109 + app = nla_nest_start_noflag(skb, DCB_ATTR_IEEE_APP_TABLE); 1110 1110 if (!app) 1111 1111 return -EMSGSIZE; 1112 1112 ··· 1174 1174 u8 pgid, up_map, prio, tc_pct; 1175 1175 const struct dcbnl_rtnl_ops *ops = dev->dcbnl_ops; 1176 1176 int i = dir ? DCB_ATTR_CEE_TX_PG : DCB_ATTR_CEE_RX_PG; 1177 - struct nlattr *pg = nla_nest_start(skb, i); 1177 + struct nlattr *pg = nla_nest_start_noflag(skb, i); 1178 1178 1179 1179 if (!pg) 1180 1180 return -EMSGSIZE; 1181 1181 1182 1182 for (i = DCB_PG_ATTR_TC_0; i <= DCB_PG_ATTR_TC_7; i++) { 1183 - struct nlattr *tc_nest = nla_nest_start(skb, i); 1183 + struct nlattr *tc_nest = nla_nest_start_noflag(skb, i); 1184 1184 1185 1185 if (!tc_nest) 1186 1186 return -EMSGSIZE; ··· 1231 1231 1232 1232 if (nla_put_string(skb, DCB_ATTR_IFNAME, netdev->name)) 1233 1233 goto nla_put_failure; 1234 - cee = nla_nest_start(skb, DCB_ATTR_CEE); 1234 + cee = nla_nest_start_noflag(skb, DCB_ATTR_CEE); 1235 1235 if (!cee) 1236 1236 goto nla_put_failure; 1237 1237 ··· 1250 1250 1251 1251 /* local pfc */ 1252 1252 if (ops->getpfccfg) { 1253 - struct nlattr *pfc_nest = nla_nest_start(skb, DCB_ATTR_CEE_PFC); 1253 + struct nlattr *pfc_nest = nla_nest_start_noflag(skb, 1254 + DCB_ATTR_CEE_PFC); 1254 1255 1255 1256 if (!pfc_nest) 1256 1257 goto nla_put_failure; ··· 1266 1265 1267 1266 /* local app */ 1268 1267 spin_lock_bh(&dcb_lock); 1269 - app = nla_nest_start(skb, DCB_ATTR_CEE_APP_TABLE); 1268 + app = nla_nest_start_noflag(skb, DCB_ATTR_CEE_APP_TABLE); 1270 1269 if (!app) 1271 1270 goto dcb_unlock; 1272 1271 1273 1272 list_for_each_entry(itr, &dcb_app_list, list) { 1274 1273 if (itr->ifindex == netdev->ifindex) { 1275 - struct nlattr *app_nest = nla_nest_start(skb, 1276 - DCB_ATTR_APP); 1274 + struct nlattr *app_nest = nla_nest_start_noflag(skb, 1275 + DCB_ATTR_APP); 1277 1276 if (!app_nest) 1278 1277 goto dcb_unlock; 1279 1278 ··· 1306 1305 1307 1306 /* features flags */ 1308 1307 if (ops->getfeatcfg) { 1309 - struct nlattr *feat = nla_nest_start(skb, DCB_ATTR_CEE_FEAT); 1308 + struct nlattr *feat = nla_nest_start_noflag(skb, 1309 + DCB_ATTR_CEE_FEAT); 1310 1310 if (!feat) 1311 1311 goto nla_put_failure; 1312 1312 ··· 1609 1607 if (ret) 1610 1608 return ret; 1611 1609 1612 - nest = nla_nest_start(skb, DCB_ATTR_FEATCFG); 1610 + nest = nla_nest_start_noflag(skb, DCB_ATTR_FEATCFG); 1613 1611 if (!nest) 1614 1612 return -EMSGSIZE; 1615 1613
+2 -1
net/decnet/dn_table.c
··· 348 348 struct rtnexthop *nhp; 349 349 struct nlattr *mp_head; 350 350 351 - if (!(mp_head = nla_nest_start(skb, RTA_MULTIPATH))) 351 + mp_head = nla_nest_start_noflag(skb, RTA_MULTIPATH); 352 + if (!mp_head) 352 353 goto errout; 353 354 354 355 for_nexthops(fi) {
+18 -16
net/ieee802154/nl802154.c
··· 312 312 static int 313 313 nl802154_put_flags(struct sk_buff *msg, int attr, u32 mask) 314 314 { 315 - struct nlattr *nl_flags = nla_nest_start(msg, attr); 315 + struct nlattr *nl_flags = nla_nest_start_noflag(msg, attr); 316 316 int i; 317 317 318 318 if (!nl_flags) ··· 338 338 struct nlattr *nl_page; 339 339 unsigned long page; 340 340 341 - nl_page = nla_nest_start(msg, NL802154_ATTR_CHANNELS_SUPPORTED); 341 + nl_page = nla_nest_start_noflag(msg, NL802154_ATTR_CHANNELS_SUPPORTED); 342 342 if (!nl_page) 343 343 return -ENOBUFS; 344 344 ··· 360 360 struct nlattr *nl_caps, *nl_channels; 361 361 int i; 362 362 363 - nl_caps = nla_nest_start(msg, NL802154_ATTR_WPAN_PHY_CAPS); 363 + nl_caps = nla_nest_start_noflag(msg, NL802154_ATTR_WPAN_PHY_CAPS); 364 364 if (!nl_caps) 365 365 return -ENOBUFS; 366 366 367 - nl_channels = nla_nest_start(msg, NL802154_CAP_ATTR_CHANNELS); 367 + nl_channels = nla_nest_start_noflag(msg, NL802154_CAP_ATTR_CHANNELS); 368 368 if (!nl_channels) 369 369 return -ENOBUFS; 370 370 ··· 380 380 if (rdev->wpan_phy.flags & WPAN_PHY_FLAG_CCA_ED_LEVEL) { 381 381 struct nlattr *nl_ed_lvls; 382 382 383 - nl_ed_lvls = nla_nest_start(msg, 384 - NL802154_CAP_ATTR_CCA_ED_LEVELS); 383 + nl_ed_lvls = nla_nest_start_noflag(msg, 384 + NL802154_CAP_ATTR_CCA_ED_LEVELS); 385 385 if (!nl_ed_lvls) 386 386 return -ENOBUFS; 387 387 ··· 396 396 if (rdev->wpan_phy.flags & WPAN_PHY_FLAG_TXPOWER) { 397 397 struct nlattr *nl_tx_pwrs; 398 398 399 - nl_tx_pwrs = nla_nest_start(msg, NL802154_CAP_ATTR_TX_POWERS); 399 + nl_tx_pwrs = nla_nest_start_noflag(msg, 400 + NL802154_CAP_ATTR_TX_POWERS); 400 401 if (!nl_tx_pwrs) 401 402 return -ENOBUFS; 402 403 ··· 505 504 if (nl802154_put_capabilities(msg, rdev)) 506 505 goto nla_put_failure; 507 506 508 - nl_cmds = nla_nest_start(msg, NL802154_ATTR_SUPPORTED_COMMANDS); 507 + nl_cmds = nla_nest_start_noflag(msg, NL802154_ATTR_SUPPORTED_COMMANDS); 509 508 if (!nl_cmds) 510 509 goto nla_put_failure; 511 510 ··· 694 693 695 694 switch (desc->mode) { 696 695 case NL802154_KEY_ID_MODE_IMPLICIT: 697 - nl_dev_addr = nla_nest_start(msg, NL802154_KEY_ID_ATTR_IMPLICIT); 696 + nl_dev_addr = nla_nest_start_noflag(msg, 697 + NL802154_KEY_ID_ATTR_IMPLICIT); 698 698 if (!nl_dev_addr) 699 699 return -ENOBUFS; 700 700 ··· 770 768 params.frame_counter)) 771 769 return -ENOBUFS; 772 770 773 - nl_key_id = nla_nest_start(msg, NL802154_ATTR_SEC_OUT_KEY_ID); 771 + nl_key_id = nla_nest_start_noflag(msg, NL802154_ATTR_SEC_OUT_KEY_ID); 774 772 if (!nl_key_id) 775 773 return -ENOBUFS; 776 774 ··· 1457 1455 if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) 1458 1456 goto nla_put_failure; 1459 1457 1460 - nl_key = nla_nest_start(msg, NL802154_ATTR_SEC_KEY); 1458 + nl_key = nla_nest_start_noflag(msg, NL802154_ATTR_SEC_KEY); 1461 1459 if (!nl_key) 1462 1460 goto nla_put_failure; 1463 1461 1464 - nl_key_id = nla_nest_start(msg, NL802154_KEY_ATTR_ID); 1462 + nl_key_id = nla_nest_start_noflag(msg, NL802154_KEY_ATTR_ID); 1465 1463 if (!nl_key_id) 1466 1464 goto nla_put_failure; 1467 1465 ··· 1641 1639 if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) 1642 1640 goto nla_put_failure; 1643 1641 1644 - nl_device = nla_nest_start(msg, NL802154_ATTR_SEC_DEVICE); 1642 + nl_device = nla_nest_start_noflag(msg, NL802154_ATTR_SEC_DEVICE); 1645 1643 if (!nl_device) 1646 1644 goto nla_put_failure; 1647 1645 ··· 1810 1808 if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) 1811 1809 goto nla_put_failure; 1812 1810 1813 - nl_devkey = nla_nest_start(msg, NL802154_ATTR_SEC_DEVKEY); 1811 + nl_devkey = nla_nest_start_noflag(msg, NL802154_ATTR_SEC_DEVKEY); 1814 1812 if (!nl_devkey) 1815 1813 goto nla_put_failure; 1816 1814 ··· 1820 1818 devkey->frame_counter)) 1821 1819 goto nla_put_failure; 1822 1820 1823 - nl_key_id = nla_nest_start(msg, NL802154_DEVKEY_ATTR_ID); 1821 + nl_key_id = nla_nest_start_noflag(msg, NL802154_DEVKEY_ATTR_ID); 1824 1822 if (!nl_key_id) 1825 1823 goto nla_put_failure; 1826 1824 ··· 1978 1976 if (nla_put_u32(msg, NL802154_ATTR_IFINDEX, dev->ifindex)) 1979 1977 goto nla_put_failure; 1980 1978 1981 - nl_seclevel = nla_nest_start(msg, NL802154_ATTR_SEC_LEVEL); 1979 + nl_seclevel = nla_nest_start_noflag(msg, NL802154_ATTR_SEC_LEVEL); 1982 1980 if (!nl_seclevel) 1983 1981 goto nla_put_failure; 1984 1982
+1 -1
net/ipv4/fib_semantics.c
··· 1550 1550 { 1551 1551 struct nlattr *mp; 1552 1552 1553 - mp = nla_nest_start(skb, RTA_MULTIPATH); 1553 + mp = nla_nest_start_noflag(skb, RTA_MULTIPATH); 1554 1554 if (!mp) 1555 1555 goto nla_put_failure; 1556 1556
+3 -3
net/ipv4/ipmr.c
··· 2783 2783 return true; 2784 2784 2785 2785 vif = &mrt->vif_table[vifid]; 2786 - vif_nest = nla_nest_start(skb, IPMRA_VIF); 2786 + vif_nest = nla_nest_start_noflag(skb, IPMRA_VIF); 2787 2787 if (!vif_nest) 2788 2788 return false; 2789 2789 if (nla_put_u32(skb, IPMRA_VIFA_IFINDEX, vif->dev->ifindex) || ··· 2867 2867 memset(hdr, 0, sizeof(*hdr)); 2868 2868 hdr->ifi_family = RTNL_FAMILY_IPMR; 2869 2869 2870 - af = nla_nest_start(skb, IFLA_AF_SPEC); 2870 + af = nla_nest_start_noflag(skb, IFLA_AF_SPEC); 2871 2871 if (!af) { 2872 2872 nlmsg_cancel(skb, nlh); 2873 2873 goto out; ··· 2878 2878 goto out; 2879 2879 } 2880 2880 2881 - vifs = nla_nest_start(skb, IPMRA_TABLE_VIFS); 2881 + vifs = nla_nest_start_noflag(skb, IPMRA_TABLE_VIFS); 2882 2882 if (!vifs) { 2883 2883 nla_nest_end(skb, af); 2884 2884 nlmsg_end(skb, nlh);
+1 -1
net/ipv4/ipmr_base.c
··· 228 228 if (c->mfc_flags & MFC_OFFLOAD) 229 229 rtm->rtm_flags |= RTNH_F_OFFLOAD; 230 230 231 - mp_attr = nla_nest_start(skb, RTA_MULTIPATH); 231 + mp_attr = nla_nest_start_noflag(skb, RTA_MULTIPATH); 232 232 if (!mp_attr) 233 233 return -EMSGSIZE; 234 234
+1 -1
net/ipv4/tcp_metrics.c
··· 658 658 { 659 659 int n = 0; 660 660 661 - nest = nla_nest_start(msg, TCP_METRICS_ATTR_VALS); 661 + nest = nla_nest_start_noflag(msg, TCP_METRICS_ATTR_VALS); 662 662 if (!nest) 663 663 goto nla_put_failure; 664 664 for (i = 0; i < TCP_METRIC_MAX_KERNEL + 1; i++) {
+1 -1
net/ipv6/addrconf.c
··· 5752 5752 nla_put_u8(skb, IFLA_OPERSTATE, 5753 5753 netif_running(dev) ? dev->operstate : IF_OPER_DOWN)) 5754 5754 goto nla_put_failure; 5755 - protoinfo = nla_nest_start(skb, IFLA_PROTINFO); 5755 + protoinfo = nla_nest_start_noflag(skb, IFLA_PROTINFO); 5756 5756 if (!protoinfo) 5757 5757 goto nla_put_failure; 5758 5758
+1 -1
net/ipv6/route.c
··· 4777 4777 struct fib6_info *sibling, *next_sibling; 4778 4778 struct nlattr *mp; 4779 4779 4780 - mp = nla_nest_start(skb, RTA_MULTIPATH); 4780 + mp = nla_nest_start_noflag(skb, RTA_MULTIPATH); 4781 4781 if (!mp) 4782 4782 goto nla_put_failure; 4783 4783
+1 -1
net/ipv6/seg6_local.c
··· 853 853 if (!slwt->bpf.prog) 854 854 return 0; 855 855 856 - nest = nla_nest_start(skb, SEG6_LOCAL_BPF); 856 + nest = nla_nest_start_noflag(skb, SEG6_LOCAL_BPF); 857 857 if (!nest) 858 858 return -EMSGSIZE; 859 859
+2 -2
net/l2tp/l2tp_netlink.c
··· 345 345 nla_put_u16(skb, L2TP_ATTR_ENCAP_TYPE, tunnel->encap)) 346 346 goto nla_put_failure; 347 347 348 - nest = nla_nest_start(skb, L2TP_ATTR_STATS); 348 + nest = nla_nest_start_noflag(skb, L2TP_ATTR_STATS); 349 349 if (nest == NULL) 350 350 goto nla_put_failure; 351 351 ··· 742 742 session->reorder_timeout, L2TP_ATTR_PAD))) 743 743 goto nla_put_failure; 744 744 745 - nest = nla_nest_start(skb, L2TP_ATTR_STATS); 745 + nest = nla_nest_start_noflag(skb, L2TP_ATTR_STATS); 746 746 if (nest == NULL) 747 747 goto nla_put_failure; 748 748
+1 -1
net/mpls/af_mpls.c
··· 2017 2017 u8 linkdown = 0; 2018 2018 u8 dead = 0; 2019 2019 2020 - mp = nla_nest_start(skb, RTA_MULTIPATH); 2020 + mp = nla_nest_start_noflag(skb, RTA_MULTIPATH); 2021 2021 if (!mp) 2022 2022 goto nla_put_failure; 2023 2023
+6 -6
net/ncsi/ncsi-netlink.c
··· 79 79 nla_put_u32(skb, NCSI_CHANNEL_ATTR_VERSION_MINOR, nc->version.alpha2); 80 80 nla_put_string(skb, NCSI_CHANNEL_ATTR_VERSION_STR, nc->version.fw_name); 81 81 82 - vid_nest = nla_nest_start(skb, NCSI_CHANNEL_ATTR_VLAN_LIST); 82 + vid_nest = nla_nest_start_noflag(skb, NCSI_CHANNEL_ATTR_VLAN_LIST); 83 83 if (!vid_nest) 84 84 return -ENOMEM; 85 85 ncf = &nc->vlan_filter; ··· 113 113 NCSI_FOR_EACH_PACKAGE(ndp, np) { 114 114 if (np->id != id) 115 115 continue; 116 - pnest = nla_nest_start(skb, NCSI_PKG_ATTR); 116 + pnest = nla_nest_start_noflag(skb, NCSI_PKG_ATTR); 117 117 if (!pnest) 118 118 return -ENOMEM; 119 119 nla_put_u32(skb, NCSI_PKG_ATTR_ID, np->id); 120 120 if ((0x1 << np->id) == ndp->package_whitelist) 121 121 nla_put_flag(skb, NCSI_PKG_ATTR_FORCED); 122 - cnest = nla_nest_start(skb, NCSI_PKG_ATTR_CHANNEL_LIST); 122 + cnest = nla_nest_start_noflag(skb, NCSI_PKG_ATTR_CHANNEL_LIST); 123 123 if (!cnest) { 124 124 nla_nest_cancel(skb, pnest); 125 125 return -ENOMEM; 126 126 } 127 127 NCSI_FOR_EACH_CHANNEL(np, nc) { 128 - nest = nla_nest_start(skb, NCSI_CHANNEL_ATTR); 128 + nest = nla_nest_start_noflag(skb, NCSI_CHANNEL_ATTR); 129 129 if (!nest) { 130 130 nla_nest_cancel(skb, cnest); 131 131 nla_nest_cancel(skb, pnest); ··· 187 187 188 188 package_id = nla_get_u32(info->attrs[NCSI_ATTR_PACKAGE_ID]); 189 189 190 - attr = nla_nest_start(skb, NCSI_ATTR_PACKAGE_LIST); 190 + attr = nla_nest_start_noflag(skb, NCSI_ATTR_PACKAGE_LIST); 191 191 if (!attr) { 192 192 kfree_skb(skb); 193 193 return -EMSGSIZE; ··· 250 250 goto err; 251 251 } 252 252 253 - attr = nla_nest_start(skb, NCSI_ATTR_PACKAGE_LIST); 253 + attr = nla_nest_start_noflag(skb, NCSI_ATTR_PACKAGE_LIST); 254 254 if (!attr) { 255 255 rc = -EMSGSIZE; 256 256 goto err;
+7 -7
net/netfilter/ipset/ip_set_bitmap_gen.h
··· 99 99 struct nlattr *nested; 100 100 size_t memsize = mtype_memsize(map, set->dsize) + set->ext_size; 101 101 102 - nested = ipset_nest_start(skb, IPSET_ATTR_DATA); 102 + nested = nla_nest_start(skb, IPSET_ATTR_DATA); 103 103 if (!nested) 104 104 goto nla_put_failure; 105 105 if (mtype_do_head(skb, map) || ··· 109 109 goto nla_put_failure; 110 110 if (unlikely(ip_set_put_flags(skb, set))) 111 111 goto nla_put_failure; 112 - ipset_nest_end(skb, nested); 112 + nla_nest_end(skb, nested); 113 113 114 114 return 0; 115 115 nla_put_failure: ··· 213 213 u32 id, first = cb->args[IPSET_CB_ARG0]; 214 214 int ret = 0; 215 215 216 - adt = ipset_nest_start(skb, IPSET_ATTR_ADT); 216 + adt = nla_nest_start(skb, IPSET_ATTR_ADT); 217 217 if (!adt) 218 218 return -EMSGSIZE; 219 219 /* Extensions may be replaced */ ··· 230 230 #endif 231 231 ip_set_timeout_expired(ext_timeout(x, set)))) 232 232 continue; 233 - nested = ipset_nest_start(skb, IPSET_ATTR_DATA); 233 + nested = nla_nest_start(skb, IPSET_ATTR_DATA); 234 234 if (!nested) { 235 235 if (id == first) { 236 236 nla_nest_cancel(skb, adt); ··· 244 244 goto nla_put_failure; 245 245 if (ip_set_put_extensions(skb, set, x, mtype_is_filled(x))) 246 246 goto nla_put_failure; 247 - ipset_nest_end(skb, nested); 247 + nla_nest_end(skb, nested); 248 248 } 249 - ipset_nest_end(skb, adt); 249 + nla_nest_end(skb, adt); 250 250 251 251 /* Set listing finished */ 252 252 cb->args[IPSET_CB_ARG0] = 0; ··· 259 259 cb->args[IPSET_CB_ARG0] = 0; 260 260 ret = -EMSGSIZE; 261 261 } 262 - ipset_nest_end(skb, adt); 262 + nla_nest_end(skb, adt); 263 263 out: 264 264 rcu_read_unlock(); 265 265 return ret;
+7 -7
net/netfilter/ipset/ip_set_hash_gen.h
··· 1057 1057 htable_bits = t->htable_bits; 1058 1058 rcu_read_unlock_bh(); 1059 1059 1060 - nested = ipset_nest_start(skb, IPSET_ATTR_DATA); 1060 + nested = nla_nest_start(skb, IPSET_ATTR_DATA); 1061 1061 if (!nested) 1062 1062 goto nla_put_failure; 1063 1063 if (nla_put_net32(skb, IPSET_ATTR_HASHSIZE, ··· 1079 1079 goto nla_put_failure; 1080 1080 if (unlikely(ip_set_put_flags(skb, set))) 1081 1081 goto nla_put_failure; 1082 - ipset_nest_end(skb, nested); 1082 + nla_nest_end(skb, nested); 1083 1083 1084 1084 return 0; 1085 1085 nla_put_failure: ··· 1124 1124 void *incomplete; 1125 1125 int i, ret = 0; 1126 1126 1127 - atd = ipset_nest_start(skb, IPSET_ATTR_ADT); 1127 + atd = nla_nest_start(skb, IPSET_ATTR_ADT); 1128 1128 if (!atd) 1129 1129 return -EMSGSIZE; 1130 1130 ··· 1150 1150 continue; 1151 1151 pr_debug("list hash %lu hbucket %p i %u, data %p\n", 1152 1152 cb->args[IPSET_CB_ARG0], n, i, e); 1153 - nested = ipset_nest_start(skb, IPSET_ATTR_DATA); 1153 + nested = nla_nest_start(skb, IPSET_ATTR_DATA); 1154 1154 if (!nested) { 1155 1155 if (cb->args[IPSET_CB_ARG0] == first) { 1156 1156 nla_nest_cancel(skb, atd); ··· 1163 1163 goto nla_put_failure; 1164 1164 if (ip_set_put_extensions(skb, set, e, true)) 1165 1165 goto nla_put_failure; 1166 - ipset_nest_end(skb, nested); 1166 + nla_nest_end(skb, nested); 1167 1167 } 1168 1168 } 1169 - ipset_nest_end(skb, atd); 1169 + nla_nest_end(skb, atd); 1170 1170 /* Set listing finished */ 1171 1171 cb->args[IPSET_CB_ARG0] = 0; 1172 1172 ··· 1180 1180 cb->args[IPSET_CB_ARG0] = 0; 1181 1181 ret = -EMSGSIZE; 1182 1182 } else { 1183 - ipset_nest_end(skb, atd); 1183 + nla_nest_end(skb, atd); 1184 1184 } 1185 1185 out: 1186 1186 rcu_read_unlock();
+7 -7
net/netfilter/ipset/ip_set_list_set.c
··· 466 466 struct nlattr *nested; 467 467 size_t memsize = list_set_memsize(map, set->dsize) + set->ext_size; 468 468 469 - nested = ipset_nest_start(skb, IPSET_ATTR_DATA); 469 + nested = nla_nest_start(skb, IPSET_ATTR_DATA); 470 470 if (!nested) 471 471 goto nla_put_failure; 472 472 if (nla_put_net32(skb, IPSET_ATTR_SIZE, htonl(map->size)) || ··· 476 476 goto nla_put_failure; 477 477 if (unlikely(ip_set_put_flags(skb, set))) 478 478 goto nla_put_failure; 479 - ipset_nest_end(skb, nested); 479 + nla_nest_end(skb, nested); 480 480 481 481 return 0; 482 482 nla_put_failure: ··· 494 494 struct set_elem *e; 495 495 int ret = 0; 496 496 497 - atd = ipset_nest_start(skb, IPSET_ATTR_ADT); 497 + atd = nla_nest_start(skb, IPSET_ATTR_ADT); 498 498 if (!atd) 499 499 return -EMSGSIZE; 500 500 ··· 506 506 i++; 507 507 continue; 508 508 } 509 - nested = ipset_nest_start(skb, IPSET_ATTR_DATA); 509 + nested = nla_nest_start(skb, IPSET_ATTR_DATA); 510 510 if (!nested) 511 511 goto nla_put_failure; 512 512 ip_set_name_byindex(map->net, e->id, name); ··· 514 514 goto nla_put_failure; 515 515 if (ip_set_put_extensions(skb, set, e, true)) 516 516 goto nla_put_failure; 517 - ipset_nest_end(skb, nested); 517 + nla_nest_end(skb, nested); 518 518 i++; 519 519 } 520 520 521 - ipset_nest_end(skb, atd); 521 + nla_nest_end(skb, atd); 522 522 /* Set listing finished */ 523 523 cb->args[IPSET_CB_ARG0] = 0; 524 524 goto out; ··· 531 531 ret = -EMSGSIZE; 532 532 } else { 533 533 cb->args[IPSET_CB_ARG0] = i; 534 - ipset_nest_end(skb, atd); 534 + nla_nest_end(skb, atd); 535 535 } 536 536 out: 537 537 rcu_read_unlock();
+5 -5
net/netfilter/ipvs/ip_vs_ctl.c
··· 2916 2916 static int ip_vs_genl_fill_stats(struct sk_buff *skb, int container_type, 2917 2917 struct ip_vs_kstats *kstats) 2918 2918 { 2919 - struct nlattr *nl_stats = nla_nest_start(skb, container_type); 2919 + struct nlattr *nl_stats = nla_nest_start_noflag(skb, container_type); 2920 2920 2921 2921 if (!nl_stats) 2922 2922 return -EMSGSIZE; ··· 2946 2946 static int ip_vs_genl_fill_stats64(struct sk_buff *skb, int container_type, 2947 2947 struct ip_vs_kstats *kstats) 2948 2948 { 2949 - struct nlattr *nl_stats = nla_nest_start(skb, container_type); 2949 + struct nlattr *nl_stats = nla_nest_start_noflag(skb, container_type); 2950 2950 2951 2951 if (!nl_stats) 2952 2952 return -EMSGSIZE; ··· 2992 2992 struct ip_vs_kstats kstats; 2993 2993 char *sched_name; 2994 2994 2995 - nl_service = nla_nest_start(skb, IPVS_CMD_ATTR_SERVICE); 2995 + nl_service = nla_nest_start_noflag(skb, IPVS_CMD_ATTR_SERVICE); 2996 2996 if (!nl_service) 2997 2997 return -EMSGSIZE; 2998 2998 ··· 3203 3203 struct nlattr *nl_dest; 3204 3204 struct ip_vs_kstats kstats; 3205 3205 3206 - nl_dest = nla_nest_start(skb, IPVS_CMD_ATTR_DEST); 3206 + nl_dest = nla_nest_start_noflag(skb, IPVS_CMD_ATTR_DEST); 3207 3207 if (!nl_dest) 3208 3208 return -EMSGSIZE; 3209 3209 ··· 3373 3373 { 3374 3374 struct nlattr *nl_daemon; 3375 3375 3376 - nl_daemon = nla_nest_start(skb, IPVS_CMD_ATTR_DAEMON); 3376 + nl_daemon = nla_nest_start_noflag(skb, IPVS_CMD_ATTR_DAEMON); 3377 3377 if (!nl_daemon) 3378 3378 return -EMSGSIZE; 3379 3379
+20 -20
net/netfilter/nf_conntrack_netlink.c
··· 63 63 int ret = 0; 64 64 struct nlattr *nest_parms; 65 65 66 - nest_parms = nla_nest_start(skb, CTA_TUPLE_PROTO | NLA_F_NESTED); 66 + nest_parms = nla_nest_start(skb, CTA_TUPLE_PROTO); 67 67 if (!nest_parms) 68 68 goto nla_put_failure; 69 69 if (nla_put_u8(skb, CTA_PROTO_NUM, tuple->dst.protonum)) ··· 104 104 int ret = 0; 105 105 struct nlattr *nest_parms; 106 106 107 - nest_parms = nla_nest_start(skb, CTA_TUPLE_IP | NLA_F_NESTED); 107 + nest_parms = nla_nest_start(skb, CTA_TUPLE_IP); 108 108 if (!nest_parms) 109 109 goto nla_put_failure; 110 110 ··· 187 187 if (!l4proto->to_nlattr) 188 188 return 0; 189 189 190 - nest_proto = nla_nest_start(skb, CTA_PROTOINFO | NLA_F_NESTED); 190 + nest_proto = nla_nest_start(skb, CTA_PROTOINFO); 191 191 if (!nest_proto) 192 192 goto nla_put_failure; 193 193 ··· 215 215 if (!helper) 216 216 goto out; 217 217 218 - nest_helper = nla_nest_start(skb, CTA_HELP | NLA_F_NESTED); 218 + nest_helper = nla_nest_start(skb, CTA_HELP); 219 219 if (!nest_helper) 220 220 goto nla_put_failure; 221 221 if (nla_put_string(skb, CTA_HELP_NAME, helper->name)) ··· 249 249 bytes = atomic64_read(&counter[dir].bytes); 250 250 } 251 251 252 - nest_count = nla_nest_start(skb, attr | NLA_F_NESTED); 252 + nest_count = nla_nest_start(skb, attr); 253 253 if (!nest_count) 254 254 goto nla_put_failure; 255 255 ··· 293 293 if (!tstamp) 294 294 return 0; 295 295 296 - nest_count = nla_nest_start(skb, CTA_TIMESTAMP | NLA_F_NESTED); 296 + nest_count = nla_nest_start(skb, CTA_TIMESTAMP); 297 297 if (!nest_count) 298 298 goto nla_put_failure; 299 299 ··· 337 337 return 0; 338 338 339 339 ret = -1; 340 - nest_secctx = nla_nest_start(skb, CTA_SECCTX | NLA_F_NESTED); 340 + nest_secctx = nla_nest_start(skb, CTA_SECCTX); 341 341 if (!nest_secctx) 342 342 goto nla_put_failure; 343 343 ··· 397 397 if (!(ct->status & IPS_EXPECTED)) 398 398 return 0; 399 399 400 - nest_parms = nla_nest_start(skb, CTA_TUPLE_MASTER | NLA_F_NESTED); 400 + nest_parms = nla_nest_start(skb, CTA_TUPLE_MASTER); 401 401 if (!nest_parms) 402 402 goto nla_put_failure; 403 403 if (ctnetlink_dump_tuples(skb, master_tuple(ct)) < 0) ··· 415 415 { 416 416 struct nlattr *nest_parms; 417 417 418 - nest_parms = nla_nest_start(skb, type | NLA_F_NESTED); 418 + nest_parms = nla_nest_start(skb, type); 419 419 if (!nest_parms) 420 420 goto nla_put_failure; 421 421 ··· 467 467 if (!synproxy) 468 468 return 0; 469 469 470 - nest_parms = nla_nest_start(skb, CTA_SYNPROXY | NLA_F_NESTED); 470 + nest_parms = nla_nest_start(skb, CTA_SYNPROXY); 471 471 if (!nest_parms) 472 472 goto nla_put_failure; 473 473 ··· 528 528 529 529 zone = nf_ct_zone(ct); 530 530 531 - nest_parms = nla_nest_start(skb, CTA_TUPLE_ORIG | NLA_F_NESTED); 531 + nest_parms = nla_nest_start(skb, CTA_TUPLE_ORIG); 532 532 if (!nest_parms) 533 533 goto nla_put_failure; 534 534 if (ctnetlink_dump_tuples(skb, nf_ct_tuple(ct, IP_CT_DIR_ORIGINAL)) < 0) ··· 538 538 goto nla_put_failure; 539 539 nla_nest_end(skb, nest_parms); 540 540 541 - nest_parms = nla_nest_start(skb, CTA_TUPLE_REPLY | NLA_F_NESTED); 541 + nest_parms = nla_nest_start(skb, CTA_TUPLE_REPLY); 542 542 if (!nest_parms) 543 543 goto nla_put_failure; 544 544 if (ctnetlink_dump_tuples(skb, nf_ct_tuple(ct, IP_CT_DIR_REPLY)) < 0) ··· 720 720 721 721 zone = nf_ct_zone(ct); 722 722 723 - nest_parms = nla_nest_start(skb, CTA_TUPLE_ORIG | NLA_F_NESTED); 723 + nest_parms = nla_nest_start(skb, CTA_TUPLE_ORIG); 724 724 if (!nest_parms) 725 725 goto nla_put_failure; 726 726 if (ctnetlink_dump_tuples(skb, nf_ct_tuple(ct, IP_CT_DIR_ORIGINAL)) < 0) ··· 730 730 goto nla_put_failure; 731 731 nla_nest_end(skb, nest_parms); 732 732 733 - nest_parms = nla_nest_start(skb, CTA_TUPLE_REPLY | NLA_F_NESTED); 733 + nest_parms = nla_nest_start(skb, CTA_TUPLE_REPLY); 734 734 if (!nest_parms) 735 735 goto nla_put_failure; 736 736 if (ctnetlink_dump_tuples(skb, nf_ct_tuple(ct, IP_CT_DIR_REPLY)) < 0) ··· 2400 2400 2401 2401 zone = nf_ct_zone(ct); 2402 2402 2403 - nest_parms = nla_nest_start(skb, CTA_TUPLE_ORIG | NLA_F_NESTED); 2403 + nest_parms = nla_nest_start(skb, CTA_TUPLE_ORIG); 2404 2404 if (!nest_parms) 2405 2405 goto nla_put_failure; 2406 2406 if (ctnetlink_dump_tuples(skb, nf_ct_tuple(ct, IP_CT_DIR_ORIGINAL)) < 0) ··· 2410 2410 goto nla_put_failure; 2411 2411 nla_nest_end(skb, nest_parms); 2412 2412 2413 - nest_parms = nla_nest_start(skb, CTA_TUPLE_REPLY | NLA_F_NESTED); 2413 + nest_parms = nla_nest_start(skb, CTA_TUPLE_REPLY); 2414 2414 if (!nest_parms) 2415 2415 goto nla_put_failure; 2416 2416 if (ctnetlink_dump_tuples(skb, nf_ct_tuple(ct, IP_CT_DIR_REPLY)) < 0) ··· 2472 2472 { 2473 2473 struct nlattr *nest_parms; 2474 2474 2475 - nest_parms = nla_nest_start(skb, ct_attr | NLA_F_NESTED); 2475 + nest_parms = nla_nest_start(skb, ct_attr); 2476 2476 if (!nest_parms) 2477 2477 goto nla_put_failure; 2478 2478 ··· 2644 2644 { 2645 2645 struct nlattr *nest_parms; 2646 2646 2647 - nest_parms = nla_nest_start(skb, type | NLA_F_NESTED); 2647 + nest_parms = nla_nest_start(skb, type); 2648 2648 if (!nest_parms) 2649 2649 goto nla_put_failure; 2650 2650 if (ctnetlink_dump_tuples(skb, tuple) < 0) ··· 2671 2671 m.src.u.all = mask->src.u.all; 2672 2672 m.dst.protonum = tuple->dst.protonum; 2673 2673 2674 - nest_parms = nla_nest_start(skb, CTA_EXPECT_MASK | NLA_F_NESTED); 2674 + nest_parms = nla_nest_start(skb, CTA_EXPECT_MASK); 2675 2675 if (!nest_parms) 2676 2676 goto nla_put_failure; 2677 2677 ··· 2743 2743 #if IS_ENABLED(CONFIG_NF_NAT) 2744 2744 if (!nf_inet_addr_cmp(&exp->saved_addr, &any_addr) || 2745 2745 exp->saved_proto.all) { 2746 - nest_parms = nla_nest_start(skb, CTA_EXPECT_NAT | NLA_F_NESTED); 2746 + nest_parms = nla_nest_start(skb, CTA_EXPECT_NAT); 2747 2747 if (!nest_parms) 2748 2748 goto nla_put_failure; 2749 2749
+1 -1
net/netfilter/nf_conntrack_proto_dccp.c
··· 598 598 struct nlattr *nest_parms; 599 599 600 600 spin_lock_bh(&ct->lock); 601 - nest_parms = nla_nest_start(skb, CTA_PROTOINFO_DCCP | NLA_F_NESTED); 601 + nest_parms = nla_nest_start(skb, CTA_PROTOINFO_DCCP); 602 602 if (!nest_parms) 603 603 goto nla_put_failure; 604 604 if (nla_put_u8(skb, CTA_PROTOINFO_DCCP_STATE, ct->proto.dccp.state) ||
+1 -1
net/netfilter/nf_conntrack_proto_sctp.c
··· 520 520 struct nlattr *nest_parms; 521 521 522 522 spin_lock_bh(&ct->lock); 523 - nest_parms = nla_nest_start(skb, CTA_PROTOINFO_SCTP | NLA_F_NESTED); 523 + nest_parms = nla_nest_start(skb, CTA_PROTOINFO_SCTP); 524 524 if (!nest_parms) 525 525 goto nla_put_failure; 526 526
+1 -1
net/netfilter/nf_conntrack_proto_tcp.c
··· 1192 1192 struct nf_ct_tcp_flags tmp = {}; 1193 1193 1194 1194 spin_lock_bh(&ct->lock); 1195 - nest_parms = nla_nest_start(skb, CTA_PROTOINFO_TCP | NLA_F_NESTED); 1195 + nest_parms = nla_nest_start(skb, CTA_PROTOINFO_TCP); 1196 1196 if (!nest_parms) 1197 1197 goto nla_put_failure; 1198 1198
+15 -14
net/netfilter/nf_tables_api.c
··· 1200 1200 total.pkts += pkts; 1201 1201 total.bytes += bytes; 1202 1202 } 1203 - nest = nla_nest_start(skb, NFTA_CHAIN_COUNTERS); 1203 + nest = nla_nest_start_noflag(skb, NFTA_CHAIN_COUNTERS); 1204 1204 if (nest == NULL) 1205 1205 goto nla_put_failure; 1206 1206 ··· 1248 1248 const struct nf_hook_ops *ops = &basechain->ops; 1249 1249 struct nlattr *nest; 1250 1250 1251 - nest = nla_nest_start(skb, NFTA_CHAIN_HOOK); 1251 + nest = nla_nest_start_noflag(skb, NFTA_CHAIN_HOOK); 1252 1252 if (nest == NULL) 1253 1253 goto nla_put_failure; 1254 1254 if (nla_put_be32(skb, NFTA_HOOK_HOOKNUM, htonl(ops->hooknum))) ··· 2059 2059 goto nla_put_failure; 2060 2060 2061 2061 if (expr->ops->dump) { 2062 - struct nlattr *data = nla_nest_start(skb, NFTA_EXPR_DATA); 2062 + struct nlattr *data = nla_nest_start_noflag(skb, 2063 + NFTA_EXPR_DATA); 2063 2064 if (data == NULL) 2064 2065 goto nla_put_failure; 2065 2066 if (expr->ops->dump(skb, expr) < 0) ··· 2079 2078 { 2080 2079 struct nlattr *nest; 2081 2080 2082 - nest = nla_nest_start(skb, attr); 2081 + nest = nla_nest_start_noflag(skb, attr); 2083 2082 if (!nest) 2084 2083 goto nla_put_failure; 2085 2084 if (nf_tables_fill_expr_info(skb, expr) < 0) ··· 2290 2289 goto nla_put_failure; 2291 2290 } 2292 2291 2293 - list = nla_nest_start(skb, NFTA_RULE_EXPRESSIONS); 2292 + list = nla_nest_start_noflag(skb, NFTA_RULE_EXPRESSIONS); 2294 2293 if (list == NULL) 2295 2294 goto nla_put_failure; 2296 2295 nft_rule_for_each_expr(expr, next, rule) { ··· 3259 3258 if (nla_put(skb, NFTA_SET_USERDATA, set->udlen, set->udata)) 3260 3259 goto nla_put_failure; 3261 3260 3262 - desc = nla_nest_start(skb, NFTA_SET_DESC); 3261 + desc = nla_nest_start_noflag(skb, NFTA_SET_DESC); 3263 3262 if (desc == NULL) 3264 3263 goto nla_put_failure; 3265 3264 if (set->size && ··· 3909 3908 unsigned char *b = skb_tail_pointer(skb); 3910 3909 struct nlattr *nest; 3911 3910 3912 - nest = nla_nest_start(skb, NFTA_LIST_ELEM); 3911 + nest = nla_nest_start_noflag(skb, NFTA_LIST_ELEM); 3913 3912 if (nest == NULL) 3914 3913 goto nla_put_failure; 3915 3914 ··· 4053 4052 if (nla_put_string(skb, NFTA_SET_ELEM_LIST_SET, set->name)) 4054 4053 goto nla_put_failure; 4055 4054 4056 - nest = nla_nest_start(skb, NFTA_SET_ELEM_LIST_ELEMENTS); 4055 + nest = nla_nest_start_noflag(skb, NFTA_SET_ELEM_LIST_ELEMENTS); 4057 4056 if (nest == NULL) 4058 4057 goto nla_put_failure; 4059 4058 ··· 4125 4124 if (nla_put_string(skb, NFTA_SET_NAME, set->name)) 4126 4125 goto nla_put_failure; 4127 4126 4128 - nest = nla_nest_start(skb, NFTA_SET_ELEM_LIST_ELEMENTS); 4127 + nest = nla_nest_start_noflag(skb, NFTA_SET_ELEM_LIST_ELEMENTS); 4129 4128 if (nest == NULL) 4130 4129 goto nla_put_failure; 4131 4130 ··· 5015 5014 { 5016 5015 struct nlattr *nest; 5017 5016 5018 - nest = nla_nest_start(skb, attr); 5017 + nest = nla_nest_start_noflag(skb, attr); 5019 5018 if (!nest) 5020 5019 goto nla_put_failure; 5021 5020 if (obj->ops->dump(skb, obj, reset) < 0) ··· 5832 5831 NFTA_FLOWTABLE_PAD)) 5833 5832 goto nla_put_failure; 5834 5833 5835 - nest = nla_nest_start(skb, NFTA_FLOWTABLE_HOOK); 5834 + nest = nla_nest_start_noflag(skb, NFTA_FLOWTABLE_HOOK); 5836 5835 if (!nest) 5837 5836 goto nla_put_failure; 5838 5837 if (nla_put_be32(skb, NFTA_FLOWTABLE_HOOK_NUM, htonl(flowtable->hooknum)) || 5839 5838 nla_put_be32(skb, NFTA_FLOWTABLE_HOOK_PRIORITY, htonl(flowtable->priority))) 5840 5839 goto nla_put_failure; 5841 5840 5842 - nest_devs = nla_nest_start(skb, NFTA_FLOWTABLE_HOOK_DEVS); 5841 + nest_devs = nla_nest_start_noflag(skb, NFTA_FLOWTABLE_HOOK_DEVS); 5843 5842 if (!nest_devs) 5844 5843 goto nla_put_failure; 5845 5844 ··· 7265 7264 { 7266 7265 struct nlattr *nest; 7267 7266 7268 - nest = nla_nest_start(skb, type); 7267 + nest = nla_nest_start_noflag(skb, type); 7269 7268 if (!nest) 7270 7269 goto nla_put_failure; 7271 7270 ··· 7378 7377 struct nlattr *nest; 7379 7378 int err; 7380 7379 7381 - nest = nla_nest_start(skb, attr); 7380 + nest = nla_nest_start_noflag(skb, attr); 7382 7381 if (nest == NULL) 7383 7382 return -1; 7384 7383
+1 -1
net/netfilter/nft_ct.c
··· 928 928 nla_put_be16(skb, NFTA_CT_TIMEOUT_L3PROTO, htons(timeout->l3num))) 929 929 return -1; 930 930 931 - nest_params = nla_nest_start(skb, NFTA_CT_TIMEOUT_DATA | NLA_F_NESTED); 931 + nest_params = nla_nest_start(skb, NFTA_CT_TIMEOUT_DATA); 932 932 if (!nest_params) 933 933 return -1; 934 934
+3 -3
net/netfilter/nft_tunnel.c
··· 437 437 struct nlattr *nest; 438 438 439 439 if (info->mode & IP_TUNNEL_INFO_IPV6) { 440 - nest = nla_nest_start(skb, NFTA_TUNNEL_KEY_IP6); 440 + nest = nla_nest_start_noflag(skb, NFTA_TUNNEL_KEY_IP6); 441 441 if (!nest) 442 442 return -1; 443 443 ··· 448 448 449 449 nla_nest_end(skb, nest); 450 450 } else { 451 - nest = nla_nest_start(skb, NFTA_TUNNEL_KEY_IP); 451 + nest = nla_nest_start_noflag(skb, NFTA_TUNNEL_KEY_IP); 452 452 if (!nest) 453 453 return -1; 454 454 ··· 468 468 struct nft_tunnel_opts *opts = &priv->opts; 469 469 struct nlattr *nest; 470 470 471 - nest = nla_nest_start(skb, NFTA_TUNNEL_KEY_OPTS); 471 + nest = nla_nest_start_noflag(skb, NFTA_TUNNEL_KEY_OPTS); 472 472 if (!nest) 473 473 return -1; 474 474
+9 -5
net/netlabel/netlabel_cipso_v4.c
··· 498 498 if (ret_val != 0) 499 499 goto list_failure_lock; 500 500 501 - nla_a = nla_nest_start(ans_skb, NLBL_CIPSOV4_A_TAGLST); 501 + nla_a = nla_nest_start_noflag(ans_skb, NLBL_CIPSOV4_A_TAGLST); 502 502 if (nla_a == NULL) { 503 503 ret_val = -ENOMEM; 504 504 goto list_failure_lock; ··· 517 517 518 518 switch (doi_def->type) { 519 519 case CIPSO_V4_MAP_TRANS: 520 - nla_a = nla_nest_start(ans_skb, NLBL_CIPSOV4_A_MLSLVLLST); 520 + nla_a = nla_nest_start_noflag(ans_skb, 521 + NLBL_CIPSOV4_A_MLSLVLLST); 521 522 if (nla_a == NULL) { 522 523 ret_val = -ENOMEM; 523 524 goto list_failure_lock; ··· 530 529 CIPSO_V4_INV_LVL) 531 530 continue; 532 531 533 - nla_b = nla_nest_start(ans_skb, NLBL_CIPSOV4_A_MLSLVL); 532 + nla_b = nla_nest_start_noflag(ans_skb, 533 + NLBL_CIPSOV4_A_MLSLVL); 534 534 if (nla_b == NULL) { 535 535 ret_val = -ENOMEM; 536 536 goto list_retry; ··· 550 548 } 551 549 nla_nest_end(ans_skb, nla_a); 552 550 553 - nla_a = nla_nest_start(ans_skb, NLBL_CIPSOV4_A_MLSCATLST); 551 + nla_a = nla_nest_start_noflag(ans_skb, 552 + NLBL_CIPSOV4_A_MLSCATLST); 554 553 if (nla_a == NULL) { 555 554 ret_val = -ENOMEM; 556 555 goto list_retry; ··· 563 560 CIPSO_V4_INV_CAT) 564 561 continue; 565 562 566 - nla_b = nla_nest_start(ans_skb, NLBL_CIPSOV4_A_MLSCAT); 563 + nla_b = nla_nest_start_noflag(ans_skb, 564 + NLBL_CIPSOV4_A_MLSCAT); 567 565 if (nla_b == NULL) { 568 566 ret_val = -ENOMEM; 569 567 goto list_retry;
+5 -3
net/netlabel/netlabel_mgmt.c
··· 315 315 316 316 switch (entry->def.type) { 317 317 case NETLBL_NLTYPE_ADDRSELECT: 318 - nla_a = nla_nest_start(skb, NLBL_MGMT_A_SELECTORLIST); 318 + nla_a = nla_nest_start_noflag(skb, NLBL_MGMT_A_SELECTORLIST); 319 319 if (nla_a == NULL) 320 320 return -ENOMEM; 321 321 ··· 323 323 struct netlbl_domaddr4_map *map4; 324 324 struct in_addr addr_struct; 325 325 326 - nla_b = nla_nest_start(skb, NLBL_MGMT_A_ADDRSELECTOR); 326 + nla_b = nla_nest_start_noflag(skb, 327 + NLBL_MGMT_A_ADDRSELECTOR); 327 328 if (nla_b == NULL) 328 329 return -ENOMEM; 329 330 ··· 358 357 netlbl_af6list_foreach_rcu(iter6, &entry->def.addrsel->list6) { 359 358 struct netlbl_domaddr6_map *map6; 360 359 361 - nla_b = nla_nest_start(skb, NLBL_MGMT_A_ADDRSELECTOR); 360 + nla_b = nla_nest_start_noflag(skb, 361 + NLBL_MGMT_A_ADDRSELECTOR); 362 362 if (nla_b == NULL) 363 363 return -ENOMEM; 364 364
+6 -6
net/netlink/genetlink.c
··· 665 665 struct nlattr *nla_ops; 666 666 int i; 667 667 668 - nla_ops = nla_nest_start(skb, CTRL_ATTR_OPS); 668 + nla_ops = nla_nest_start_noflag(skb, CTRL_ATTR_OPS); 669 669 if (nla_ops == NULL) 670 670 goto nla_put_failure; 671 671 ··· 681 681 if (family->policy) 682 682 op_flags |= GENL_CMD_CAP_HASPOL; 683 683 684 - nest = nla_nest_start(skb, i + 1); 684 + nest = nla_nest_start_noflag(skb, i + 1); 685 685 if (nest == NULL) 686 686 goto nla_put_failure; 687 687 ··· 699 699 struct nlattr *nla_grps; 700 700 int i; 701 701 702 - nla_grps = nla_nest_start(skb, CTRL_ATTR_MCAST_GROUPS); 702 + nla_grps = nla_nest_start_noflag(skb, CTRL_ATTR_MCAST_GROUPS); 703 703 if (nla_grps == NULL) 704 704 goto nla_put_failure; 705 705 ··· 709 709 710 710 grp = &family->mcgrps[i]; 711 711 712 - nest = nla_nest_start(skb, i + 1); 712 + nest = nla_nest_start_noflag(skb, i + 1); 713 713 if (nest == NULL) 714 714 goto nla_put_failure; 715 715 ··· 749 749 nla_put_u16(skb, CTRL_ATTR_FAMILY_ID, family->id)) 750 750 goto nla_put_failure; 751 751 752 - nla_grps = nla_nest_start(skb, CTRL_ATTR_MCAST_GROUPS); 752 + nla_grps = nla_nest_start_noflag(skb, CTRL_ATTR_MCAST_GROUPS); 753 753 if (nla_grps == NULL) 754 754 goto nla_put_failure; 755 755 756 - nest = nla_nest_start(skb, 1); 756 + nest = nla_nest_start_noflag(skb, 1); 757 757 if (nest == NULL) 758 758 goto nla_put_failure; 759 759
+2 -2
net/nfc/netlink.c
··· 392 392 if (nla_put_u32(msg, NFC_ATTR_DEVICE_INDEX, dev->idx)) 393 393 goto nla_put_failure; 394 394 395 - sdp_attr = nla_nest_start(msg, NFC_ATTR_LLC_SDP); 395 + sdp_attr = nla_nest_start_noflag(msg, NFC_ATTR_LLC_SDP); 396 396 if (sdp_attr == NULL) { 397 397 rc = -ENOMEM; 398 398 goto nla_put_failure; ··· 402 402 hlist_for_each_entry_safe(sdres, n, sdres_list, node) { 403 403 pr_debug("uri: %s, sap: %d\n", sdres->uri, sdres->sap); 404 404 405 - uri_attr = nla_nest_start(msg, i++); 405 + uri_attr = nla_nest_start_noflag(msg, i++); 406 406 if (uri_attr == NULL) { 407 407 rc = -ENOMEM; 408 408 goto nla_put_failure;
+3 -3
net/openvswitch/conntrack.c
··· 1683 1683 { 1684 1684 struct nlattr *start; 1685 1685 1686 - start = nla_nest_start(skb, OVS_CT_ATTR_NAT); 1686 + start = nla_nest_start_noflag(skb, OVS_CT_ATTR_NAT); 1687 1687 if (!start) 1688 1688 return false; 1689 1689 ··· 1750 1750 { 1751 1751 struct nlattr *start; 1752 1752 1753 - start = nla_nest_start(skb, OVS_ACTION_ATTR_CT); 1753 + start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_CT); 1754 1754 if (!start) 1755 1755 return -EMSGSIZE; 1756 1756 ··· 2160 2160 if (IS_ERR(reply)) 2161 2161 return PTR_ERR(reply); 2162 2162 2163 - nla_reply = nla_nest_start(reply, OVS_CT_LIMIT_ATTR_ZONE_LIMIT); 2163 + nla_reply = nla_nest_start_noflag(reply, OVS_CT_LIMIT_ATTR_ZONE_LIMIT); 2164 2164 2165 2165 if (a[OVS_CT_LIMIT_ATTR_ZONE_LIMIT]) { 2166 2166 err = ovs_ct_limit_get_zone_limit(
+4 -3
net/openvswitch/datapath.c
··· 463 463 nla_data(upcall_info->userdata)); 464 464 465 465 if (upcall_info->egress_tun_info) { 466 - nla = nla_nest_start(user_skb, OVS_PACKET_ATTR_EGRESS_TUN_KEY); 466 + nla = nla_nest_start_noflag(user_skb, 467 + OVS_PACKET_ATTR_EGRESS_TUN_KEY); 467 468 if (!nla) { 468 469 err = -EMSGSIZE; 469 470 goto out; ··· 476 475 } 477 476 478 477 if (upcall_info->actions_len) { 479 - nla = nla_nest_start(user_skb, OVS_PACKET_ATTR_ACTIONS); 478 + nla = nla_nest_start_noflag(user_skb, OVS_PACKET_ATTR_ACTIONS); 480 479 if (!nla) { 481 480 err = -EMSGSIZE; 482 481 goto out; ··· 777 776 * This can only fail for dump operations because the skb is always 778 777 * properly sized for single flows. 779 778 */ 780 - start = nla_nest_start(skb, OVS_FLOW_ATTR_ACTIONS); 779 + start = nla_nest_start_noflag(skb, OVS_FLOW_ATTR_ACTIONS); 781 780 if (start) { 782 781 const struct sw_flow_actions *sf_acts; 783 782
+17 -16
net/openvswitch/flow_netlink.c
··· 856 856 const struct vxlan_metadata *opts = tun_opts; 857 857 struct nlattr *nla; 858 858 859 - nla = nla_nest_start(skb, OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS); 859 + nla = nla_nest_start_noflag(skb, OVS_TUNNEL_KEY_ATTR_VXLAN_OPTS); 860 860 if (!nla) 861 861 return -EMSGSIZE; 862 862 ··· 948 948 struct nlattr *nla; 949 949 int err; 950 950 951 - nla = nla_nest_start(skb, OVS_KEY_ATTR_TUNNEL); 951 + nla = nla_nest_start_noflag(skb, OVS_KEY_ATTR_TUNNEL); 952 952 if (!nla) 953 953 return -EMSGSIZE; 954 954 ··· 1957 1957 { 1958 1958 struct nlattr *start; 1959 1959 1960 - start = nla_nest_start(skb, OVS_KEY_ATTR_NSH); 1960 + start = nla_nest_start_noflag(skb, OVS_KEY_ATTR_NSH); 1961 1961 if (!start) 1962 1962 return -EMSGSIZE; 1963 1963 ··· 2040 2040 if (swkey->eth.vlan.tci || eth_type_vlan(swkey->eth.type)) { 2041 2041 if (ovs_nla_put_vlan(skb, &output->eth.vlan, is_mask)) 2042 2042 goto nla_put_failure; 2043 - encap = nla_nest_start(skb, OVS_KEY_ATTR_ENCAP); 2043 + encap = nla_nest_start_noflag(skb, OVS_KEY_ATTR_ENCAP); 2044 2044 if (!swkey->eth.vlan.tci) 2045 2045 goto unencap; 2046 2046 2047 2047 if (swkey->eth.cvlan.tci || eth_type_vlan(swkey->eth.type)) { 2048 2048 if (ovs_nla_put_vlan(skb, &output->eth.cvlan, is_mask)) 2049 2049 goto nla_put_failure; 2050 - in_encap = nla_nest_start(skb, OVS_KEY_ATTR_ENCAP); 2050 + in_encap = nla_nest_start_noflag(skb, 2051 + OVS_KEY_ATTR_ENCAP); 2051 2052 if (!swkey->eth.cvlan.tci) 2052 2053 goto unencap; 2053 2054 } ··· 2227 2226 int err; 2228 2227 struct nlattr *nla; 2229 2228 2230 - nla = nla_nest_start(skb, attr); 2229 + nla = nla_nest_start_noflag(skb, attr); 2231 2230 if (!nla) 2232 2231 return -EMSGSIZE; 2233 2232 err = __ovs_nla_put_key(swkey, output, is_mask, skb); ··· 3253 3252 const struct sample_arg *arg; 3254 3253 struct nlattr *actions; 3255 3254 3256 - start = nla_nest_start(skb, OVS_ACTION_ATTR_SAMPLE); 3255 + start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_SAMPLE); 3257 3256 if (!start) 3258 3257 return -EMSGSIZE; 3259 3258 ··· 3266 3265 goto out; 3267 3266 } 3268 3267 3269 - ac_start = nla_nest_start(skb, OVS_SAMPLE_ATTR_ACTIONS); 3268 + ac_start = nla_nest_start_noflag(skb, OVS_SAMPLE_ATTR_ACTIONS); 3270 3269 if (!ac_start) { 3271 3270 err = -EMSGSIZE; 3272 3271 goto out; ··· 3292 3291 struct nlattr *start; 3293 3292 int err = 0, rem = nla_len(attr); 3294 3293 3295 - start = nla_nest_start(skb, OVS_ACTION_ATTR_CLONE); 3294 + start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_CLONE); 3296 3295 if (!start) 3297 3296 return -EMSGSIZE; 3298 3297 ··· 3314 3313 const struct nlattr *a, *cpl_arg; 3315 3314 int err = 0, rem = nla_len(attr); 3316 3315 3317 - start = nla_nest_start(skb, OVS_ACTION_ATTR_CHECK_PKT_LEN); 3316 + start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_CHECK_PKT_LEN); 3318 3317 if (!start) 3319 3318 return -EMSGSIZE; 3320 3319 ··· 3333 3332 * 'OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL'. 3334 3333 */ 3335 3334 a = nla_next(cpl_arg, &rem); 3336 - ac_start = nla_nest_start(skb, 3337 - OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL); 3335 + ac_start = nla_nest_start_noflag(skb, 3336 + OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL); 3338 3337 if (!ac_start) { 3339 3338 err = -EMSGSIZE; 3340 3339 goto out; ··· 3352 3351 * OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER. 3353 3352 */ 3354 3353 a = nla_next(a, &rem); 3355 - ac_start = nla_nest_start(skb, 3356 - OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER); 3354 + ac_start = nla_nest_start_noflag(skb, 3355 + OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER); 3357 3356 if (!ac_start) { 3358 3357 err = -EMSGSIZE; 3359 3358 goto out; ··· 3387 3386 struct ovs_tunnel_info *ovs_tun = nla_data(ovs_key); 3388 3387 struct ip_tunnel_info *tun_info = &ovs_tun->tun_dst->u.tun_info; 3389 3388 3390 - start = nla_nest_start(skb, OVS_ACTION_ATTR_SET); 3389 + start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_SET); 3391 3390 if (!start) 3392 3391 return -EMSGSIZE; 3393 3392 ··· 3419 3418 /* Revert the conversion we did from a non-masked set action to 3420 3419 * masked set action. 3421 3420 */ 3422 - nla = nla_nest_start(skb, OVS_ACTION_ATTR_SET); 3421 + nla = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_SET); 3423 3422 if (!nla) 3424 3423 return -EMSGSIZE; 3425 3424
+4 -4
net/openvswitch/meter.c
··· 127 127 OVS_METER_ATTR_PAD)) 128 128 goto error; 129 129 130 - nla = nla_nest_start(reply, OVS_METER_ATTR_BANDS); 130 + nla = nla_nest_start_noflag(reply, OVS_METER_ATTR_BANDS); 131 131 if (!nla) 132 132 goto error; 133 133 ··· 136 136 for (i = 0; i < meter->n_bands; ++i, ++band) { 137 137 struct nlattr *band_nla; 138 138 139 - band_nla = nla_nest_start(reply, OVS_BAND_ATTR_UNSPEC); 139 + band_nla = nla_nest_start_noflag(reply, OVS_BAND_ATTR_UNSPEC); 140 140 if (!band_nla || nla_put(reply, OVS_BAND_ATTR_STATS, 141 141 sizeof(struct ovs_flow_stats), 142 142 &band->stats)) ··· 166 166 nla_put_u32(reply, OVS_METER_ATTR_MAX_BANDS, DP_MAX_BANDS)) 167 167 goto nla_put_failure; 168 168 169 - nla = nla_nest_start(reply, OVS_METER_ATTR_BANDS); 169 + nla = nla_nest_start_noflag(reply, OVS_METER_ATTR_BANDS); 170 170 if (!nla) 171 171 goto nla_put_failure; 172 172 173 - band_nla = nla_nest_start(reply, OVS_BAND_ATTR_UNSPEC); 173 + band_nla = nla_nest_start_noflag(reply, OVS_BAND_ATTR_UNSPEC); 174 174 if (!band_nla) 175 175 goto nla_put_failure; 176 176 /* Currently only DROP band type is supported. */
+1 -1
net/openvswitch/vport-vxlan.c
··· 43 43 if (vxlan->cfg.flags & VXLAN_F_GBP) { 44 44 struct nlattr *exts; 45 45 46 - exts = nla_nest_start(skb, OVS_TUNNEL_ATTR_EXTENSION); 46 + exts = nla_nest_start_noflag(skb, OVS_TUNNEL_ATTR_EXTENSION); 47 47 if (!exts) 48 48 return -EMSGSIZE; 49 49
+1 -1
net/openvswitch/vport.c
··· 319 319 if (!vport->ops->get_options) 320 320 return 0; 321 321 322 - nla = nla_nest_start(skb, OVS_VPORT_ATTR_OPTIONS); 322 + nla = nla_nest_start_noflag(skb, OVS_VPORT_ATTR_OPTIONS); 323 323 if (!nla) 324 324 return -EMSGSIZE; 325 325
+1 -1
net/packet/diag.c
··· 39 39 struct nlattr *mca; 40 40 struct packet_mclist *ml; 41 41 42 - mca = nla_nest_start(nlskb, PACKET_DIAG_MCLIST); 42 + mca = nla_nest_start_noflag(nlskb, PACKET_DIAG_MCLIST); 43 43 if (!mca) 44 44 return -EMSGSIZE; 45 45
+7 -7
net/sched/act_api.c
··· 242 242 (unsigned long)p->tcfa_tm.lastuse)) 243 243 continue; 244 244 245 - nest = nla_nest_start(skb, n_i); 245 + nest = nla_nest_start_noflag(skb, n_i); 246 246 if (!nest) { 247 247 index--; 248 248 goto nla_put_failure; ··· 299 299 struct tc_action *p; 300 300 unsigned long id = 1; 301 301 302 - nest = nla_nest_start(skb, 0); 302 + nest = nla_nest_start_noflag(skb, 0); 303 303 if (nest == NULL) 304 304 goto nla_put_failure; 305 305 if (nla_put_string(skb, TCA_KIND, ops->kind)) ··· 776 776 } 777 777 rcu_read_unlock(); 778 778 779 - nest = nla_nest_start(skb, TCA_OPTIONS); 779 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 780 780 if (nest == NULL) 781 781 goto nla_put_failure; 782 782 err = tcf_action_dump_old(skb, a, bind, ref); ··· 800 800 801 801 for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) { 802 802 a = actions[i]; 803 - nest = nla_nest_start(skb, a->order); 803 + nest = nla_nest_start_noflag(skb, a->order); 804 804 if (nest == NULL) 805 805 goto nla_put_failure; 806 806 err = tcf_action_dump_1(skb, a, bind, ref); ··· 1052 1052 t->tca__pad1 = 0; 1053 1053 t->tca__pad2 = 0; 1054 1054 1055 - nest = nla_nest_start(skb, TCA_ACT_TAB); 1055 + nest = nla_nest_start_noflag(skb, TCA_ACT_TAB); 1056 1056 if (!nest) 1057 1057 goto out_nlmsg_trim; 1058 1058 ··· 1176 1176 t->tca__pad1 = 0; 1177 1177 t->tca__pad2 = 0; 1178 1178 1179 - nest = nla_nest_start(skb, TCA_ACT_TAB); 1179 + nest = nla_nest_start_noflag(skb, TCA_ACT_TAB); 1180 1180 if (!nest) { 1181 1181 NL_SET_ERR_MSG(extack, "Failed to add new netlink message"); 1182 1182 goto out_module_put; ··· 1508 1508 if (!count_attr) 1509 1509 goto out_module_put; 1510 1510 1511 - nest = nla_nest_start(skb, TCA_ACT_TAB); 1511 + nest = nla_nest_start_noflag(skb, TCA_ACT_TAB); 1512 1512 if (nest == NULL) 1513 1513 goto out_module_put; 1514 1514
+1 -1
net/sched/act_ife.c
··· 387 387 if (list_empty(&ife->metalist)) 388 388 return 0; 389 389 390 - nest = nla_nest_start(skb, TCA_IFE_METALST); 390 + nest = nla_nest_start_noflag(skb, TCA_IFE_METALST); 391 391 if (!nest) 392 392 goto out_nlmsg_trim; 393 393
+3 -2
net/sched/act_pedit.c
··· 108 108 static int tcf_pedit_key_ex_dump(struct sk_buff *skb, 109 109 struct tcf_pedit_key_ex *keys_ex, int n) 110 110 { 111 - struct nlattr *keys_start = nla_nest_start(skb, TCA_PEDIT_KEYS_EX); 111 + struct nlattr *keys_start = nla_nest_start_noflag(skb, 112 + TCA_PEDIT_KEYS_EX); 112 113 113 114 if (!keys_start) 114 115 goto nla_failure; 115 116 for (; n > 0; n--) { 116 117 struct nlattr *key_start; 117 118 118 - key_start = nla_nest_start(skb, TCA_PEDIT_KEY_EX); 119 + key_start = nla_nest_start_noflag(skb, TCA_PEDIT_KEY_EX); 119 120 if (!key_start) 120 121 goto nla_failure; 121 122
+2 -2
net/sched/act_tunnel_key.c
··· 426 426 u8 *src = (u8 *)(info + 1); 427 427 struct nlattr *start; 428 428 429 - start = nla_nest_start(skb, TCA_TUNNEL_KEY_ENC_OPTS_GENEVE); 429 + start = nla_nest_start_noflag(skb, TCA_TUNNEL_KEY_ENC_OPTS_GENEVE); 430 430 if (!start) 431 431 return -EMSGSIZE; 432 432 ··· 460 460 if (!info->options_len) 461 461 return 0; 462 462 463 - start = nla_nest_start(skb, TCA_TUNNEL_KEY_ENC_OPTS); 463 + start = nla_nest_start_noflag(skb, TCA_TUNNEL_KEY_ENC_OPTS); 464 464 if (!start) 465 465 return -EMSGSIZE; 466 466
+2 -2
net/sched/cls_api.c
··· 3111 3111 * tc data even if iproute2 was newer - jhs 3112 3112 */ 3113 3113 if (exts->type != TCA_OLD_COMPAT) { 3114 - nest = nla_nest_start(skb, exts->action); 3114 + nest = nla_nest_start_noflag(skb, exts->action); 3115 3115 if (nest == NULL) 3116 3116 goto nla_put_failure; 3117 3117 ··· 3120 3120 nla_nest_end(skb, nest); 3121 3121 } else if (exts->police) { 3122 3122 struct tc_action *act = tcf_exts_first_act(exts); 3123 - nest = nla_nest_start(skb, exts->police); 3123 + nest = nla_nest_start_noflag(skb, exts->police); 3124 3124 if (nest == NULL || !act) 3125 3125 goto nla_put_failure; 3126 3126 if (tcf_action_dump_old(skb, act, 0, 0) < 0)
+1 -1
net/sched/cls_basic.c
··· 288 288 289 289 t->tcm_handle = f->handle; 290 290 291 - nest = nla_nest_start(skb, TCA_OPTIONS); 291 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 292 292 if (nest == NULL) 293 293 goto nla_put_failure; 294 294
+1 -1
net/sched/cls_bpf.c
··· 591 591 592 592 cls_bpf_offload_update_stats(tp, prog); 593 593 594 - nest = nla_nest_start(skb, TCA_OPTIONS); 594 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 595 595 if (nest == NULL) 596 596 goto nla_put_failure; 597 597
+1 -1
net/sched/cls_cgroup.c
··· 176 176 177 177 t->tcm_handle = head->handle; 178 178 179 - nest = nla_nest_start(skb, TCA_OPTIONS); 179 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 180 180 if (nest == NULL) 181 181 goto nla_put_failure; 182 182
+1 -1
net/sched/cls_flow.c
··· 629 629 630 630 t->tcm_handle = f->handle; 631 631 632 - nest = nla_nest_start(skb, TCA_OPTIONS); 632 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 633 633 if (nest == NULL) 634 634 goto nla_put_failure; 635 635
+4 -4
net/sched/cls_flower.c
··· 2051 2051 struct nlattr *nest; 2052 2052 int opt_off = 0; 2053 2053 2054 - nest = nla_nest_start(skb, TCA_FLOWER_KEY_ENC_OPTS_GENEVE); 2054 + nest = nla_nest_start_noflag(skb, TCA_FLOWER_KEY_ENC_OPTS_GENEVE); 2055 2055 if (!nest) 2056 2056 goto nla_put_failure; 2057 2057 ··· 2087 2087 if (!enc_opts->len) 2088 2088 return 0; 2089 2089 2090 - nest = nla_nest_start(skb, enc_opt_type); 2090 + nest = nla_nest_start_noflag(skb, enc_opt_type); 2091 2091 if (!nest) 2092 2092 goto nla_put_failure; 2093 2093 ··· 2333 2333 2334 2334 t->tcm_handle = f->handle; 2335 2335 2336 - nest = nla_nest_start(skb, TCA_OPTIONS); 2336 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 2337 2337 if (!nest) 2338 2338 goto nla_put_failure; 2339 2339 ··· 2384 2384 struct fl_flow_key *key, *mask; 2385 2385 struct nlattr *nest; 2386 2386 2387 - nest = nla_nest_start(skb, TCA_OPTIONS); 2387 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 2388 2388 if (!nest) 2389 2389 goto nla_put_failure; 2390 2390
+1 -1
net/sched/cls_fw.c
··· 402 402 if (!f->res.classid && !tcf_exts_has_actions(&f->exts)) 403 403 return skb->len; 404 404 405 - nest = nla_nest_start(skb, TCA_OPTIONS); 405 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 406 406 if (nest == NULL) 407 407 goto nla_put_failure; 408 408
+1 -1
net/sched/cls_matchall.c
··· 303 303 304 304 t->tcm_handle = head->handle; 305 305 306 - nest = nla_nest_start(skb, TCA_OPTIONS); 306 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 307 307 if (!nest) 308 308 goto nla_put_failure; 309 309
+1 -1
net/sched/cls_route.c
··· 607 607 608 608 t->tcm_handle = f->handle; 609 609 610 - nest = nla_nest_start(skb, TCA_OPTIONS); 610 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 611 611 if (nest == NULL) 612 612 goto nla_put_failure; 613 613
+1 -1
net/sched/cls_rsvp.h
··· 706 706 707 707 t->tcm_handle = f->handle; 708 708 709 - nest = nla_nest_start(skb, TCA_OPTIONS); 709 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 710 710 if (nest == NULL) 711 711 goto nla_put_failure; 712 712
+1 -1
net/sched/cls_tcindex.c
··· 601 601 tp, fh, skb, t, p, r); 602 602 pr_debug("p->perfect %p p->h %p\n", p->perfect, p->h); 603 603 604 - nest = nla_nest_start(skb, TCA_OPTIONS); 604 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 605 605 if (nest == NULL) 606 606 goto nla_put_failure; 607 607
+1 -1
net/sched/cls_u32.c
··· 1294 1294 1295 1295 t->tcm_handle = n->handle; 1296 1296 1297 - nest = nla_nest_start(skb, TCA_OPTIONS); 1297 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 1298 1298 if (nest == NULL) 1299 1299 goto nla_put_failure; 1300 1300
+2 -2
net/sched/ematch.c
··· 440 440 struct nlattr *top_start; 441 441 struct nlattr *list_start; 442 442 443 - top_start = nla_nest_start(skb, tlv); 443 + top_start = nla_nest_start_noflag(skb, tlv); 444 444 if (top_start == NULL) 445 445 goto nla_put_failure; 446 446 447 447 if (nla_put(skb, TCA_EMATCH_TREE_HDR, sizeof(tree->hdr), &tree->hdr)) 448 448 goto nla_put_failure; 449 449 450 - list_start = nla_nest_start(skb, TCA_EMATCH_TREE_LIST); 450 + list_start = nla_nest_start_noflag(skb, TCA_EMATCH_TREE_LIST); 451 451 if (list_start == NULL) 452 452 goto nla_put_failure; 453 453
+1 -1
net/sched/sch_api.c
··· 542 542 { 543 543 struct nlattr *nest; 544 544 545 - nest = nla_nest_start(skb, TCA_STAB); 545 + nest = nla_nest_start_noflag(skb, TCA_STAB); 546 546 if (nest == NULL) 547 547 goto nla_put_failure; 548 548 if (nla_put(skb, TCA_STAB_BASE, sizeof(stab->szopts), &stab->szopts))
+1 -1
net/sched/sch_atm.c
··· 609 609 tcm->tcm_handle = flow->common.classid; 610 610 tcm->tcm_info = flow->q->handle; 611 611 612 - nest = nla_nest_start(skb, TCA_OPTIONS); 612 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 613 613 if (nest == NULL) 614 614 goto nla_put_failure; 615 615
+5 -5
net/sched/sch_cake.c
··· 2735 2735 struct cake_sched_data *q = qdisc_priv(sch); 2736 2736 struct nlattr *opts; 2737 2737 2738 - opts = nla_nest_start(skb, TCA_OPTIONS); 2738 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 2739 2739 if (!opts) 2740 2740 goto nla_put_failure; 2741 2741 ··· 2806 2806 2807 2807 static int cake_dump_stats(struct Qdisc *sch, struct gnet_dump *d) 2808 2808 { 2809 - struct nlattr *stats = nla_nest_start(d->skb, TCA_STATS_APP); 2809 + struct nlattr *stats = nla_nest_start_noflag(d->skb, TCA_STATS_APP); 2810 2810 struct cake_sched_data *q = qdisc_priv(sch); 2811 2811 struct nlattr *tstats, *ts; 2812 2812 int i; ··· 2836 2836 #undef PUT_STAT_U32 2837 2837 #undef PUT_STAT_U64 2838 2838 2839 - tstats = nla_nest_start(d->skb, TCA_CAKE_STATS_TIN_STATS); 2839 + tstats = nla_nest_start_noflag(d->skb, TCA_CAKE_STATS_TIN_STATS); 2840 2840 if (!tstats) 2841 2841 goto nla_put_failure; 2842 2842 ··· 2853 2853 for (i = 0; i < q->tin_cnt; i++) { 2854 2854 struct cake_tin_data *b = &q->tins[q->tin_order[i]]; 2855 2855 2856 - ts = nla_nest_start(d->skb, i + 1); 2856 + ts = nla_nest_start_noflag(d->skb, i + 1); 2857 2857 if (!ts) 2858 2858 goto nla_put_failure; 2859 2859 ··· 2973 2973 if (flow) { 2974 2974 ktime_t now = ktime_get(); 2975 2975 2976 - stats = nla_nest_start(d->skb, TCA_STATS_APP); 2976 + stats = nla_nest_start_noflag(d->skb, TCA_STATS_APP); 2977 2977 if (!stats) 2978 2978 return -1; 2979 2979
+2 -2
net/sched/sch_cbq.c
··· 1305 1305 struct cbq_sched_data *q = qdisc_priv(sch); 1306 1306 struct nlattr *nest; 1307 1307 1308 - nest = nla_nest_start(skb, TCA_OPTIONS); 1308 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 1309 1309 if (nest == NULL) 1310 1310 goto nla_put_failure; 1311 1311 if (cbq_dump_attr(skb, &q->link) < 0) ··· 1340 1340 tcm->tcm_handle = cl->common.classid; 1341 1341 tcm->tcm_info = cl->q->handle; 1342 1342 1343 - nest = nla_nest_start(skb, TCA_OPTIONS); 1343 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 1344 1344 if (nest == NULL) 1345 1345 goto nla_put_failure; 1346 1346 if (cbq_dump_attr(skb, cl) < 0)
+1 -1
net/sched/sch_cbs.c
··· 449 449 struct tc_cbs_qopt opt = { }; 450 450 struct nlattr *nest; 451 451 452 - nest = nla_nest_start(skb, TCA_OPTIONS); 452 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 453 453 if (!nest) 454 454 goto nla_put_failure; 455 455
+1 -1
net/sched/sch_choke.c
··· 452 452 .Scell_log = q->parms.Scell_log, 453 453 }; 454 454 455 - opts = nla_nest_start(skb, TCA_OPTIONS); 455 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 456 456 if (opts == NULL) 457 457 goto nla_put_failure; 458 458
+1 -1
net/sched/sch_codel.c
··· 217 217 struct codel_sched_data *q = qdisc_priv(sch); 218 218 struct nlattr *opts; 219 219 220 - opts = nla_nest_start(skb, TCA_OPTIONS); 220 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 221 221 if (opts == NULL) 222 222 goto nla_put_failure; 223 223
+1 -1
net/sched/sch_drr.c
··· 244 244 tcm->tcm_handle = cl->common.classid; 245 245 tcm->tcm_info = cl->qdisc->handle; 246 246 247 - nest = nla_nest_start(skb, TCA_OPTIONS); 247 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 248 248 if (nest == NULL) 249 249 goto nla_put_failure; 250 250 if (nla_put_u32(skb, TCA_DRR_QUANTUM, cl->quantum))
+2 -2
net/sched/sch_dsmark.c
··· 432 432 tcm->tcm_handle = TC_H_MAKE(TC_H_MAJ(sch->handle), cl - 1); 433 433 tcm->tcm_info = p->q->handle; 434 434 435 - opts = nla_nest_start(skb, TCA_OPTIONS); 435 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 436 436 if (opts == NULL) 437 437 goto nla_put_failure; 438 438 if (nla_put_u8(skb, TCA_DSMARK_MASK, p->mv[cl - 1].mask) || ··· 451 451 struct dsmark_qdisc_data *p = qdisc_priv(sch); 452 452 struct nlattr *opts = NULL; 453 453 454 - opts = nla_nest_start(skb, TCA_OPTIONS); 454 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 455 455 if (opts == NULL) 456 456 goto nla_put_failure; 457 457 if (nla_put_u16(skb, TCA_DSMARK_INDICES, p->indices))
+1 -1
net/sched/sch_etf.c
··· 460 460 struct tc_etf_qopt opt = { }; 461 461 struct nlattr *nest; 462 462 463 - nest = nla_nest_start(skb, TCA_OPTIONS); 463 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 464 464 if (!nest) 465 465 goto nla_put_failure; 466 466
+1 -1
net/sched/sch_fq.c
··· 823 823 u64 ce_threshold = q->ce_threshold; 824 824 struct nlattr *opts; 825 825 826 - opts = nla_nest_start(skb, TCA_OPTIONS); 826 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 827 827 if (opts == NULL) 828 828 goto nla_put_failure; 829 829
+1 -1
net/sched/sch_fq_codel.c
··· 527 527 struct fq_codel_sched_data *q = qdisc_priv(sch); 528 528 struct nlattr *opts; 529 529 530 - opts = nla_nest_start(skb, TCA_OPTIONS); 530 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 531 531 if (opts == NULL) 532 532 goto nla_put_failure; 533 533
+4 -4
net/sched/sch_gred.c
··· 772 772 if (gred_offload_dump_stats(sch)) 773 773 goto nla_put_failure; 774 774 775 - opts = nla_nest_start(skb, TCA_OPTIONS); 775 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 776 776 if (opts == NULL) 777 777 goto nla_put_failure; 778 778 if (nla_put(skb, TCA_GRED_DPS, sizeof(sopt), &sopt)) ··· 790 790 goto nla_put_failure; 791 791 792 792 /* Old style all-in-one dump of VQs */ 793 - parms = nla_nest_start(skb, TCA_GRED_PARMS); 793 + parms = nla_nest_start_noflag(skb, TCA_GRED_PARMS); 794 794 if (parms == NULL) 795 795 goto nla_put_failure; 796 796 ··· 841 841 nla_nest_end(skb, parms); 842 842 843 843 /* Dump the VQs again, in more structured way */ 844 - vqs = nla_nest_start(skb, TCA_GRED_VQ_LIST); 844 + vqs = nla_nest_start_noflag(skb, TCA_GRED_VQ_LIST); 845 845 if (!vqs) 846 846 goto nla_put_failure; 847 847 ··· 852 852 if (!q) 853 853 continue; 854 854 855 - vq = nla_nest_start(skb, TCA_GRED_VQ_ENTRY); 855 + vq = nla_nest_start_noflag(skb, TCA_GRED_VQ_ENTRY); 856 856 if (!vq) 857 857 goto nla_put_failure; 858 858
+1 -1
net/sched/sch_hfsc.c
··· 1300 1300 if (cl->level == 0) 1301 1301 tcm->tcm_info = cl->qdisc->handle; 1302 1302 1303 - nest = nla_nest_start(skb, TCA_OPTIONS); 1303 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 1304 1304 if (nest == NULL) 1305 1305 goto nla_put_failure; 1306 1306 if (hfsc_dump_curves(skb, cl) < 0)
+1 -1
net/sched/sch_hhf.c
··· 654 654 struct hhf_sched_data *q = qdisc_priv(sch); 655 655 struct nlattr *opts; 656 656 657 - opts = nla_nest_start(skb, TCA_OPTIONS); 657 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 658 658 if (opts == NULL) 659 659 goto nla_put_failure; 660 660
+2 -2
net/sched/sch_htb.c
··· 1057 1057 gopt.defcls = q->defcls; 1058 1058 gopt.debug = 0; 1059 1059 1060 - nest = nla_nest_start(skb, TCA_OPTIONS); 1060 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 1061 1061 if (nest == NULL) 1062 1062 goto nla_put_failure; 1063 1063 if (nla_put(skb, TCA_HTB_INIT, sizeof(gopt), &gopt) || ··· 1086 1086 if (!cl->level && cl->leaf.q) 1087 1087 tcm->tcm_info = cl->leaf.q->handle; 1088 1088 1089 - nest = nla_nest_start(skb, TCA_OPTIONS); 1089 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 1090 1090 if (nest == NULL) 1091 1091 goto nla_put_failure; 1092 1092
+1 -1
net/sched/sch_ingress.c
··· 106 106 { 107 107 struct nlattr *nest; 108 108 109 - nest = nla_nest_start(skb, TCA_OPTIONS); 109 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 110 110 if (nest == NULL) 111 111 goto nla_put_failure; 112 112
+2 -2
net/sched/sch_mqprio.c
··· 349 349 int i; 350 350 351 351 if (priv->flags & TC_MQPRIO_F_MIN_RATE) { 352 - nest = nla_nest_start(skb, TCA_MQPRIO_MIN_RATE64); 352 + nest = nla_nest_start_noflag(skb, TCA_MQPRIO_MIN_RATE64); 353 353 if (!nest) 354 354 goto nla_put_failure; 355 355 ··· 363 363 } 364 364 365 365 if (priv->flags & TC_MQPRIO_F_MAX_RATE) { 366 - nest = nla_nest_start(skb, TCA_MQPRIO_MAX_RATE64); 366 + nest = nla_nest_start_noflag(skb, TCA_MQPRIO_MAX_RATE64); 367 367 if (!nest) 368 368 goto nla_put_failure; 369 369
+1 -1
net/sched/sch_netem.c
··· 1079 1079 { 1080 1080 struct nlattr *nest; 1081 1081 1082 - nest = nla_nest_start(skb, TCA_NETEM_LOSS); 1082 + nest = nla_nest_start_noflag(skb, TCA_NETEM_LOSS); 1083 1083 if (nest == NULL) 1084 1084 goto nla_put_failure; 1085 1085
+1 -1
net/sched/sch_pie.c
··· 491 491 struct pie_sched_data *q = qdisc_priv(sch); 492 492 struct nlattr *opts; 493 493 494 - opts = nla_nest_start(skb, TCA_OPTIONS); 494 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 495 495 if (!opts) 496 496 goto nla_put_failure; 497 497
+1 -1
net/sched/sch_qfq.c
··· 619 619 tcm->tcm_handle = cl->common.classid; 620 620 tcm->tcm_info = cl->qdisc->handle; 621 621 622 - nest = nla_nest_start(skb, TCA_OPTIONS); 622 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 623 623 if (nest == NULL) 624 624 goto nla_put_failure; 625 625 if (nla_put_u32(skb, TCA_QFQ_WEIGHT, cl->agg->class_weight) ||
+1 -1
net/sched/sch_red.c
··· 318 318 if (err) 319 319 goto nla_put_failure; 320 320 321 - opts = nla_nest_start(skb, TCA_OPTIONS); 321 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 322 322 if (opts == NULL) 323 323 goto nla_put_failure; 324 324 if (nla_put(skb, TCA_RED_PARMS, sizeof(opt), &opt) ||
+1 -1
net/sched/sch_sfb.c
··· 580 580 }; 581 581 582 582 sch->qstats.backlog = q->qdisc->qstats.backlog; 583 - opts = nla_nest_start(skb, TCA_OPTIONS); 583 + opts = nla_nest_start_noflag(skb, TCA_OPTIONS); 584 584 if (opts == NULL) 585 585 goto nla_put_failure; 586 586 if (nla_put(skb, TCA_SFB_PARMS, sizeof(opt), &opt))
+4 -3
net/sched/sch_taprio.c
··· 841 841 { 842 842 struct nlattr *item; 843 843 844 - item = nla_nest_start(msg, TCA_TAPRIO_SCHED_ENTRY); 844 + item = nla_nest_start_noflag(msg, TCA_TAPRIO_SCHED_ENTRY); 845 845 if (!item) 846 846 return -ENOSPC; 847 847 ··· 883 883 opt.offset[i] = dev->tc_to_txq[i].offset; 884 884 } 885 885 886 - nest = nla_nest_start(skb, TCA_OPTIONS); 886 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 887 887 if (!nest) 888 888 return -ENOSPC; 889 889 ··· 897 897 if (nla_put_s32(skb, TCA_TAPRIO_ATTR_SCHED_CLOCKID, q->clockid)) 898 898 goto options_error; 899 899 900 - entry_list = nla_nest_start(skb, TCA_TAPRIO_ATTR_SCHED_ENTRY_LIST); 900 + entry_list = nla_nest_start_noflag(skb, 901 + TCA_TAPRIO_ATTR_SCHED_ENTRY_LIST); 901 902 if (!entry_list) 902 903 goto options_error; 903 904
+1 -1
net/sched/sch_tbf.c
··· 448 448 struct tc_tbf_qopt opt; 449 449 450 450 sch->qstats.backlog = q->qdisc->qstats.backlog; 451 - nest = nla_nest_start(skb, TCA_OPTIONS); 451 + nest = nla_nest_start_noflag(skb, TCA_OPTIONS); 452 452 if (nest == NULL) 453 453 goto nla_put_failure; 454 454
+4 -4
net/tipc/bearer.c
··· 687 687 if (!hdr) 688 688 return -EMSGSIZE; 689 689 690 - attrs = nla_nest_start(msg->skb, TIPC_NLA_BEARER); 690 + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_BEARER); 691 691 if (!attrs) 692 692 goto msg_full; 693 693 694 694 if (nla_put_string(msg->skb, TIPC_NLA_BEARER_NAME, bearer->name)) 695 695 goto attr_msg_full; 696 696 697 - prop = nla_nest_start(msg->skb, TIPC_NLA_BEARER_PROP); 697 + prop = nla_nest_start_noflag(msg->skb, TIPC_NLA_BEARER_PROP); 698 698 if (!prop) 699 699 goto prop_msg_full; 700 700 if (nla_put_u32(msg->skb, TIPC_NLA_PROP_PRIO, bearer->priority)) ··· 1033 1033 if (!hdr) 1034 1034 return -EMSGSIZE; 1035 1035 1036 - attrs = nla_nest_start(msg->skb, TIPC_NLA_MEDIA); 1036 + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_MEDIA); 1037 1037 if (!attrs) 1038 1038 goto msg_full; 1039 1039 1040 1040 if (nla_put_string(msg->skb, TIPC_NLA_MEDIA_NAME, media->name)) 1041 1041 goto attr_msg_full; 1042 1042 1043 - prop = nla_nest_start(msg->skb, TIPC_NLA_MEDIA_PROP); 1043 + prop = nla_nest_start_noflag(msg->skb, TIPC_NLA_MEDIA_PROP); 1044 1044 if (!prop) 1045 1045 goto prop_msg_full; 1046 1046 if (nla_put_u32(msg->skb, TIPC_NLA_PROP_PRIO, media->priority))
+1 -1
net/tipc/group.c
··· 917 917 918 918 int tipc_group_fill_sock_diag(struct tipc_group *grp, struct sk_buff *skb) 919 919 { 920 - struct nlattr *group = nla_nest_start(skb, TIPC_NLA_SOCK_GROUP); 920 + struct nlattr *group = nla_nest_start_noflag(skb, TIPC_NLA_SOCK_GROUP); 921 921 922 922 if (!group) 923 923 return -EMSGSIZE;
+6 -6
net/tipc/link.c
··· 2228 2228 (s->accu_queue_sz / s->queue_sz_counts) : 0} 2229 2229 }; 2230 2230 2231 - stats = nla_nest_start(skb, TIPC_NLA_LINK_STATS); 2231 + stats = nla_nest_start_noflag(skb, TIPC_NLA_LINK_STATS); 2232 2232 if (!stats) 2233 2233 return -EMSGSIZE; 2234 2234 ··· 2260 2260 if (!hdr) 2261 2261 return -EMSGSIZE; 2262 2262 2263 - attrs = nla_nest_start(msg->skb, TIPC_NLA_LINK); 2263 + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_LINK); 2264 2264 if (!attrs) 2265 2265 goto msg_full; 2266 2266 ··· 2282 2282 if (nla_put_flag(msg->skb, TIPC_NLA_LINK_ACTIVE)) 2283 2283 goto attr_msg_full; 2284 2284 2285 - prop = nla_nest_start(msg->skb, TIPC_NLA_LINK_PROP); 2285 + prop = nla_nest_start_noflag(msg->skb, TIPC_NLA_LINK_PROP); 2286 2286 if (!prop) 2287 2287 goto attr_msg_full; 2288 2288 if (nla_put_u32(msg->skb, TIPC_NLA_PROP_PRIO, link->priority)) ··· 2349 2349 (stats->accu_queue_sz / stats->queue_sz_counts) : 0} 2350 2350 }; 2351 2351 2352 - nest = nla_nest_start(skb, TIPC_NLA_LINK_STATS); 2352 + nest = nla_nest_start_noflag(skb, TIPC_NLA_LINK_STATS); 2353 2353 if (!nest) 2354 2354 return -EMSGSIZE; 2355 2355 ··· 2389 2389 return -EMSGSIZE; 2390 2390 } 2391 2391 2392 - attrs = nla_nest_start(msg->skb, TIPC_NLA_LINK); 2392 + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_LINK); 2393 2393 if (!attrs) 2394 2394 goto msg_full; 2395 2395 ··· 2406 2406 if (nla_put_u32(msg->skb, TIPC_NLA_LINK_TX, 0)) 2407 2407 goto attr_msg_full; 2408 2408 2409 - prop = nla_nest_start(msg->skb, TIPC_NLA_LINK_PROP); 2409 + prop = nla_nest_start_noflag(msg->skb, TIPC_NLA_LINK_PROP); 2410 2410 if (!prop) 2411 2411 goto attr_msg_full; 2412 2412 if (nla_put_u32(msg->skb, TIPC_NLA_PROP_WIN, bcl->window))
+2 -2
net/tipc/monitor.c
··· 696 696 if (!hdr) 697 697 return -EMSGSIZE; 698 698 699 - attrs = nla_nest_start(msg->skb, TIPC_NLA_MON_PEER); 699 + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_MON_PEER); 700 700 if (!attrs) 701 701 goto msg_full; 702 702 ··· 785 785 if (!hdr) 786 786 return -EMSGSIZE; 787 787 788 - attrs = nla_nest_start(msg->skb, TIPC_NLA_MON); 788 + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_MON); 789 789 if (!attrs) 790 790 goto msg_full; 791 791
+2 -2
net/tipc/name_table.c
··· 829 829 if (!hdr) 830 830 return -EMSGSIZE; 831 831 832 - attrs = nla_nest_start(msg->skb, TIPC_NLA_NAME_TABLE); 832 + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_NAME_TABLE); 833 833 if (!attrs) 834 834 goto msg_full; 835 835 836 - b = nla_nest_start(msg->skb, TIPC_NLA_NAME_TABLE_PUBL); 836 + b = nla_nest_start_noflag(msg->skb, TIPC_NLA_NAME_TABLE_PUBL); 837 837 if (!b) 838 838 goto attr_msg_full; 839 839
+1 -1
net/tipc/net.c
··· 187 187 if (!hdr) 188 188 return -EMSGSIZE; 189 189 190 - attrs = nla_nest_start(msg->skb, TIPC_NLA_NET); 190 + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_NET); 191 191 if (!attrs) 192 192 goto msg_full; 193 193
+2 -2
net/tipc/node.c
··· 1359 1359 if (!hdr) 1360 1360 return -EMSGSIZE; 1361 1361 1362 - attrs = nla_nest_start(msg->skb, TIPC_NLA_NODE); 1362 + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_NODE); 1363 1363 if (!attrs) 1364 1364 goto msg_full; 1365 1365 ··· 2353 2353 if (!hdr) 2354 2354 return -EMSGSIZE; 2355 2355 2356 - attrs = nla_nest_start(msg->skb, TIPC_NLA_MON); 2356 + attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_MON); 2357 2357 if (!attrs) 2358 2358 goto msg_full; 2359 2359
+5 -5
net/tipc/socket.c
··· 3273 3273 peer_node = tsk_peer_node(tsk); 3274 3274 peer_port = tsk_peer_port(tsk); 3275 3275 3276 - nest = nla_nest_start(skb, TIPC_NLA_SOCK_CON); 3276 + nest = nla_nest_start_noflag(skb, TIPC_NLA_SOCK_CON); 3277 3277 if (!nest) 3278 3278 return -EMSGSIZE; 3279 3279 ··· 3332 3332 if (!hdr) 3333 3333 goto msg_cancel; 3334 3334 3335 - attrs = nla_nest_start(skb, TIPC_NLA_SOCK); 3335 + attrs = nla_nest_start_noflag(skb, TIPC_NLA_SOCK); 3336 3336 if (!attrs) 3337 3337 goto genlmsg_cancel; 3338 3338 ··· 3437 3437 if (!(sk_filter_state & (1 << sk->sk_state))) 3438 3438 return 0; 3439 3439 3440 - attrs = nla_nest_start(skb, TIPC_NLA_SOCK); 3440 + attrs = nla_nest_start_noflag(skb, TIPC_NLA_SOCK); 3441 3441 if (!attrs) 3442 3442 goto msg_cancel; 3443 3443 ··· 3455 3455 TIPC_NLA_SOCK_PAD)) 3456 3456 goto attr_msg_cancel; 3457 3457 3458 - stat = nla_nest_start(skb, TIPC_NLA_SOCK_STAT); 3458 + stat = nla_nest_start_noflag(skb, TIPC_NLA_SOCK_STAT); 3459 3459 if (!stat) 3460 3460 goto attr_msg_cancel; 3461 3461 ··· 3512 3512 if (!hdr) 3513 3513 goto msg_cancel; 3514 3514 3515 - attrs = nla_nest_start(skb, TIPC_NLA_PUBL); 3515 + attrs = nla_nest_start_noflag(skb, TIPC_NLA_PUBL); 3516 3516 if (!attrs) 3517 3517 goto genlmsg_cancel; 3518 3518
+1 -1
net/tipc/udp_media.c
··· 523 523 if (!ub) 524 524 return -ENODEV; 525 525 526 - nest = nla_nest_start(msg->skb, TIPC_NLA_BEARER_UDP_OPTS); 526 + nest = nla_nest_start_noflag(msg->skb, TIPC_NLA_BEARER_UDP_OPTS); 527 527 if (!nest) 528 528 goto msg_full; 529 529
+106 -86
net/wireless/nl80211.c
··· 755 755 { 756 756 int j; 757 757 struct nlattr *nl_wmm_rules = 758 - nla_nest_start(msg, NL80211_FREQUENCY_ATTR_WMM); 758 + nla_nest_start_noflag(msg, NL80211_FREQUENCY_ATTR_WMM); 759 759 760 760 if (!nl_wmm_rules) 761 761 goto nla_put_failure; 762 762 763 763 for (j = 0; j < IEEE80211_NUM_ACS; j++) { 764 - struct nlattr *nl_wmm_rule = nla_nest_start(msg, j); 764 + struct nlattr *nl_wmm_rule = nla_nest_start_noflag(msg, j); 765 765 766 766 if (!nl_wmm_rule) 767 767 goto nla_put_failure; ··· 890 890 return false; \ 891 891 } while (0) 892 892 893 - txqattr = nla_nest_start(msg, attrtype); 893 + txqattr = nla_nest_start_noflag(msg, attrtype); 894 894 if (!txqattr) 895 895 return false; 896 896 ··· 1205 1205 1206 1206 static int nl80211_put_iftypes(struct sk_buff *msg, u32 attr, u16 ifmodes) 1207 1207 { 1208 - struct nlattr *nl_modes = nla_nest_start(msg, attr); 1208 + struct nlattr *nl_modes = nla_nest_start_noflag(msg, attr); 1209 1209 int i; 1210 1210 1211 1211 if (!nl_modes) ··· 1233 1233 struct nlattr *nl_combis; 1234 1234 int i, j; 1235 1235 1236 - nl_combis = nla_nest_start(msg, 1237 - NL80211_ATTR_INTERFACE_COMBINATIONS); 1236 + nl_combis = nla_nest_start_noflag(msg, 1237 + NL80211_ATTR_INTERFACE_COMBINATIONS); 1238 1238 if (!nl_combis) 1239 1239 goto nla_put_failure; 1240 1240 ··· 1244 1244 1245 1245 c = &wiphy->iface_combinations[i]; 1246 1246 1247 - nl_combi = nla_nest_start(msg, i + 1); 1247 + nl_combi = nla_nest_start_noflag(msg, i + 1); 1248 1248 if (!nl_combi) 1249 1249 goto nla_put_failure; 1250 1250 1251 - nl_limits = nla_nest_start(msg, NL80211_IFACE_COMB_LIMITS); 1251 + nl_limits = nla_nest_start_noflag(msg, 1252 + NL80211_IFACE_COMB_LIMITS); 1252 1253 if (!nl_limits) 1253 1254 goto nla_put_failure; 1254 1255 1255 1256 for (j = 0; j < c->n_limits; j++) { 1256 1257 struct nlattr *nl_limit; 1257 1258 1258 - nl_limit = nla_nest_start(msg, j + 1); 1259 + nl_limit = nla_nest_start_noflag(msg, j + 1); 1259 1260 if (!nl_limit) 1260 1261 goto nla_put_failure; 1261 1262 if (nla_put_u32(msg, NL80211_IFACE_LIMIT_MAX, ··· 1309 1308 if (!tcp) 1310 1309 return 0; 1311 1310 1312 - nl_tcp = nla_nest_start(msg, NL80211_WOWLAN_TRIG_TCP_CONNECTION); 1311 + nl_tcp = nla_nest_start_noflag(msg, 1312 + NL80211_WOWLAN_TRIG_TCP_CONNECTION); 1313 1313 if (!nl_tcp) 1314 1314 return -ENOBUFS; 1315 1315 ··· 1350 1348 if (!rdev->wiphy.wowlan) 1351 1349 return 0; 1352 1350 1353 - nl_wowlan = nla_nest_start(msg, NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED); 1351 + nl_wowlan = nla_nest_start_noflag(msg, 1352 + NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED); 1354 1353 if (!nl_wowlan) 1355 1354 return -ENOBUFS; 1356 1355 ··· 1480 1477 1481 1478 if (sband->n_iftype_data) { 1482 1479 struct nlattr *nl_iftype_data = 1483 - nla_nest_start(msg, NL80211_BAND_ATTR_IFTYPE_DATA); 1480 + nla_nest_start_noflag(msg, 1481 + NL80211_BAND_ATTR_IFTYPE_DATA); 1484 1482 int err; 1485 1483 1486 1484 if (!nl_iftype_data) ··· 1490 1486 for (i = 0; i < sband->n_iftype_data; i++) { 1491 1487 struct nlattr *iftdata; 1492 1488 1493 - iftdata = nla_nest_start(msg, i + 1); 1489 + iftdata = nla_nest_start_noflag(msg, i + 1); 1494 1490 if (!iftdata) 1495 1491 return -ENOBUFS; 1496 1492 ··· 1506 1502 } 1507 1503 1508 1504 /* add bitrates */ 1509 - nl_rates = nla_nest_start(msg, NL80211_BAND_ATTR_RATES); 1505 + nl_rates = nla_nest_start_noflag(msg, NL80211_BAND_ATTR_RATES); 1510 1506 if (!nl_rates) 1511 1507 return -ENOBUFS; 1512 1508 1513 1509 for (i = 0; i < sband->n_bitrates; i++) { 1514 - nl_rate = nla_nest_start(msg, i); 1510 + nl_rate = nla_nest_start_noflag(msg, i); 1515 1511 if (!nl_rate) 1516 1512 return -ENOBUFS; 1517 1513 ··· 1544 1540 if (!mgmt_stypes) 1545 1541 return 0; 1546 1542 1547 - nl_ifs = nla_nest_start(msg, NL80211_ATTR_TX_FRAME_TYPES); 1543 + nl_ifs = nla_nest_start_noflag(msg, NL80211_ATTR_TX_FRAME_TYPES); 1548 1544 if (!nl_ifs) 1549 1545 return -ENOBUFS; 1550 1546 1551 1547 for (ift = 0; ift < NUM_NL80211_IFTYPES; ift++) { 1552 - nl_ftypes = nla_nest_start(msg, ift); 1548 + nl_ftypes = nla_nest_start_noflag(msg, ift); 1553 1549 if (!nl_ftypes) 1554 1550 return -ENOBUFS; 1555 1551 i = 0; ··· 1567 1563 1568 1564 nla_nest_end(msg, nl_ifs); 1569 1565 1570 - nl_ifs = nla_nest_start(msg, NL80211_ATTR_RX_FRAME_TYPES); 1566 + nl_ifs = nla_nest_start_noflag(msg, NL80211_ATTR_RX_FRAME_TYPES); 1571 1567 if (!nl_ifs) 1572 1568 return -ENOBUFS; 1573 1569 1574 1570 for (ift = 0; ift < NUM_NL80211_IFTYPES; ift++) { 1575 - nl_ftypes = nla_nest_start(msg, ift); 1571 + nl_ftypes = nla_nest_start_noflag(msg, ift); 1576 1572 if (!nl_ftypes) 1577 1573 return -ENOBUFS; 1578 1574 i = 0; ··· 1690 1686 if (!cap->ftm.supported) 1691 1687 return 0; 1692 1688 1693 - ftm = nla_nest_start(msg, NL80211_PMSR_TYPE_FTM); 1689 + ftm = nla_nest_start_noflag(msg, NL80211_PMSR_TYPE_FTM); 1694 1690 if (!ftm) 1695 1691 return -ENOBUFS; 1696 1692 ··· 1738 1734 * will genlmsg_cancel() if we fail 1739 1735 */ 1740 1736 1741 - pmsr = nla_nest_start(msg, NL80211_ATTR_PEER_MEASUREMENTS); 1737 + pmsr = nla_nest_start_noflag(msg, NL80211_ATTR_PEER_MEASUREMENTS); 1742 1738 if (!pmsr) 1743 1739 return -ENOBUFS; 1744 1740 ··· 1753 1749 nla_put_flag(msg, NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR)) 1754 1750 return -ENOBUFS; 1755 1751 1756 - caps = nla_nest_start(msg, NL80211_PMSR_ATTR_TYPE_CAPA); 1752 + caps = nla_nest_start_noflag(msg, NL80211_PMSR_ATTR_TYPE_CAPA); 1757 1753 if (!caps) 1758 1754 return -ENOBUFS; 1759 1755 ··· 1914 1910 break; 1915 1911 /* fall through */ 1916 1912 case 3: 1917 - nl_bands = nla_nest_start(msg, NL80211_ATTR_WIPHY_BANDS); 1913 + nl_bands = nla_nest_start_noflag(msg, 1914 + NL80211_ATTR_WIPHY_BANDS); 1918 1915 if (!nl_bands) 1919 1916 goto nla_put_failure; 1920 1917 ··· 1928 1923 if (!sband) 1929 1924 continue; 1930 1925 1931 - nl_band = nla_nest_start(msg, band); 1926 + nl_band = nla_nest_start_noflag(msg, band); 1932 1927 if (!nl_band) 1933 1928 goto nla_put_failure; 1934 1929 ··· 1942 1937 /* fall through */ 1943 1938 default: 1944 1939 /* add frequencies */ 1945 - nl_freqs = nla_nest_start( 1946 - msg, NL80211_BAND_ATTR_FREQS); 1940 + nl_freqs = nla_nest_start_noflag(msg, 1941 + NL80211_BAND_ATTR_FREQS); 1947 1942 if (!nl_freqs) 1948 1943 goto nla_put_failure; 1949 1944 1950 1945 for (i = state->chan_start - 1; 1951 1946 i < sband->n_channels; 1952 1947 i++) { 1953 - nl_freq = nla_nest_start(msg, i); 1948 + nl_freq = nla_nest_start_noflag(msg, 1949 + i); 1954 1950 if (!nl_freq) 1955 1951 goto nla_put_failure; 1956 1952 ··· 1996 1990 break; 1997 1991 /* fall through */ 1998 1992 case 4: 1999 - nl_cmds = nla_nest_start(msg, NL80211_ATTR_SUPPORTED_COMMANDS); 1993 + nl_cmds = nla_nest_start_noflag(msg, 1994 + NL80211_ATTR_SUPPORTED_COMMANDS); 2000 1995 if (!nl_cmds) 2001 1996 goto nla_put_failure; 2002 1997 ··· 2145 2138 const struct nl80211_vendor_cmd_info *info; 2146 2139 struct nlattr *nested; 2147 2140 2148 - nested = nla_nest_start(msg, NL80211_ATTR_VENDOR_DATA); 2141 + nested = nla_nest_start_noflag(msg, 2142 + NL80211_ATTR_VENDOR_DATA); 2149 2143 if (!nested) 2150 2144 goto nla_put_failure; 2151 2145 ··· 2162 2154 const struct nl80211_vendor_cmd_info *info; 2163 2155 struct nlattr *nested; 2164 2156 2165 - nested = nla_nest_start(msg, 2166 - NL80211_ATTR_VENDOR_EVENTS); 2157 + nested = nla_nest_start_noflag(msg, 2158 + NL80211_ATTR_VENDOR_EVENTS); 2167 2159 if (!nested) 2168 2160 goto nla_put_failure; 2169 2161 ··· 2200 2192 struct nlattr *nested; 2201 2193 u32 bss_select_support = rdev->wiphy.bss_select_support; 2202 2194 2203 - nested = nla_nest_start(msg, NL80211_ATTR_BSS_SELECT); 2195 + nested = nla_nest_start_noflag(msg, 2196 + NL80211_ATTR_BSS_SELECT); 2204 2197 if (!nested) 2205 2198 goto nla_put_failure; 2206 2199 ··· 2223 2214 rdev->wiphy.iftype_ext_capab) { 2224 2215 struct nlattr *nested_ext_capab, *nested; 2225 2216 2226 - nested = nla_nest_start(msg, 2227 - NL80211_ATTR_IFTYPE_EXT_CAPA); 2217 + nested = nla_nest_start_noflag(msg, 2218 + NL80211_ATTR_IFTYPE_EXT_CAPA); 2228 2219 if (!nested) 2229 2220 goto nla_put_failure; 2230 2221 ··· 2234 2225 2235 2226 capab = &rdev->wiphy.iftype_ext_capab[i]; 2236 2227 2237 - nested_ext_capab = nla_nest_start(msg, i); 2228 + nested_ext_capab = nla_nest_start_noflag(msg, 2229 + i); 2238 2230 if (!nested_ext_capab || 2239 2231 nla_put_u32(msg, NL80211_ATTR_IFTYPE, 2240 2232 capab->iftype) || ··· 3549 3539 params->cipher))) 3550 3540 goto nla_put_failure; 3551 3541 3552 - key = nla_nest_start(cookie->msg, NL80211_ATTR_KEY); 3542 + key = nla_nest_start_noflag(cookie->msg, NL80211_ATTR_KEY); 3553 3543 if (!key) 3554 3544 goto nla_put_failure; 3555 3545 ··· 4733 4723 u16 bitrate_compat; 4734 4724 enum nl80211_rate_info rate_flg; 4735 4725 4736 - rate = nla_nest_start(msg, attr); 4726 + rate = nla_nest_start_noflag(msg, attr); 4737 4727 if (!rate) 4738 4728 return false; 4739 4729 ··· 4820 4810 if (!mask) 4821 4811 return true; 4822 4812 4823 - attr = nla_nest_start(msg, id); 4813 + attr = nla_nest_start_noflag(msg, id); 4824 4814 if (!attr) 4825 4815 return false; 4826 4816 ··· 4855 4845 nla_put_u32(msg, NL80211_ATTR_GENERATION, sinfo->generation)) 4856 4846 goto nla_put_failure; 4857 4847 4858 - sinfoattr = nla_nest_start(msg, NL80211_ATTR_STA_INFO); 4848 + sinfoattr = nla_nest_start_noflag(msg, NL80211_ATTR_STA_INFO); 4859 4849 if (!sinfoattr) 4860 4850 goto nla_put_failure; 4861 4851 ··· 4944 4934 PUT_SINFO(CONNECTED_TO_GATE, connected_to_gate, u8); 4945 4935 4946 4936 if (sinfo->filled & BIT_ULL(NL80211_STA_INFO_BSS_PARAM)) { 4947 - bss_param = nla_nest_start(msg, NL80211_STA_INFO_BSS_PARAM); 4937 + bss_param = nla_nest_start_noflag(msg, 4938 + NL80211_STA_INFO_BSS_PARAM); 4948 4939 if (!bss_param) 4949 4940 goto nla_put_failure; 4950 4941 ··· 4988 4977 struct nlattr *tidsattr; 4989 4978 int tid; 4990 4979 4991 - tidsattr = nla_nest_start(msg, NL80211_STA_INFO_TID_STATS); 4980 + tidsattr = nla_nest_start_noflag(msg, 4981 + NL80211_STA_INFO_TID_STATS); 4992 4982 if (!tidsattr) 4993 4983 goto nla_put_failure; 4994 4984 ··· 5002 4990 if (!tidstats->filled) 5003 4991 continue; 5004 4992 5005 - tidattr = nla_nest_start(msg, tid + 1); 4993 + tidattr = nla_nest_start_noflag(msg, tid + 1); 5006 4994 if (!tidattr) 5007 4995 goto nla_put_failure; 5008 4996 ··· 5887 5875 nla_put_u32(msg, NL80211_ATTR_GENERATION, pinfo->generation)) 5888 5876 goto nla_put_failure; 5889 5877 5890 - pinfoattr = nla_nest_start(msg, NL80211_ATTR_MPATH_INFO); 5878 + pinfoattr = nla_nest_start_noflag(msg, NL80211_ATTR_MPATH_INFO); 5891 5879 if (!pinfoattr) 5892 5880 goto nla_put_failure; 5893 5881 if ((pinfo->filled & MPATH_INFO_FRAME_QLEN) && ··· 6338 6326 NL80211_CMD_GET_MESH_CONFIG); 6339 6327 if (!hdr) 6340 6328 goto out; 6341 - pinfoattr = nla_nest_start(msg, NL80211_ATTR_MESH_CONFIG); 6329 + pinfoattr = nla_nest_start_noflag(msg, NL80211_ATTR_MESH_CONFIG); 6342 6330 if (!pinfoattr) 6343 6331 goto nla_put_failure; 6344 6332 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) || ··· 6717 6705 nla_put_u8(msg, NL80211_ATTR_DFS_REGION, regdom->dfs_region))) 6718 6706 goto nla_put_failure; 6719 6707 6720 - nl_reg_rules = nla_nest_start(msg, NL80211_ATTR_REG_RULES); 6708 + nl_reg_rules = nla_nest_start_noflag(msg, NL80211_ATTR_REG_RULES); 6721 6709 if (!nl_reg_rules) 6722 6710 goto nla_put_failure; 6723 6711 ··· 6732 6720 freq_range = &reg_rule->freq_range; 6733 6721 power_rule = &reg_rule->power_rule; 6734 6722 6735 - nl_reg_rule = nla_nest_start(msg, i); 6723 + nl_reg_rule = nla_nest_start_noflag(msg, i); 6736 6724 if (!nl_reg_rule) 6737 6725 goto nla_put_failure; 6738 6726 ··· 8401 8389 NL80211_ATTR_PAD)) 8402 8390 goto nla_put_failure; 8403 8391 8404 - bss = nla_nest_start(msg, NL80211_ATTR_BSS); 8392 + bss = nla_nest_start_noflag(msg, NL80211_ATTR_BSS); 8405 8393 if (!bss) 8406 8394 goto nla_put_failure; 8407 8395 if ((!is_zero_ether_addr(res->bssid) && ··· 8578 8566 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex)) 8579 8567 goto nla_put_failure; 8580 8568 8581 - infoattr = nla_nest_start(msg, NL80211_ATTR_SURVEY_INFO); 8569 + infoattr = nla_nest_start_noflag(msg, NL80211_ATTR_SURVEY_INFO); 8582 8570 if (!infoattr) 8583 8571 goto nla_put_failure; 8584 8572 ··· 9419 9407 goto nla_put_failure; 9420 9408 } 9421 9409 9422 - data = nla_nest_start(skb, attr); 9410 + data = nla_nest_start_noflag(skb, attr); 9423 9411 if (!data) 9424 9412 goto nla_put_failure; 9425 9413 ··· 9593 9581 break; 9594 9582 } 9595 9583 9596 - tmdata = nla_nest_start(skb, NL80211_ATTR_TESTDATA); 9584 + tmdata = nla_nest_start_noflag(skb, NL80211_ATTR_TESTDATA); 9597 9585 if (!tmdata) { 9598 9586 genlmsg_cancel(skb, hdr); 9599 9587 break; ··· 10871 10859 if (!wowlan->n_patterns) 10872 10860 return 0; 10873 10861 10874 - nl_pats = nla_nest_start(msg, NL80211_WOWLAN_TRIG_PKT_PATTERN); 10862 + nl_pats = nla_nest_start_noflag(msg, NL80211_WOWLAN_TRIG_PKT_PATTERN); 10875 10863 if (!nl_pats) 10876 10864 return -ENOBUFS; 10877 10865 10878 10866 for (i = 0; i < wowlan->n_patterns; i++) { 10879 - nl_pat = nla_nest_start(msg, i + 1); 10867 + nl_pat = nla_nest_start_noflag(msg, i + 1); 10880 10868 if (!nl_pat) 10881 10869 return -ENOBUFS; 10882 10870 pat_len = wowlan->patterns[i].pattern_len; ··· 10902 10890 if (!tcp) 10903 10891 return 0; 10904 10892 10905 - nl_tcp = nla_nest_start(msg, NL80211_WOWLAN_TRIG_TCP_CONNECTION); 10893 + nl_tcp = nla_nest_start_noflag(msg, 10894 + NL80211_WOWLAN_TRIG_TCP_CONNECTION); 10906 10895 if (!nl_tcp) 10907 10896 return -ENOBUFS; 10908 10897 ··· 10947 10934 if (!req) 10948 10935 return 0; 10949 10936 10950 - nd = nla_nest_start(msg, NL80211_WOWLAN_TRIG_NET_DETECT); 10937 + nd = nla_nest_start_noflag(msg, NL80211_WOWLAN_TRIG_NET_DETECT); 10951 10938 if (!nd) 10952 10939 return -ENOBUFS; 10953 10940 ··· 10973 10960 return -ENOBUFS; 10974 10961 } 10975 10962 10976 - freqs = nla_nest_start(msg, NL80211_ATTR_SCAN_FREQUENCIES); 10963 + freqs = nla_nest_start_noflag(msg, NL80211_ATTR_SCAN_FREQUENCIES); 10977 10964 if (!freqs) 10978 10965 return -ENOBUFS; 10979 10966 ··· 10985 10972 nla_nest_end(msg, freqs); 10986 10973 10987 10974 if (req->n_match_sets) { 10988 - matches = nla_nest_start(msg, NL80211_ATTR_SCHED_SCAN_MATCH); 10975 + matches = nla_nest_start_noflag(msg, 10976 + NL80211_ATTR_SCHED_SCAN_MATCH); 10989 10977 if (!matches) 10990 10978 return -ENOBUFS; 10991 10979 10992 10980 for (i = 0; i < req->n_match_sets; i++) { 10993 - match = nla_nest_start(msg, i); 10981 + match = nla_nest_start_noflag(msg, i); 10994 10982 if (!match) 10995 10983 return -ENOBUFS; 10996 10984 ··· 11004 10990 nla_nest_end(msg, matches); 11005 10991 } 11006 10992 11007 - scan_plans = nla_nest_start(msg, NL80211_ATTR_SCHED_SCAN_PLANS); 10993 + scan_plans = nla_nest_start_noflag(msg, NL80211_ATTR_SCHED_SCAN_PLANS); 11008 10994 if (!scan_plans) 11009 10995 return -ENOBUFS; 11010 10996 11011 10997 for (i = 0; i < req->n_scan_plans; i++) { 11012 - scan_plan = nla_nest_start(msg, i + 1); 10998 + scan_plan = nla_nest_start_noflag(msg, i + 1); 11013 10999 if (!scan_plan) 11014 11000 return -ENOBUFS; 11015 11001 ··· 11058 11044 if (rdev->wiphy.wowlan_config) { 11059 11045 struct nlattr *nl_wowlan; 11060 11046 11061 - nl_wowlan = nla_nest_start(msg, NL80211_ATTR_WOWLAN_TRIGGERS); 11047 + nl_wowlan = nla_nest_start_noflag(msg, 11048 + NL80211_ATTR_WOWLAN_TRIGGERS); 11062 11049 if (!nl_wowlan) 11063 11050 goto nla_put_failure; 11064 11051 ··· 11493 11478 if (!rdev->coalesce->n_rules) 11494 11479 return 0; 11495 11480 11496 - nl_rules = nla_nest_start(msg, NL80211_ATTR_COALESCE_RULE); 11481 + nl_rules = nla_nest_start_noflag(msg, NL80211_ATTR_COALESCE_RULE); 11497 11482 if (!nl_rules) 11498 11483 return -ENOBUFS; 11499 11484 11500 11485 for (i = 0; i < rdev->coalesce->n_rules; i++) { 11501 - nl_rule = nla_nest_start(msg, i + 1); 11486 + nl_rule = nla_nest_start_noflag(msg, i + 1); 11502 11487 if (!nl_rule) 11503 11488 return -ENOBUFS; 11504 11489 ··· 11511 11496 rule->condition)) 11512 11497 return -ENOBUFS; 11513 11498 11514 - nl_pats = nla_nest_start(msg, 11515 - NL80211_ATTR_COALESCE_RULE_PKT_PATTERN); 11499 + nl_pats = nla_nest_start_noflag(msg, 11500 + NL80211_ATTR_COALESCE_RULE_PKT_PATTERN); 11516 11501 if (!nl_pats) 11517 11502 return -ENOBUFS; 11518 11503 11519 11504 for (j = 0; j < rule->n_patterns; j++) { 11520 - nl_pat = nla_nest_start(msg, j + 1); 11505 + nl_pat = nla_nest_start_noflag(msg, j + 1); 11521 11506 if (!nl_pat) 11522 11507 return -ENOBUFS; 11523 11508 pat_len = rule->patterns[j].pattern_len; ··· 12269 12254 NL80211_ATTR_PAD)) 12270 12255 goto nla_put_failure; 12271 12256 12272 - func_attr = nla_nest_start(msg, NL80211_ATTR_NAN_FUNC); 12257 + func_attr = nla_nest_start_noflag(msg, NL80211_ATTR_NAN_FUNC); 12273 12258 if (!func_attr) 12274 12259 goto nla_put_failure; 12275 12260 ··· 12386 12371 nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, match->addr)) 12387 12372 goto nla_put_failure; 12388 12373 12389 - match_attr = nla_nest_start(msg, NL80211_ATTR_NAN_MATCH); 12374 + match_attr = nla_nest_start_noflag(msg, NL80211_ATTR_NAN_MATCH); 12390 12375 if (!match_attr) 12391 12376 goto nla_put_failure; 12392 12377 12393 - local_func_attr = nla_nest_start(msg, NL80211_NAN_MATCH_FUNC_LOCAL); 12378 + local_func_attr = nla_nest_start_noflag(msg, 12379 + NL80211_NAN_MATCH_FUNC_LOCAL); 12394 12380 if (!local_func_attr) 12395 12381 goto nla_put_failure; 12396 12382 ··· 12400 12384 12401 12385 nla_nest_end(msg, local_func_attr); 12402 12386 12403 - peer_func_attr = nla_nest_start(msg, NL80211_NAN_MATCH_FUNC_PEER); 12387 + peer_func_attr = nla_nest_start_noflag(msg, 12388 + NL80211_NAN_MATCH_FUNC_PEER); 12404 12389 if (!peer_func_attr) 12405 12390 goto nla_put_failure; 12406 12391 ··· 12467 12450 NL80211_ATTR_PAD)) 12468 12451 goto nla_put_failure; 12469 12452 12470 - func_attr = nla_nest_start(msg, NL80211_ATTR_NAN_FUNC); 12453 + func_attr = nla_nest_start_noflag(msg, NL80211_ATTR_NAN_FUNC); 12471 12454 if (!func_attr) 12472 12455 goto nla_put_failure; 12473 12456 ··· 12816 12799 break; 12817 12800 } 12818 12801 12819 - vendor_data = nla_nest_start(skb, NL80211_ATTR_VENDOR_DATA); 12802 + vendor_data = nla_nest_start_noflag(skb, 12803 + NL80211_ATTR_VENDOR_DATA); 12820 12804 if (!vendor_data) { 12821 12805 genlmsg_cancel(skb, hdr); 12822 12806 break; ··· 13361 13343 if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex)) 13362 13344 goto nla_put_failure; 13363 13345 13364 - ftm_stats_attr = nla_nest_start(msg, NL80211_ATTR_FTM_RESPONDER_STATS); 13346 + ftm_stats_attr = nla_nest_start_noflag(msg, 13347 + NL80211_ATTR_FTM_RESPONDER_STATS); 13365 13348 if (!ftm_stats_attr) 13366 13349 goto nla_put_failure; 13367 13350 ··· 14385 14366 if (WARN_ON(!req)) 14386 14367 return 0; 14387 14368 14388 - nest = nla_nest_start(msg, NL80211_ATTR_SCAN_SSIDS); 14369 + nest = nla_nest_start_noflag(msg, NL80211_ATTR_SCAN_SSIDS); 14389 14370 if (!nest) 14390 14371 goto nla_put_failure; 14391 14372 for (i = 0; i < req->n_ssids; i++) { ··· 14394 14375 } 14395 14376 nla_nest_end(msg, nest); 14396 14377 14397 - nest = nla_nest_start(msg, NL80211_ATTR_SCAN_FREQUENCIES); 14378 + nest = nla_nest_start_noflag(msg, NL80211_ATTR_SCAN_FREQUENCIES); 14398 14379 if (!nest) 14399 14380 goto nla_put_failure; 14400 14381 for (i = 0; i < req->n_channels; i++) { ··· 14656 14637 14657 14638 if (uapsd_queues >= 0) { 14658 14639 struct nlattr *nla_wmm = 14659 - nla_nest_start(msg, NL80211_ATTR_STA_WME); 14640 + nla_nest_start_noflag(msg, NL80211_ATTR_STA_WME); 14660 14641 if (!nla_wmm) 14661 14642 goto nla_put_failure; 14662 14643 ··· 15097 15078 goto nla_put_failure; 15098 15079 15099 15080 /* Before */ 15100 - nl_freq = nla_nest_start(msg, NL80211_ATTR_FREQ_BEFORE); 15081 + nl_freq = nla_nest_start_noflag(msg, NL80211_ATTR_FREQ_BEFORE); 15101 15082 if (!nl_freq) 15102 15083 goto nla_put_failure; 15103 15084 ··· 15106 15087 nla_nest_end(msg, nl_freq); 15107 15088 15108 15089 /* After */ 15109 - nl_freq = nla_nest_start(msg, NL80211_ATTR_FREQ_AFTER); 15090 + nl_freq = nla_nest_start_noflag(msg, NL80211_ATTR_FREQ_AFTER); 15110 15091 if (!nl_freq) 15111 15092 goto nla_put_failure; 15112 15093 ··· 15540 15521 if (mac && nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, mac)) 15541 15522 goto nla_put_failure; 15542 15523 15543 - cb[1] = nla_nest_start(msg, NL80211_ATTR_CQM); 15524 + cb[1] = nla_nest_start_noflag(msg, NL80211_ATTR_CQM); 15544 15525 if (!cb[1]) 15545 15526 goto nla_put_failure; 15546 15527 ··· 15701 15682 nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid)) 15702 15683 goto nla_put_failure; 15703 15684 15704 - rekey_attr = nla_nest_start(msg, NL80211_ATTR_REKEY_DATA); 15685 + rekey_attr = nla_nest_start_noflag(msg, NL80211_ATTR_REKEY_DATA); 15705 15686 if (!rekey_attr) 15706 15687 goto nla_put_failure; 15707 15688 ··· 15756 15737 nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex)) 15757 15738 goto nla_put_failure; 15758 15739 15759 - attr = nla_nest_start(msg, NL80211_ATTR_PMKSA_CANDIDATE); 15740 + attr = nla_nest_start_noflag(msg, NL80211_ATTR_PMKSA_CANDIDATE); 15760 15741 if (!attr) 15761 15742 goto nla_put_failure; 15762 15743 ··· 16066 16047 struct nlattr *nl_results, *nl_match, *nl_freqs; 16067 16048 int i, j; 16068 16049 16069 - nl_results = nla_nest_start( 16070 - msg, NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS); 16050 + nl_results = nla_nest_start_noflag(msg, 16051 + NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS); 16071 16052 if (!nl_results) 16072 16053 return -EMSGSIZE; 16073 16054 16074 16055 for (i = 0; i < nd->n_matches; i++) { 16075 16056 struct cfg80211_wowlan_nd_match *match = nd->matches[i]; 16076 16057 16077 - nl_match = nla_nest_start(msg, i); 16058 + nl_match = nla_nest_start_noflag(msg, i); 16078 16059 if (!nl_match) 16079 16060 break; 16080 16061 ··· 16092 16073 } 16093 16074 16094 16075 if (match->n_channels) { 16095 - nl_freqs = nla_nest_start( 16096 - msg, NL80211_ATTR_SCAN_FREQUENCIES); 16076 + nl_freqs = nla_nest_start_noflag(msg, 16077 + NL80211_ATTR_SCAN_FREQUENCIES); 16097 16078 if (!nl_freqs) { 16098 16079 nla_nest_cancel(msg, nl_match); 16099 16080 goto out; ··· 16152 16133 if (wakeup) { 16153 16134 struct nlattr *reasons; 16154 16135 16155 - reasons = nla_nest_start(msg, NL80211_ATTR_WOWLAN_TRIGGERS); 16136 + reasons = nla_nest_start_noflag(msg, 16137 + NL80211_ATTR_WOWLAN_TRIGGERS); 16156 16138 if (!reasons) 16157 16139 goto free_msg; 16158 16140
+6 -6
net/wireless/pmsr.c
··· 420 420 { 421 421 struct nlattr *pmsr, *peers, *peer, *resp, *data, *typedata; 422 422 423 - pmsr = nla_nest_start(msg, NL80211_ATTR_PEER_MEASUREMENTS); 423 + pmsr = nla_nest_start_noflag(msg, NL80211_ATTR_PEER_MEASUREMENTS); 424 424 if (!pmsr) 425 425 goto error; 426 426 427 - peers = nla_nest_start(msg, NL80211_PMSR_ATTR_PEERS); 427 + peers = nla_nest_start_noflag(msg, NL80211_PMSR_ATTR_PEERS); 428 428 if (!peers) 429 429 goto error; 430 430 431 - peer = nla_nest_start(msg, 1); 431 + peer = nla_nest_start_noflag(msg, 1); 432 432 if (!peer) 433 433 goto error; 434 434 435 435 if (nla_put(msg, NL80211_PMSR_PEER_ATTR_ADDR, ETH_ALEN, res->addr)) 436 436 goto error; 437 437 438 - resp = nla_nest_start(msg, NL80211_PMSR_PEER_ATTR_RESP); 438 + resp = nla_nest_start_noflag(msg, NL80211_PMSR_PEER_ATTR_RESP); 439 439 if (!resp) 440 440 goto error; 441 441 ··· 452 452 if (res->final && nla_put_flag(msg, NL80211_PMSR_RESP_ATTR_FINAL)) 453 453 goto error; 454 454 455 - data = nla_nest_start(msg, NL80211_PMSR_RESP_ATTR_DATA); 455 + data = nla_nest_start_noflag(msg, NL80211_PMSR_RESP_ATTR_DATA); 456 456 if (!data) 457 457 goto error; 458 458 459 - typedata = nla_nest_start(msg, res->type); 459 + typedata = nla_nest_start_noflag(msg, res->type); 460 460 if (!typedata) 461 461 goto error; 462 462