From: Nick.Holloway@pyrites.org.uk (Nick Holloway)
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: test11-pre5
Date: 16 Nov 2000 08:51:33 -0000 [thread overview]
Message-ID: <8v076l$4ir$1@alfie.demon.co.uk> (raw)
In-Reply-To: <3A11C1B6.E61FF9F6@mandrakesoft.com> <Pine.LNX.4.21.0011150104250.26856-100000@callisto.yi.org>
karrde@callisto.yi.org (Dan Aloni) writes:
> Is there a special reason why dev->name is not a pointer?
One of the changes in 2.3 was to change dev->name from a pointer to the
char array. A little bit painful (in terms of the number of changes,
rather than the complexity).
The reason for this is that dev->name needs to be writeable, each instance
of dev->name must not be shared, and there needs to be at least IFNAMSIZ
bytes allocated.
The problem that first triggered the change was that gcc was sharing
all instances of "eth%d", so there was a problem with multiple adaptors
referenced from the same source file.
It just happens that the kernel does not implement read-only strings
(as userspace does), but it could do in the future. This would cause
problem if dev->name is a pointer.
Finally, looking through the many net drivers, many failed to reserve
IFNAMSIZ (currently 16) bytes. Some allocated 8, some 9, some 17.
--
`O O' | Nick.Holloway@pyrites.org.uk
// ^ \\ | http://www.pyrites.org.uk/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-11-16 9:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-14 21:47 test11-pre5 Linus Torvalds
2000-11-14 22:45 ` [PATCH] test11-pre5 Dan Aloni
2000-11-14 22:50 ` Jeff Garzik
2000-11-14 23:10 ` Dan Aloni
2000-11-14 23:14 ` Jeff Garzik
2000-11-14 23:51 ` Linus Torvalds
2000-11-16 8:51 ` Nick Holloway [this message]
2000-11-14 23:47 ` Linus Torvalds
2000-11-15 0:25 ` Dan Aloni
2000-11-15 0:25 ` David S. Miller
2000-11-15 0:59 ` Dan Aloni
2000-11-15 0:49 ` David S. Miller
2000-11-14 22:47 ` test11-pre5 Jes Sorensen
2000-11-14 23:08 ` [uPATCH] test11-pre5 Bartlomiej Zolnierkiewicz
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='8v076l$4ir$1@alfie.demon.co.uk' \
--to=nick.holloway@pyrites.org.uk \
--cc=linux-kernel@vger.kernel.org \
/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