public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [RFC] Potential bug in defining 'irq field' of 'ifmap structure'
@ 2009-07-06 22:23 Sonasath, Moiz
  2009-07-07  0:25 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Sonasath, Moiz @ 2009-07-06 22:23 UTC (permalink / raw)
  To: David S. Miller, netdev@vger.kernel.org
  Cc: linux-omap@vger.kernel.org, Pandita, Vikram


From: Moiz Sonasath <m-sonasath@ti.com>

There seems to be a bug in the ioctl implementation in /kernel/net/core/dev.c 
 
dev_ifsioc_locked()
	case SIOCGIFMAP:
			ifr->ifr_map.irq = dev->irq;   // ?? type mismatch

Here
ifr->ifr_map.irq) is of type unsigned char
dev-irq is of type unsigned int

So ifconfig reports a wrong irq number when the dev->irq number is > 255.

I am confused to see the same typedefs in file: net/if.h 
Not sure how to make changes for the user side net/if.h file?

Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
	
---
 include/linux/if.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/if.h b/include/linux/if.h
index 2d89c96..1ac6559 100644
--- a/include/linux/if.h
+++ b/include/linux/if.h
@@ -126,7 +126,7 @@ struct ifmap
 	unsigned long mem_start;
 	unsigned long mem_end;
 	unsigned short base_addr;
-	unsigned char irq;
+	unsigned int irq;
 	unsigned char dma;
 	unsigned char port;
 	/* 3 bytes spare */
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-08  1:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-06 22:23 [PATCH] [RFC] Potential bug in defining 'irq field' of 'ifmap structure' Sonasath, Moiz
2009-07-07  0:25 ` David Miller
2009-07-07 20:57   ` Pandita, Vikram
2009-07-08  1:32     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox