Skip to contentSkip to conversation

Masking bug in 6pack driver?

PATCH In review Jean Delvare 2 participants 2 messages Nov 23, 2006 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Masking bug in 6pack driver?

Looks like a broken masking to me, binary not is used where bitwise not was intended.

---
 drivers/net/hamradio/6pack.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hamradio/6pack.c +1 -1
@@ -914,7 +914,7 @@
 					printk(KERN_DEBUG "6pack: protocol violation\n");
 				else
 					sp->status = 0;
-				cmd &= !SIXP_RX_DCD_MASK;
+				cmd &= ~SIXP_RX_DCD_MASK;
 		}
 		sp->status = cmd & SIXP_PRIO_DATA_MASK;
 	} else { /* output watchdog char if idle */
Signature · 1 line
Jean Delvare
#1 lore raw
Quoted 2 lines · Jean Delvare

Looks like a broken masking to me, binary not is used where bitwise not was intended.

Amazing ...

Forwarded to upstream; with a bit of luck your fix will still make it into 2.6.19.

Ralf