[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpX+wfpkNiRfom148FEuSTqH_S3OiY31e+uCcTiuCx4etg@mail.gmail.com>
Date: Fri, 7 Oct 2011 21:34:32 +0800
From: Américo Wang <xiyou.wangcong@...il.com>
To: Mitsuo Hayasaka <mitsuo.hayasaka.hu@...achi.com>
Cc: Jay Vosburgh <fubar@...ibm.com>,
Andy Gospodarek <andy@...yhouse.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, yrl.pp-manager.tt@...achi.com
Subject: Re: [RFC PATCH net 2/2] [BUGFIX] bonding: use flush_delayed_work_sync
in bond_close
On Fri, Oct 7, 2011 at 8:50 PM, Mitsuo Hayasaka
<mitsuo.hayasaka.hu@...achi.com> wrote:
> The bond_close() calls cancel_delayed_work() to cancel delayed works.
> It, however, cannot cancel works that were already queued in workqueue.
> The bond_open() initializes work->data, and proccess_one_work() refers
> get_work_cwq(work)->wq->flags. The get_work_cwq() returns NULL when
> work->data has been initialized. Thus, a panic occurs.
>
> This patch uses flush_delayed_work_sync() instead of cancel_delayed_work()
> in bond_close(). It cancels delayed timer and waits for work to finish
> execution. So, it can avoid the null pointer dereference due to the
> parallel executions of proccess_one_work() and initializing proccess
> of bond_open().
>
> Signed-off-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@...achi.com>
> Cc: Jay Vosburgh <fubar@...ibm.com>
> Cc: Andy Gospodarek <andy@...yhouse.net>
Makes sense,
Reviewed-by: WANG Cong <xiyou.wangcong@...il.com>
Thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists