This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.
Cong Wang xiyou.wangcong at gmail.comOn Sun, May 8, 2016 at 3:55 PM, Pablo Neira Ayuso <pablo at netfilter.org> wrote:
> +static int gtp_genl_new_pdp(struct sk_buff *skb, struct genl_info *info)
> +{
...
> +
> + net = gtp_genl_get_net(sock_net(skb->sk), info->attrs);
> + if (IS_ERR(net))
> + return PTR_ERR(net);
> +
> + /* Check if there's an existing gtpX device to configure */
> + dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK]));
> + if (dev == NULL)
> + return -ENODEV;
> +
> + return ipv4_pdp_add(dev, info);
Seems you are leaking struct net at least in the error path.