public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.net>
Subject: Re: [B.A.T.M.A.N.] [batman-adv] VIS startup race condition fix plus coding style	cleanup
Date: Thu, 16 Jul 2009 02:00:30 +0800	[thread overview]
Message-ID: <200907160200.31170.lindner_marek@yahoo.de> (raw)
In-Reply-To: <20090714163750.GR19071@ma.tech.ascom.ch>

On Wednesday 15 July 2009 00:37:50 Andrew Lunn wrote:
> There is a race condition between batman starting, adding the
> interfaces and creating the bat0 interface, and setting VIS into
> server mode, by echo'ing server into /proc/net/batman/vis. If you
> enable server mode before the bat0 interface is up and running, this
> gets forgotten when bat0 comes up. The vis_init() function has been
> split into two parts, vis_init() and vis_start(). vis_init() is called
> during the module init function and vis_start() is called when the
> bat0 interface is setup, thus closing the race.
>
> The files vis.[ch] have also been cleaned up with respect to the Linux
> kernel coding standard and 2.6.29 checkpatch script.

Sorry, the code review of this patch took a bit more time as it is a quite 
long one and mixes several topics:
* coding style cleaning
* race condition
* struct changes and their respective code modifications
* moving a variable to proc.c

It would be very helpful if you split the patch into smaller parts before I 
submit them. Is that feasible ?

Nevertheless, I dug through and noticed you modified the struct vis_info by 
adding "struct vis_info_entry entries[130];". This would lead to an allocation 
of nearly 1KB (130 * 7 Bytes) for every incoming vis packet. Is that 
intended ? 

I also applied your coding style patches for bitarray.[ch] and hash.[ch]. 
Thanks!

Regards,
Marek




  reply	other threads:[~2009-07-15 18:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 16:37 [B.A.T.M.A.N.] [batman-adv] VIS startup race condition fix plus coding style cleanup Andrew Lunn
2009-07-15 18:00 ` Marek Lindner [this message]
2009-07-16  7:32   ` [B.A.T.M.A.N.] [batman-adv] VIS startup race condition fix plus coding style?cleanup Andrew Lunn

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=200907160200.31170.lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.net \
    /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