lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1490851245-32245-1-git-send-email-minchan@kernel.org>
Date:   Thu, 30 Mar 2017 14:20:45 +0900
From:   Minchan Kim <minchan@...nel.org>
To:     Jens Axboe <axboe@...com>
Cc:     kernel-team@....com, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, Minchan Kim <minchan@...nel.org>,
        Sagi Grimberg <sagi@...mberg.me>,
        Omar Sandoval <osandov@...com>
Subject: [PATCH] block: do not put mq context in blk_mq_alloc_request_hctx

In blk_mq_alloc_request_hctx, blk_mq_sched_get_request doesn't
get sw context so we don't need to put the context with
blk_mq_put_ctx. Unless, we will see preempt counter underflow.

Cc: Sagi Grimberg <sagi@...mberg.me>
Cc: Omar Sandoval <osandov@...com>
Cc: Jens Axboe <axboe@...com>
Signed-off-by: Minchan Kim <minchan@...nel.org>
---

Maybe, it would be fixed by someone but I have noticed preempt counter
undeflow problem a few weeks ago and still see the problem with
linux-next.

 block/blk-mq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index a4546f060e80..a6f3998dc4ee 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -321,7 +321,6 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q, int rw,
 
 	rq = blk_mq_sched_get_request(q, NULL, rw, &alloc_data);
 
-	blk_mq_put_ctx(alloc_data.ctx);
 	blk_queue_exit(q);
 
 	if (!rq)
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ