From: David Miller <davem@davemloft.net>
To: m-sonasath@ti.com
Cc: netdev@vger.kernel.org, linux-omap@vger.kernel.org,
vikram.pandita@ti.com
Subject: Re: [PATCH] [RFC] Potential bug in defining 'irq field' of 'ifmap structure'
Date: Mon, 06 Jul 2009 17:25:01 -0700 (PDT) [thread overview]
Message-ID: <20090706.172501.136390568.davem@davemloft.net> (raw)
In-Reply-To: <CD8CC2B65FEE304DA95744A5472698F202952C3124@dlee06.ent.ti.com>
From: "Sonasath, Moiz" <m-sonasath@ti.com>
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 <m-sonasath@ti.com>
> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
You can't make these kinds of changes, every userland binary out there
using this structure would break.
next prev parent reply other threads:[~2009-07-07 0:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2009-07-07 20:57 ` Pandita, Vikram
2009-07-08 1:32 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090706.172501.136390568.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-omap@vger.kernel.org \
--cc=m-sonasath@ti.com \
--cc=netdev@vger.kernel.org \
--cc=vikram.pandita@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox