All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: "Måns Rullgård" <mru@inprovide.com>
Cc: Rommer <rommer@active.by>, Bernd Petrovitsch <bernd@firmix.at>,
	linux-kernel@vger.kernel.org
Subject: Re: udp.c
Date: Mon, 13 Jun 2005 19:23:36 +0200	[thread overview]
Message-ID: <9a87484905061310237e031c1a@mail.gmail.com> (raw)
In-Reply-To: <yw1xu0k2beeh.fsf@ford.inprovide.com>

On 6/13/05, Måns Rullgård <mru@inprovide.com> wrote:
> Rommer <rommer@active.by> writes:
> 
> > Bernd Petrovitsch wrote:
> >> On Mon, 2005-06-13 at 14:24 +0200, Måns Rullgård wrote:
> >>
> >>>Bernd Petrovitsch <bernd@firmix.at> writes:
> >>>
> >>>
> >>>>On Mon, 2005-06-13 at 14:57 +0300, Rommer wrote:
> >>>>
> >>>>>Where used strange function udp_v4_hash?
> >>>>>linux-2.6.11.11, net/ipv4/udp.c:204
> >>>>>
> >>>>>static void udp_v4_hash(struct sock *sk)
> >>>>
> >>>>Since it is "static" the user must be in the same source file (or -
> >>>>theoretically - any included header).
> >>>
> >>>It's not that simple.  It is assigned to the 'hash' field of a struct
> >> If you interpret "called" word-by-word yes. I assumed "used".
> >>
> >>>proto, which is exported.  It could be used from anywhere, but
> >> The the OP has to grep for dereferences for this hash variable and
> >> check
> >> if it is (or may be) from the given struct.
> >> Well, that's the virtue of object-orientation: Follow the objects, not
> >> the functions/methods.
> >>
> >>>hopefully isn't.  Something else is supposed to ensure that it is
> >>>never called when using the UDP protocol.
> >
> > So, why BUG(), not just void function?
> 
> Calling the function would be the result of a bug elsewhere in the
> code, which should be detected and reported.
> 
Why not remove the function and audit the code for users (and if any,
remove them)...? Let's get rid of it instead of having a function sit
around the only purpose of which is to BUG();

-- 
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

  reply	other threads:[~2005-06-13 17:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-13 11:57 udp.c Rommer
2005-06-13 12:03 ` udp.c Bernd Petrovitsch
2005-06-13 12:24   ` udp.c Måns Rullgård
2005-06-13 12:34     ` udp.c Bernd Petrovitsch
2005-06-13 12:54       ` udp.c Rommer
2005-06-13 12:57         ` udp.c Bernd Petrovitsch
2005-06-13 13:00         ` udp.c Måns Rullgård
2005-06-13 17:23           ` Jesper Juhl [this message]
2005-06-13 19:45             ` udp.c David S. Miller
2005-06-13 21:42               ` udp.c Herbert Xu
2005-06-13 21:57                 ` udp.c David S. Miller
2005-06-13 23:04                   ` udp.c Herbert Xu
2005-06-13 23:20                     ` udp.c David S. Miller
2005-06-13 23:53                       ` udp.c Andi Kleen
2005-06-14  0:00                         ` udp.c David S. Miller
2005-06-14  0:12                           ` udp.c Andi Kleen
2005-06-14  1:11                             ` udp.c David S. Miller
2005-06-13 12:08 ` udp.c Adrian Bunk

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=9a87484905061310237e031c1a@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=bernd@firmix.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mru@inprovide.com \
    --cc=rommer@active.by \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.