Loading net/netlink/genetlink.c +25 −22 Original line number Original line Diff line number Diff line Loading @@ -394,10 +394,7 @@ static struct genl_family genl_ctrl = { static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq, static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq, u32 flags, struct sk_buff *skb, u8 cmd) u32 flags, struct sk_buff *skb, u8 cmd) { { struct nlattr *nla_ops; struct genl_ops *ops; void *hdr; void *hdr; int idx = 1; hdr = genlmsg_put(skb, pid, seq, &genl_ctrl, flags, cmd); hdr = genlmsg_put(skb, pid, seq, &genl_ctrl, flags, cmd); if (hdr == NULL) if (hdr == NULL) Loading @@ -409,6 +406,11 @@ static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq, NLA_PUT_U32(skb, CTRL_ATTR_HDRSIZE, family->hdrsize); NLA_PUT_U32(skb, CTRL_ATTR_HDRSIZE, family->hdrsize); NLA_PUT_U32(skb, CTRL_ATTR_MAXATTR, family->maxattr); NLA_PUT_U32(skb, CTRL_ATTR_MAXATTR, family->maxattr); if (!list_empty(&family->ops_list)) { struct nlattr *nla_ops; struct genl_ops *ops; int idx = 1; nla_ops = nla_nest_start(skb, CTRL_ATTR_OPS); nla_ops = nla_nest_start(skb, CTRL_ATTR_OPS); if (nla_ops == NULL) if (nla_ops == NULL) goto nla_put_failure; goto nla_put_failure; Loading Loading @@ -436,6 +438,7 @@ static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq, } } nla_nest_end(skb, nla_ops); nla_nest_end(skb, nla_ops); } return genlmsg_end(skb, hdr); return genlmsg_end(skb, hdr); Loading Loading
net/netlink/genetlink.c +25 −22 Original line number Original line Diff line number Diff line Loading @@ -394,10 +394,7 @@ static struct genl_family genl_ctrl = { static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq, static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq, u32 flags, struct sk_buff *skb, u8 cmd) u32 flags, struct sk_buff *skb, u8 cmd) { { struct nlattr *nla_ops; struct genl_ops *ops; void *hdr; void *hdr; int idx = 1; hdr = genlmsg_put(skb, pid, seq, &genl_ctrl, flags, cmd); hdr = genlmsg_put(skb, pid, seq, &genl_ctrl, flags, cmd); if (hdr == NULL) if (hdr == NULL) Loading @@ -409,6 +406,11 @@ static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq, NLA_PUT_U32(skb, CTRL_ATTR_HDRSIZE, family->hdrsize); NLA_PUT_U32(skb, CTRL_ATTR_HDRSIZE, family->hdrsize); NLA_PUT_U32(skb, CTRL_ATTR_MAXATTR, family->maxattr); NLA_PUT_U32(skb, CTRL_ATTR_MAXATTR, family->maxattr); if (!list_empty(&family->ops_list)) { struct nlattr *nla_ops; struct genl_ops *ops; int idx = 1; nla_ops = nla_nest_start(skb, CTRL_ATTR_OPS); nla_ops = nla_nest_start(skb, CTRL_ATTR_OPS); if (nla_ops == NULL) if (nla_ops == NULL) goto nla_put_failure; goto nla_put_failure; Loading Loading @@ -436,6 +438,7 @@ static int ctrl_fill_info(struct genl_family *family, u32 pid, u32 seq, } } nla_nest_end(skb, nla_ops); nla_nest_end(skb, nla_ops); } return genlmsg_end(skb, hdr); return genlmsg_end(skb, hdr); Loading