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: <1330863026-2696-1-git-send-email-linkinjeon@gmail.com>
Date:	Sun,  4 Mar 2012 07:10:26 -0500
From:	Namjae Jeon <linkinjeon@...il.com>
To:	axboe@...nel.dk, tj@...nel.org
Cc:	linux-kernel@...r.kernel.org, Namjae Jeon <linkinjeon@...il.com>
Subject: [PATCH] cfq: fix NULL pointer dereference in cfq_choose_cfqg.

I found null pointer dereferencing possibility while reviewing.
If cfq_get_next_cfqg return null by RB_EMPTY_ROOT, null pointer dereferencing error can occur.

Signed-off-by: Namjae Jeon <linkinjeon@...il.com>
---
 block/cfq-iosched.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index d0ba505..d924272 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -2306,7 +2306,7 @@ static void cfq_choose_cfqg(struct cfq_data *cfqd)
 	cfqd->serving_group = cfqg;
 
 	/* Restore the workload type data */
-	if (cfqg->saved_workload_slice) {
+	if (!cfqg && cfqg->saved_workload_slice) {
 		cfqd->workload_expires = jiffies + cfqg->saved_workload_slice;
 		cfqd->serving_type = cfqg->saved_workload;
 		cfqd->serving_prio = cfqg->saved_serving_prio;
-- 
1.7.5.4

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ