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>] [day] [month] [year] [list]
Date:	Tue, 12 Sep 2006 00:22:13 -0700
From:	Hil <ubuntu@...cast.net>
To:	"Andrew J. Kroll" <ag784@...enet.buffalo.edu>,
	kernel-janitor-discuss@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Cc:	Eberhard Moenkeberg <emoenke@...g.de>
Subject: sbpcd.c: fix check_region to request_region

I looked at Linux Kernel Janitor project. There is a request of fixing
the old check_region function to request_region function. I did a grep
on the source tree and found several check_region. I will continue
fixing them after this patch is accepted. Please tell me if I'm doing
the submission correctly.

ChangeLog

- The file needs to be patched because it used deprecated check_region
function

- The check_region in the file simply checks if the region of memory is
available. I replaced that line with request_region followed by
release_region to make the check

- I do not have testing result available. I am sending this email to the
maintainer for testing. The maintainer probably has the specific CD-ROMs
to test my patch.

The kernel version for the patch is 2.6.18-rc6


--- linux-2.6.17/drivers/cdrom/sbpcd.c~	2006-09-11 14:19:53.000000000
-0700
+++ linux-2.6.17/drivers/cdrom/sbpcd.c	2006-09-11 23:47:48.000000000
-0700
@@ -5671,11 +5671,12 @@ int __init sbpcd_init(void)
 	{
 		addr[1]=sbpcd[port_index];
 		if (addr[1]==0) break;
-		if (check_region(addr[1],4))
+		if (!request_region(addr[1],4,major_name))
 		{
 			msg(DBG_INF,"check_region: %03X is not free.\n",addr[1]);
 			continue;
 		}
+		release_region(addr[1],4);
 		if (sbpcd[port_index+1]==2) type=str_sp;
 		else if (sbpcd[port_index+1]==1) type=str_sb;
 		else if (sbpcd[port_index+1]==3) type=str_t16;

Signed-off-by: Hil Liao <ubuntu@...cast.net>

-
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