Re: [PATCH V4 1/6] IB Netlink Infrastructure

Roland Dreier
2011-05-09T19:35:26Z

> +int ibnl_add_client(int index, int nops,
> +                   const struct ibnl_client_cbs cb_table[])
> +{
> +       struct ibnl_client *cur;
> +       struct ibnl_client *nl_client = kmalloc(sizeof *nl_client, GFP_ATOMIC);
> +
> +       if (!nl_client)
> +               return -ENOMEM;
> +       nl_client->index = index;
> +       nl_client->nops = nops;
> +       nl_client->cb_table = cb_table;
> +       mutex_lock(&ibnl_mutex);

quick question: why is GFP_ATOMIC used here? It seems that since the
function later does mutex_lock(), there can't be any problem with sleeping.

- R.