Powered by Linux
bug: got a segfault — Semantic Matching Tool

bug: got a segfault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,

with smatch compiled from today's git and checking a driver from linus
tree of today with the attached patch on top, I got a segfault in
smatch. Note that the patch is bogus and creates a non-compilable
source, but smatch still shouldn't segfault. kernelconfig was an ARM
allnoconfig with just I2C enabled.

Can you reproduce?

Thanks,

   Wolfram

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index 97998946c4f64b..d6fdc3e77c6847 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -448,7 +448,7 @@ static int read_i2c(struct nmk_i2c_dev *dev, u16 flags)
 {
 	u32 status = 0;
 	u32 mcr, irq_mask;
-	int timeout;
+	unsigned long time_left;
 
 	mcr = load_i2c_mcr_reg(dev, flags);
 	writel(mcr, dev->virtbase + I2C_MCR);
@@ -517,7 +517,7 @@ static int write_i2c(struct nmk_i2c_dev *dev, u16 flags)
 {
 	u32 status = 0;
 	u32 mcr, irq_mask;
-	int timeout;
+	unsigned long time_left;
 
 	mcr = load_i2c_mcr_reg(dev, flags);
 

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux