Displaying 5 results from an estimated 5 matches for "blk_mq_put_tag".
2014 Sep 18
3
[PATCH] blk-mq: Avoid race condition with uninitialized requests
This patch should fix the bug reported in https://lkml.org/lkml/2014/9/11/249.
Test is still pending.
David Hildenbrand (1):
  blk-mq: Avoid race condition with uninitialized requests
 block/blk-mq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
-- 
1.8.5.5
2014 Sep 18
3
[PATCH] blk-mq: Avoid race condition with uninitialized requests
This patch should fix the bug reported in https://lkml.org/lkml/2014/9/11/249.
Test is still pending.
David Hildenbrand (1):
  blk-mq: Avoid race condition with uninitialized requests
 block/blk-mq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
-- 
1.8.5.5
2014 Sep 18
0
[PATCH] blk-mq: Avoid race condition with uninitialized requests
...tomic_inc(&data->hctx->nr_active);
@@ -258,6 +257,7 @@ static void __blk_mq_free_request(struct blk_mq_hw_ctx *hctx,
 
 	if (rq->cmd_flags & REQ_MQ_INFLIGHT)
 		atomic_dec(&hctx->nr_active);
+	rq->cmd_flags = 0;
 
 	clear_bit(REQ_ATOM_STARTED, &rq->atomic_flags);
 	blk_mq_put_tag(hctx, tag, &ctx->last_tag);
@@ -1404,6 +1404,8 @@ static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set,
 		left -= to_do * rq_size;
 		for (j = 0; j < to_do; j++) {
 			tags->rqs[i] = p;
+			tags->rqs[i]->atomic_flags = 0;
+			tags->rqs[i]->cmd_flags = 0...
2014 Sep 22
1
[PATCH] blk-mq: Avoid race condition with uninitialized requests
...tive);
> @@ -258,6 +257,7 @@ static void __blk_mq_free_request(struct blk_mq_hw_ctx *hctx,
> 
>  	if (rq->cmd_flags & REQ_MQ_INFLIGHT)
>  		atomic_dec(&hctx->nr_active);
> +	rq->cmd_flags = 0;
> 
>  	clear_bit(REQ_ATOM_STARTED, &rq->atomic_flags);
>  	blk_mq_put_tag(hctx, tag, &ctx->last_tag);
> @@ -1404,6 +1404,8 @@ static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set,
>  		left -= to_do * rq_size;
>  		for (j = 0; j < to_do; j++) {
>  			tags->rqs[i] = p;
> +			tags->rqs[i]->atomic_flags = 0;
> +			tag...
2014 Sep 22
1
[PATCH] blk-mq: Avoid race condition with uninitialized requests
...tive);
> @@ -258,6 +257,7 @@ static void __blk_mq_free_request(struct blk_mq_hw_ctx *hctx,
> 
>  	if (rq->cmd_flags & REQ_MQ_INFLIGHT)
>  		atomic_dec(&hctx->nr_active);
> +	rq->cmd_flags = 0;
> 
>  	clear_bit(REQ_ATOM_STARTED, &rq->atomic_flags);
>  	blk_mq_put_tag(hctx, tag, &ctx->last_tag);
> @@ -1404,6 +1404,8 @@ static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set,
>  		left -= to_do * rq_size;
>  		for (j = 0; j < to_do; j++) {
>  			tags->rqs[i] = p;
> +			tags->rqs[i]->atomic_flags = 0;
> +			tag...