Skip to contentSkip to conversation

Fix sign handling bugs in 2.5

PATCH In review Ravikiran G Thirumalai 1 participant 6 messages Jun 12, 2003

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix sign handling bugs in 2.5

Here's a patchset to fix sign handling bugs. This is based on Alan's list, and is mostly a forward port from 2.4

This patchset is for
- sign handling bug in Decnet
- sign handling bug in epca
- sign handling bug in mpt fusion
- sign handling bug in tun
- sign handling bug in aacraid

The following in Alan's list did not need a fix since it is already taken care of in current bk.
- sign handling bug in mwave

Patches will follow this note. Patches compile, but are not really tested.

Thanks,
Kiran

#1 lore raw

Re: [patchset] Fix sign handling bugs in 2.5 -- 1/5; Decnet

net/decnet/af_decnet.c +1 -1
@@ -1227,7 +1227,7 @@
 	struct sock *sk = sock->sk;
 	struct dn_scp *scp = DN_SK(sk);
 	int err = -EOPNOTSUPP;
-	unsigned long amount = 0;
+	long amount = 0;
 	struct sk_buff *skb;
 	int val;
 
#2 lore raw

Re: [patchset] Fix sign handling bugs in 2.5 -- 2/5; epca

In reply to Ravikiran G Thirumalai
drivers/char/epca.c +2 -2
@@ -3740,7 +3740,7 @@
 
 			case 5:
 				board.port = (unsigned char *)ints[index];
-				if (board.port <= 0)
+				if (ints[index] <= 0)
 				{
 					printk(KERN_ERR "<Error> - epca_setup: Invalid io port 0x%x\n", (unsigned int)board.port);
 					invalid_lilo_config = 1;
@@ -3752,7 +3752,7 @@
 
 			case 6:
 				board.membase = (unsigned char *)ints[index];
-				if (board.membase <= 0)
+				if (ints[index] <= 0)
 				{
 					printk(KERN_ERR "<Error> - epca_setup: Invalid memory base 0x%x\n",(unsigned int)board.membase);
 					invalid_lilo_config = 1;
#3 lore raw

Re: [patchset] Fix sign handling bugs in 2.5 -- 3/5; mpt fusion

In reply to Ravikiran G Thirumalai
drivers/message/fusion/mptbase.c +3 -2
@@ -1822,6 +1822,7 @@
 	if (this != NULL) {
 		int sz;
 		u32 state;
+		int ret;
 
 		/* Disable the FW */
 		state = mpt_GetIocState(this, 1);
@@ -1832,9 +1833,9 @@
 		if (this->cached_fw != NULL) {
 			ddlprintk((KERN_INFO MYNAM ": Pushing FW onto adapter\n"));
 
-			if ((state = mpt_downloadboot(this, NO_SLEEP)) < 0) {
+			if ((ret = mpt_downloadboot(this, NO_SLEEP)) < 0) {
 				printk(KERN_WARNING MYNAM
-					": firmware downloadboot failure (%d)!\n", state);
+					": firmware downloadboot failure (%d)!\n", ret);
 			}
 		}
 
#4 lore raw

Re: [patchset] Fix sign handling bugs in 2.5 -- 4/5; tun

In reply to Ravikiran G Thirumalai
drivers/net/tun.c +1 -1
@@ -185,7 +185,7 @@
 	size_t len = count;
 
 	if (!(tun->flags & TUN_NO_PI)) {
-		if ((len -= sizeof(pi)) < 0)
+		if ((len -= sizeof(pi)) > len)
 			return -EINVAL;
 
 		memcpy_fromiovec((void *)&pi, iv, sizeof(pi));
#5 lore raw

Re: [patchset] Fix sign handling bugs in 2.5 -- 5/5; aacraid

In reply to Ravikiran G Thirumalai
drivers/scsi/aacraid/aachba.c +2 -1
diff -ruN -X dontdiff linux-2.5.70/drivers/scsi/aacraid/aachba.c shb-aacraid-2.5.70/drivers/scsi/aacraid/aachba.c
@@ -229,7 +229,8 @@
 int aac_get_containers(struct aac_dev *dev)
 {
 	struct fsa_scsi_hba *fsa_dev_ptr;
-	u32 index, status = 0;
+	u32 index; 
+	int status = 0;
 	struct aac_query_mount *dinfo;
 	struct aac_mount *dresp;
 	struct fib * fibptr;