From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] [RFC] Potential bug in defining 'irq field' of 'ifmap structure' Date: Mon, 06 Jul 2009 17:25:01 -0700 (PDT) Message-ID: <20090706.172501.136390568.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: netdev-owner@vger.kernel.org To: m-sonasath@ti.com Cc: netdev@vger.kernel.org, linux-omap@vger.kernel.org, vikram.pandita@ti.com List-Id: linux-omap@vger.kernel.org From: "Sonasath, Moiz" Date: Mon, 6 Jul 2009 17:23:36 -0500 > 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. This is a known and unavoidable limitation of this interface. It's only real use is to control ISA style IRQs which are < 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 > Signed-off-by: Vikram Pandita You can't make these kinds of changes, every userland binary out there using this structure would break.