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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1236661850-8237-26-git-send-email-stoyboyker@gmail.com>
Date:	Tue, 10 Mar 2009 00:10:50 -0500
From:	Stoyan Gaydarov <stoyboyker@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Stoyan Gaydarov <stoyboyker@...il.com>
Subject: [PATCH 25/25] [drivers] BUG to BUG_ON changes

Signed-off-by: Stoyan Gaydarov <stoyboyker@...il.com>
---
 drivers/ata/pata_hpt366.c       |    3 +--
 drivers/base/iommu.c            |    4 +---
 drivers/gpu/drm/i915/intel_fb.c |    6 ++----
 drivers/mtd/ssfdc.c             |    3 +--
 drivers/sh/intc.c               |    3 +--
 5 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 65c28e5..8e0c9f6 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -234,8 +234,7 @@ static void hpt366_set_mode(struct ata_port *ap, struct ata_device *adev,
 			break;
 		clocks++;
 	}
-	if (!clocks->xfer_mode)
-		BUG();
+	BUG_ON(!clocks->xfer_mode);
 
 	/*
 	 * Combine new mode bits with old config bits and disable
diff --git a/drivers/base/iommu.c b/drivers/base/iommu.c
index 5e039d4..e564416 100644
--- a/drivers/base/iommu.c
+++ b/drivers/base/iommu.c
@@ -25,9 +25,7 @@ static struct iommu_ops *iommu_ops;
 
 void register_iommu(struct iommu_ops *ops)
 {
-	if (iommu_ops)
-		BUG();
-
+	BUG_ON(iommu_ops);
 	iommu_ops = ops;
 }
 
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index b7f0ebe..201b65c 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -663,8 +663,7 @@ static int intelfb_multi_fb_probe_crtc(struct drm_device *dev, struct drm_crtc *
 			if (connector->encoder->crtc == modeset->crtc) {
 				modeset->connectors[conn_count] = connector;
 				conn_count++;
-				if (conn_count > INTELFB_CONN_LIMIT)
-					BUG();
+				BUG_ON(conn_count > INTELFB_CONN_LIMIT);
 			}
 	}
 
@@ -812,8 +811,7 @@ static int intelfb_single_fb_probe(struct drm_device *dev)
 
 			if(connector->encoder->crtc == modeset->crtc) {
 				modeset->connectors[conn_count++] = connector;
-				if (conn_count > INTELFB_CONN_LIMIT)
-					BUG();
+				BUG_ON(conn_count > INTELFB_CONN_LIMIT);
 			}
 		}
 
diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c
index 3f67e00..5a1d8e2 100644
--- a/drivers/mtd/ssfdc.c
+++ b/drivers/mtd/ssfdc.c
@@ -393,8 +393,7 @@ static int ssfdcr_readsect(struct mtd_blktrans_dev *dev,
 		" block_addr=%d\n", logic_sect_no, sectors_per_block, offset,
 		block_address);
 
-	if (block_address >= ssfdc->map_len)
-		BUG();
+	BUG_ON(block_address >= ssfdc->map_len);
 
 	block_address = ssfdc->logic_block_map[block_address];
 
diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c
index 58d24c5..a031989 100644
--- a/drivers/sh/intc.c
+++ b/drivers/sh/intc.c
@@ -458,8 +458,7 @@ static unsigned int __init intc_prio_data(struct intc_desc *desc,
 			} else {
 				fn = REG_FN_MODIFY_BASE;
 				mode = MODE_PRIO_REG;
-				if (!pr->set_reg)
-					BUG();
+				BUG_ON(!pr->set_reg);
 				reg_e = pr->set_reg;
 				reg_d = pr->set_reg;
 			}
-- 
1.6.1.3

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