[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1368587247.9012.34.camel@haakon3.risingtidesystems.com>
Date: Tue, 14 May 2013 20:07:27 -0700
From: "Nicholas A. Bellinger" <nab@...ux-iscsi.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Joern Engel <joern@...fs.org>, linux-kernel@...r.kernel.org,
target-devel <target-devel@...r.kernel.org>
Subject: Re: [PATCH 2/3] target: close target_put_sess_cmd() vs.
core_tmr_abort_task() race v5
On Tue, 2013-05-14 at 15:04 -0400, Greg Kroah-Hartman wrote:
> On Mon, May 13, 2013 at 04:30:06PM -0400, Joern Engel wrote:
> > It is possible for one thread to to take se_sess->sess_cmd_lock in
> > core_tmr_abort_task() before taking a reference count on
> > se_cmd->cmd_kref, while another thread in target_put_sess_cmd() drops
> > se_cmd->cmd_kref before taking se_sess->sess_cmd_lock.
> >
> > This introduces kref_put_spinlock_irqsave() and uses it in
> > target_put_sess_cmd() to close the race window.
> >
> > Signed-off-by: Joern Engel <joern@...fs.org>
>
> For the kref.h part, please feel free to add:
>
> Acked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Applied to target-pending/queue
Since this fixes a real long-standing bug within tcm_qla2xxx code, I'm
adding a CC' to stable as well.
Thanks Joern + Greg-KH!
--nab
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists