Re: [PATCH 1/3] net/bridge/br_if.c: don't use _WORK_NAR

Oleg Nesterov
2007-02-19T15:01:56Z

On 02/19, Jarek Poplawski wrote:
>
> On Mon, Feb 19, 2007 at 03:03:53PM +0300, Oleg Nesterov wrote:
> > On 02/19, Jarek Poplawski wrote:
> ...
> > kfree() doesn't check WORK_STRUCT_PENDING, it makes no
> > difference if it is set or not when work->func() runs.
>
> It looks like it's to be checked before kfree.

Here,
br_add_if:

schedule_delayed_work(&p->carrier_check, BR_PORT_DEBOUNCE);

schedule_delayed_work() fails if this bit is set. So the only difference with
this patch is:

before:
schedule_delayed_work() fails unless port_carrier_check() passed
work_release() (before rtnl_lock())

after:
schedule_delayed_work() fails unless run_workqueue() cleared this
bit (before calling port_carrier_check())

> > We are going to kill _NAR stuff.
>
> If you're sure nobody uses this in any way then it
> seems the right decision.

Yes, this series converts all users.

Oleg.