[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <024e01d3792d$291ef420$7b5cdc60$@lab.ntt.co.jp>
Date: Wed, 20 Dec 2017 09:54:59 +0900
From: "Prashant Bhole" <bhole_prashant_q7@....ntt.co.jp>
To: "'Jakub Kicinski'" <jakub.kicinski@...ronome.com>
Cc: "'David Miller'" <davem@...emloft.net>, <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next] netdevsim: correctly check return value of debugfs_create_dir
> From: Jakub Kicinski [mailto:jakub.kicinski@...ronome.com]
>
> On Wed, 20 Dec 2017 09:38:52 +0900, Prashant Bhole wrote:
> > > > 2) In case sim0 or bpf_bound_progs are fail to create, we need to
> > > > add checks before creating any file in them.
> > >
> > > What do you mean by "check before"? Checking if creation of each
> > > file fails or not, or something different?
> >
> > For example:
> > I will check if state->ddir is not NULL before creating files in it.
> >
> > if (state->ddir) {
> > debugfs_create_u32("id", 0400, state->ddir, &prog->aux->id);
> > debugfs_create_file("state", 0400, state->ddir,
> > &state->state, &nsim_bpf_string_fops);
> > debugfs_create_bool("loaded", 0400, state->ddir, &state->is_loaded);
> > }
>
> Ah, I would just error out in case we can't create any of the
sub-directories as
> well.
Does that mean fatal error if we can't create any of the subdirectories?
Or
Similar check as mentioned above before creating subdirectories? (I was
about to do this)
-Prashant
Powered by blists - more mailing lists