[Devel] Re: [PATCH 1/4] Modularize the handling of netdev address c/r
Oren Laadan
orenl at cs.columbia.edu
Mon Apr 26 09:05:59 PDT 2010
Dan Smith wrote:
> OL> Does this test-and-set need locking ?
>
> No, I was just planning on getting lucky each time. Er, okay, yes :)
>
>>> + if (try_module_get(h->owner))
>>> + return h;
>>> + else
>>> + return ERR_PTR(-EBUSY);
>
> OL> Maybe some ckpt_err() here ? I can feel the frustration of trying
> OL> to figure out where _this_ came from !
>
> I'd prefer not to do that this deep. I think the varying depth at
> which we call ckpt_err() starts to get confusing. Regardless, the
True.
I was just thinking about a user seeing EBUSY and a message about
the netdev addr, and how he/she would reason that this is because
a module is missing ...
On the other hand, we could keep the scheme you have now, and then
document this possibility in a FAQ, readme, manual etc.
> call of this function is checked and reported, which I think will make
> tracking down an error result rather easy:
>
> h = get_addr_handler(i);
> if (!h)
> continue;
> else if (IS_ERR(h)) {
> addrs = PTR_ERR(h);
> ckpt_err(ctx, addrs,
> "Unable to handle netdev addr type %s\n",
> addr_modules[i]);
> break;
> }
>
> no?
Sure.
Oren.
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list