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: <758a2bbf0702201746p3959235ele3db9b600a9f8104@mail.gmail.com>
Date:	Tue, 20 Feb 2007 17:46:13 -0800
From:	"Vijay Sampath" <vsampath@...il.com>
To:	joern@...fh-wedel.de, linux-mtd@...ts.infradead.org
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH] [MTD] CHIPS: oops in cfi_amdstd_sync

From: Vijay Sampath <vsampath@...il.com>

The files cfi_cmdset_0002.c and cfi_cmdset_0020.c do not initialize
their wait queues like is done in cfi_cmdset_0001.c. This causes an
oops when the wait queue is accessed. I have copied the code from
cfi_cmdset_0001.c that is pertinent to initialization of the wait
queue.

Signed-off-by: Vijay Sampath <vsampath@...il.com>
---

diff -uprN -X linux-2.6.20.1-vanilla/Documentation/dontdiff
linux-2.6.20.1-vanilla/drivers/mtd/chips/cfi_cmdset_0002.c
linux-2.6/drivers/mtd/chips/cfi_cmdset_0002.c
--- linux-2.6.20.1-vanilla/drivers/mtd/chips/cfi_cmdset_0002.c	2007-02-20
17:01:57.000000000 -0800
+++ linux-2.6/drivers/mtd/chips/cfi_cmdset_0002.c	2007-02-20
17:05:23.000000000 -0800
@@ -359,6 +359,8 @@ struct mtd_info *cfi_cmdset_0002(struct
 		cfi->chips[i].word_write_time = 1<<cfi->cfiq->WordWriteTimeoutTyp;
 		cfi->chips[i].buffer_write_time = 1<<cfi->cfiq->BufWriteTimeoutTyp;
 		cfi->chips[i].erase_time = 1<<cfi->cfiq->BlockEraseTimeoutTyp;
+		cfi->chips[i].ref_point_counter = 0;
+		init_waitqueue_head(&(cfi->chips[i].wq));
 	}

 	map->fldrv = &cfi_amdstd_chipdrv;
diff -uprN -X linux-2.6.20.1-vanilla/Documentation/dontdiff
linux-2.6.20.1-vanilla/drivers/mtd/chips/cfi_cmdset_0020.c
linux-2.6/drivers/mtd/chips/cfi_cmdset_0020.c
--- linux-2.6.20.1-vanilla/drivers/mtd/chips/cfi_cmdset_0020.c	2007-02-20
17:01:57.000000000 -0800
+++ linux-2.6/drivers/mtd/chips/cfi_cmdset_0020.c	2007-02-20
17:06:14.000000000 -0800
@@ -158,6 +158,8 @@ struct mtd_info *cfi_cmdset_0020(struct
 		cfi->chips[i].word_write_time = 128;
 		cfi->chips[i].buffer_write_time = 128;
 		cfi->chips[i].erase_time = 1024;
+		cfi->chips[i].ref_point_counter = 0;
+		init_waitqueue_head(&(cfi->chips[i].wq));
 	}

 	return cfi_staa_setup(map);
-
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