Linux HAM/Amateur Radio development
 help / color / mirror / Atom feed
* [PATCH] rose_node_list_lock was not released before returning to user space
@ 2008-04-19 21:12 Bernard Pidoux
  2008-04-20  1:38 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Bernard Pidoux @ 2008-04-19 21:12 UTC (permalink / raw)
  To: Ralf Baechle DL5RB, David Miller, linux-kernel, linux-hams

 From 74859daa5a1ef4d793c03c77b52affa0f95c609d Mon Sep 17 00:00:00 2001
From: Bernard Pidoux <f6bvp@amsat.org>
Date: Sat, 19 Apr 2008 20:13:55 +0200
Subject: [PATCH] rose_node_list_lock was not released before returning to user space

I have already submited this patch on January 11, 2008.
As the bug is still present, I resend it.

================================================
[ BUG: lock held when returning to user space! ]
------------------------------------------------
xfbbd/3683 is leaving the kernel with locks still held!
1 lock held by xfbbd/3683:
  #0:  (sk_lock-AF_ROSE){--..}, at: [<c8cd1eb3>] rose_connect+0x73/0x420 [rose]

INFO: task xfbbd:3683 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
xfbbd         D 00000246     0  3683   3669
        c6965ee0 00000092 c02c5c40 00000246 c0f6b5f0 c0f6b5c0 c0f6b5f0 c0f6b5c0
        c0f6b614 c6965f18 c024b74b ffffffff c06ba070 00000000 00000000 00000001
        c6ab07c0 c012d450 c0f6b634 c0f6b634 c7b5bf10 c0d6004c c7b5bf10 c6965f40
Call Trace:
  [<c024b74b>] lock_sock_nested+0x6b/0xd0
  [<c012d450>] ? autoremove_wake_function+0x0/0x40
  [<c02488f1>] sock_fasync+0x41/0x150
  [<c0249e69>] sock_close+0x19/0x40
  [<c0175d54>] __fput+0xb4/0x170
  [<c0176018>] fput+0x18/0x20
  [<c017300e>] filp_close+0x3e/0x70
  [<c01744e9>] sys_close+0x69/0xb0
  [<c0103bda>] sysenter_past_esp+0x5f/0xa5
  =======================
INFO: lockdep is turned off.


Signed-off-by: Bernard Pidoux <f6bvp@amsat.org>
---
  net/rose/af_rose.c |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index d1ff3f8..1ebf652 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -760,8 +760,10 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le

         rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause,
                                          &diagnostic);
-       if (!rose->neighbour)
-               return -ENETUNREACH;
+       if (!rose->neighbour) {
+               err = -ENETUNREACH;
+               goto out_release;
+       }

         rose->lci = rose_new_lci(rose->neighbour);
         if (!rose->lci) {
--
1.5.5



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] rose_node_list_lock was not released before returning to user space
  2008-04-19 21:12 [PATCH] rose_node_list_lock was not released before returning to user space Bernard Pidoux
@ 2008-04-20  1:38 ` David Miller
  2008-04-20  1:40 ` David Miller
  2008-04-20 18:43 ` FPAC and Fedora8 Neville Cross
  2 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2008-04-20  1:38 UTC (permalink / raw)
  To: pidoux; +Cc: ralf, linux-kernel, linux-hams

From: Bernard Pidoux <pidoux@ccr.jussieu.fr>
Date: Sat, 19 Apr 2008 23:12:20 +0200

> I have already submited this patch on January 11, 2008.
> As the bug is still present, I resend it.

I'll apply this fix, thanks a lot Bernard.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] rose_node_list_lock was not released before returning to user space
  2008-04-19 21:12 [PATCH] rose_node_list_lock was not released before returning to user space Bernard Pidoux
  2008-04-20  1:38 ` David Miller
@ 2008-04-20  1:40 ` David Miller
  2008-04-20 17:09   ` [PATCH] soft lockup rose_node_list_lock Bernard Pidoux
  2008-04-20 18:43 ` FPAC and Fedora8 Neville Cross
  2 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2008-04-20  1:40 UTC (permalink / raw)
  To: pidoux; +Cc: ralf, linux-kernel, linux-hams

From: Bernard Pidoux <pidoux@ccr.jussieu.fr>
Date: Sat, 19 Apr 2008 23:12:20 +0200

> Subject: [PATCH] rose_node_list_lock was not released before returning to user space

BTW, I had to fix the commit message because it's not the
rose_node_list_lock that isn't being released, it's the socket lock.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] soft lockup rose_node_list_lock
  2008-04-20  1:40 ` David Miller
@ 2008-04-20 17:09   ` Bernard Pidoux
  2008-04-20 22:59     ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Bernard Pidoux @ 2008-04-20 17:09 UTC (permalink / raw)
  To: David Miller; +Cc: ralf, linux-kernel, linux-hams

 From f40c15d0ea5a22178e6cbb0331486d2297abeeb7 Mon Sep 17 00:00:00 2001
From: Bernard Pidoux <f6bvp@amsat.org>
Date: Sun, 20 Apr 2008 18:19:06 +0200
Subject: [PATCH] soft lockup rose_node_list_lock

[ INFO: possible recursive locking detected ]
2.6.25 #3
---------------------------------------------
ax25ipd/3811 is trying to acquire lock:
  (rose_node_list_lock){-+..}, at: [<f8d31f1a>] rose_get_neigh+0x1a/0xa0 
[rose]

but task is already holding lock:
  (rose_node_list_lock){-+..}, at: [<f8d31fed>] 
rose_route_frame+0x4d/0x620 [rose]

other info that might help us debug this:
6 locks held by ax25ipd/3811:
  #0:  (&tty->atomic_write_lock){--..}, at: [<c0259a1c>] 
tty_write_lock+0x1c/0x50
  #1:  (rcu_read_lock){..--}, at: [<c02aea36>] net_rx_action+0x96/0x230
  #2:  (rcu_read_lock){..--}, at: [<c02ac5c0>] netif_receive_skb+0x100/0x2f0
  #3:  (rose_node_list_lock){-+..}, at: [<f8d31fed>] 
rose_route_frame+0x4d/0x620 [rose]
  #4:  (rose_neigh_list_lock){-+..}, at: [<f8d31ff7>] 
rose_route_frame+0x57/0x620 [rose]
  #5:  (rose_route_list_lock){-+..}, at: [<f8d32001>] 
rose_route_frame+0x61/0x620 [rose]

stack backtrace:
Pid: 3811, comm: ax25ipd Not tainted 2.6.25 #3
  [<c0147e27>] print_deadlock_bug+0xc7/0xd0
  [<c0147eca>] check_deadlock+0x9a/0xb0
  [<c0149cd2>] validate_chain+0x1e2/0x310
  [<c0149b95>] ? validate_chain+0xa5/0x310
  [<c010a7d8>] ? native_sched_clock+0x88/0xc0
  [<c0149fa1>] __lock_acquire+0x1a1/0x750
  [<c014a5d1>] lock_acquire+0x81/0xa0
  [<f8d31f1a>] ? rose_get_neigh+0x1a/0xa0 [rose]
  [<c03201a3>] _spin_lock_bh+0x33/0x60
  [<f8d31f1a>] ? rose_get_neigh+0x1a/0xa0 [rose]
  [<f8d31f1a>] rose_get_neigh+0x1a/0xa0 [rose]
  [<f8d32404>] rose_route_frame+0x464/0x620 [rose]
  [<c031ffdd>] ? _read_unlock+0x1d/0x20
  [<f8d31fa0>] ? rose_route_frame+0x0/0x620 [rose]
  [<f8d1c396>] ax25_rx_iframe+0x66/0x3b0 [ax25]
  [<f8d1f42f>] ? ax25_start_t3timer+0x1f/0x40 [ax25]
  [<f8d1e65b>] ax25_std_frame_in+0x7fb/0x890 [ax25]
  [<c0320005>] ? _spin_unlock_bh+0x25/0x30
  [<f8d1bdf6>] ax25_kiss_rcv+0x2c6/0x800 [ax25]
  [<c02a4769>] ? sock_def_readable+0x59/0x80
  [<c014a8a7>] ? __lock_release+0x47/0x70
  [<c02a4769>] ? sock_def_readable+0x59/0x80
  [<c031ffdd>] ? _read_unlock+0x1d/0x20
  [<c02a4769>] ? sock_def_readable+0x59/0x80
  [<c02a4d3a>] ? sock_queue_rcv_skb+0x13a/0x1d0
  [<c02a4c45>] ? sock_queue_rcv_skb+0x45/0x1d0
  [<f8d1bb30>] ? ax25_kiss_rcv+0x0/0x800 [ax25]
  [<c02ac715>] netif_receive_skb+0x255/0x2f0
  [<c02ac5c0>] ? netif_receive_skb+0x100/0x2f0
  [<c02af05c>] process_backlog+0x7c/0xf0
  [<c02aeb0c>] net_rx_action+0x16c/0x230
  [<c02aea36>] ? net_rx_action+0x96/0x230
  [<c012bd53>] __do_softirq+0x93/0x120
  [<f8d2a68a>] ? mkiss_receive_buf+0x33a/0x3f0 [mkiss]
  [<c012be37>] do_softirq+0x57/0x60
  [<c012c265>] local_bh_enable_ip+0xa5/0xe0
  [<c0320005>] _spin_unlock_bh+0x25/0x30
  [<f8d2a68a>] mkiss_receive_buf+0x33a/0x3f0 [mkiss]
  [<c025ea37>] pty_write+0x47/0x60
  [<c025c620>] write_chan+0x1b0/0x220
  [<c0259a1c>] ? tty_write_lock+0x1c/0x50
  [<c011fec0>] ? default_wake_function+0x0/0x10
  [<c0259bea>] tty_write+0x12a/0x1c0
  [<c025c470>] ? write_chan+0x0/0x220
  [<c018bbc6>] vfs_write+0x96/0x130
  [<c0259ac0>] ? tty_write+0x0/0x1c0
  [<c018c24d>] sys_write+0x3d/0x70
  [<c0104d1e>] sysenter_past_esp+0x5f/0xa5
  =======================
BUG: soft lockup - CPU#0 stuck for 61s! [ax25ipd:3811]

Pid: 3811, comm: ax25ipd Not tainted (2.6.25 #3)
EIP: 0060:[<c010a9db>] EFLAGS: 00000246 CPU: 0
EIP is at native_read_tsc+0xb/0x20
EAX: b404aa2c EBX: b404a9c9 ECX: 017f1000 EDX: 0000076b
ESI: 00000001 EDI: 00000000 EBP: ecc83afc ESP: ecc83afc
  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
CR0: 8005003b CR2: b7f5f000 CR3: 2cd8e000 CR4: 000006f0
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400
  [<c0204937>] delay_tsc+0x17/0x30
  [<c02048e9>] __delay+0x9/0x10
  [<c02127f6>] __spin_lock_debug+0x76/0xf0
  [<c0212618>] ? spin_bug+0x18/0x100
  [<c0147923>] ? __lock_contended+0xa3/0x110
  [<c0212998>] _raw_spin_lock+0x68/0x90
  [<c03201bf>] _spin_lock_bh+0x4f/0x60
  [<f8d31f1a>] ? rose_get_neigh+0x1a/0xa0 [rose]
  [<f8d31f1a>] rose_get_neigh+0x1a/0xa0 [rose]
  [<f8d32404>] rose_route_frame+0x464/0x620 [rose]
  [<c031ffdd>] ? _read_unlock+0x1d/0x20
  [<f8d31fa0>] ? rose_route_frame+0x0/0x620 [rose]
  [<f8d1c396>] ax25_rx_iframe+0x66/0x3b0 [ax25]
  [<f8d1f42f>] ? ax25_start_t3timer+0x1f/0x40 [ax25]
  [<f8d1e65b>] ax25_std_frame_in+0x7fb/0x890 [ax25]
  [<c0320005>] ? _spin_unlock_bh+0x25/0x30
  [<f8d1bdf6>] ax25_kiss_rcv+0x2c6/0x800 [ax25]
  [<c02a4769>] ? sock_def_readable+0x59/0x80
  [<c014a8a7>] ? __lock_release+0x47/0x70
  [<c02a4769>] ? sock_def_readable+0x59/0x80
  [<c031ffdd>] ? _read_unlock+0x1d/0x20
  [<c02a4769>] ? sock_def_readable+0x59/0x80
  [<c02a4d3a>] ? sock_queue_rcv_skb+0x13a/0x1d0
  [<c02a4c45>] ? sock_queue_rcv_skb+0x45/0x1d0
  [<f8d1bb30>] ? ax25_kiss_rcv+0x0/0x800 [ax25]
  [<c02ac715>] netif_receive_skb+0x255/0x2f0
  [<c02ac5c0>] ? netif_receive_skb+0x100/0x2f0
  [<c02af05c>] process_backlog+0x7c/0xf0
  [<c02aeb0c>] net_rx_action+0x16c/0x230
  [<c02aea36>] ? net_rx_action+0x96/0x230
  [<c012bd53>] __do_softirq+0x93/0x120
  [<f8d2a68a>] ? mkiss_receive_buf+0x33a/0x3f0 [mkiss]
  [<c012be37>] do_softirq+0x57/0x60
  [<c012c265>] local_bh_enable_ip+0xa5/0xe0
  [<c0320005>] _spin_unlock_bh+0x25/0x30
  [<f8d2a68a>] mkiss_receive_buf+0x33a/0x3f0 [mkiss]
  [<c025ea37>] pty_write+0x47/0x60
  [<c025c620>] write_chan+0x1b0/0x220
  [<c0259a1c>] ? tty_write_lock+0x1c/0x50
  [<c011fec0>] ? default_wake_function+0x0/0x10
  [<c0259bea>] tty_write+0x12a/0x1c0
  [<c025c470>] ? write_chan+0x0/0x220
  [<c018bbc6>] vfs_write+0x96/0x130
  [<c0259ac0>] ? tty_write+0x0/0x1c0
  [<c018c24d>] sys_write+0x3d/0x70
  [<c0104d1e>] sysenter_past_esp+0x5f/0xa5
  =======================

Since rose_route_frame() does not use rose_node_list we can safely
remove rose_node_list_lock spin lock here and let it be free for
rose_get_neigh().

Signed-off-by: Bernard Pidoux <f6bvp@amsat.org>
---
  net/rose/rose_route.c |    2 --
  1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index fb9359f..5053a53 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -857,7 +857,6 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)
         src_addr  = (rose_address *)(skb->data + 9);
         dest_addr = (rose_address *)(skb->data + 4);

-       spin_lock_bh(&rose_node_list_lock);
         spin_lock_bh(&rose_neigh_list_lock);
         spin_lock_bh(&rose_route_list_lock);

@@ -1060,7 +1059,6 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb 
*ax25)
  out:
         spin_unlock_bh(&rose_route_list_lock);
         spin_unlock_bh(&rose_neigh_list_lock);
-       spin_unlock_bh(&rose_node_list_lock);

         return res;
  }
--
1.5.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* FPAC and Fedora8
  2008-04-19 21:12 [PATCH] rose_node_list_lock was not released before returning to user space Bernard Pidoux
  2008-04-20  1:38 ` David Miller
  2008-04-20  1:40 ` David Miller
@ 2008-04-20 18:43 ` Neville Cross
  2008-04-21 10:57   ` Bernard Pidoux
  2 siblings, 1 reply; 10+ messages in thread
From: Neville Cross @ 2008-04-20 18:43 UTC (permalink / raw)
  To: linux-hams

Hello,

I have trying to setup a FBB station using Fedora 8. The good thing is
that Fedora has the ax25 protocol already configured as module, it is
matter only to call it up. I already have working ax25 outbound
connections via RF.

In my different test I came to the problem of configuring other  items as
ax25d and and ax25ipd. A friend TI2HAS commented to me that a good way to
ensure the connections was using FPAC as node, and it will also serve as
gateway.

So I gave a try to FPAC looking the mini-howto at
http://rose.fpac.free.fr/MINI-HOWTO
and also looking the howto at http://ftp.f6fbb.org/fpac/doc/FPAC-HOWTO.html

Some of the questions that I have are:
How do I know numbers to use? There is any coordinator to ask?

But beyond those question I got stuck with the command make. I got errors,
I am not sure what they meant. I tried to modify the make.confs file to
adapt the path to my setup but still no luck. I think that I may have a
problem with something that I have installed or I have not installed.

I will appreciate any comments, ideas or suggestions. Please see below the
response from the system.

Thanks in advance.

Neville - YN1V
Sysop of YN1BBS

----------------------------------------------

[root@localhost fpac327.13]# make
make[1]: Entering directory `/usr/local/src/ax25/fpac327.13/lib'
gcc -Wall -Wstrict-prototypes -I../lib -I/usr/include -c libwp.c
In file included from /usr/include/netax25/axlib.h:29,
                 from ax25compat.h:33,
                 from libwp.c:22:
/usr/include/netax25/ax25.h:74: error: conflicting types for ‘ax25_address’
/usr/include/linux/ax25.h:47: error: previous declaration of
‘ax25_address’ was here
/usr/include/netax25/ax25.h:77: error: redefinition of ‘struct sockaddr_ax25’
/usr/include/netax25/ax25.h:87: error: redefinition of ‘struct
full_sockaddr_ax25’
/usr/include/netax25/ax25.h:94: error: redefinition of ‘struct
ax25_routes_struct’
/usr/include/netax25/ax25.h:103: error: redefinition of ‘struct
ax25_ctl_struct’
/usr/include/netax25/ax25.h:114: error: redefinition of ‘struct
ax25_info_struct’
/usr/include/netax25/ax25.h:125: error: redefinition of ‘struct
ax25_fwd_struct’
/usr/include/netax25/ax25.h:132: error: redefinition of ‘struct
ax25_route_opt_struct’
In file included from /usr/include/netax25/axlib.h:30,
                 from ax25compat.h:33,
                 from libwp.c:22:
/usr/include/netrose/rose.h:68: error: conflicting types for ‘rose_address’
/usr/include/linux/rose.h:44: error: previous declaration of
‘rose_address’ was here
/usr/include/netrose/rose.h:71: error: redefinition of ‘struct sockaddr_rose’
/usr/include/netrose/rose.h:80: error: redefinition of ‘struct
full_sockaddr_rose’
/usr/include/netrose/rose.h:89: error: redefinition of ‘struct
rose_route_struct’
/usr/include/netrose/rose.h:99: error: redefinition of ‘struct
rose_cause_struct’
/usr/include/netrose/rose.h:105: error: redefinition of ‘struct
rose_facilities_struct’
libwp.c: In function ‘wp_update_addr’:
libwp.c:762: warning: passing argument 1 of ‘wp_get’ from incompatible
pointer type
libwp.c: At top level:
libwp.c:776: error: conflicting types for ‘wp_search’
wp.h:116: error: previous declaration of ‘wp_search’ was here
libwp.c: In function ‘wp_search’:
libwp.c:780: warning: passing argument 1 of ‘wp_get’ from incompatible
pointer type
libwp.c: At top level:
libwp.c:870: error: conflicting types for ‘wp_get’
wp.h:110: error: previous declaration of ‘wp_get’ was here
libwp.c: In function ‘wp_get’:
libwp.c:880: error: incompatible types in assignment
make[1]: *** [libwp.o] Error 1
make[1]: Leaving directory `/usr/local/src/ax25/fpac327.13/lib'
make: *** [all] Error 2
[root@localhost fpac327.13]#

--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] soft lockup rose_node_list_lock
  2008-04-20 17:09   ` [PATCH] soft lockup rose_node_list_lock Bernard Pidoux
@ 2008-04-20 22:59     ` David Miller
  2008-04-21 20:27       ` Bernard Pidoux
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2008-04-20 22:59 UTC (permalink / raw)
  To: pidoux; +Cc: ralf, linux-kernel, linux-hams

From: Bernard Pidoux <pidoux@ccr.jussieu.fr>
Date: Sun, 20 Apr 2008 19:09:23 +0200

> Since rose_route_frame() does not use rose_node_list we can safely
> remove rose_node_list_lock spin lock here and let it be free for
> rose_get_neigh().
> 
> Signed-off-by: Bernard Pidoux <f6bvp@amsat.org>

Indeed, I went over this code several times and I can't
see any reason for rose_route_frame() to take the node
list lock.

Patch applied, thanks Bernard.  But one thing...

> diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
> index fb9359f..5053a53 100644
> --- a/net/rose/rose_route.c
> +++ b/net/rose/rose_route.c
> @@ -857,7 +857,6 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)
>          src_addr  = (rose_address *)(skb->data + 9);
>          dest_addr = (rose_address *)(skb->data + 4);
> 
> -       spin_lock_bh(&rose_node_list_lock);
>          spin_lock_bh(&rose_neigh_list_lock);
>          spin_lock_bh(&rose_route_list_lock);
> 

Could you please fix your email client so it doesn't corrupt
patches like this?  I've had to apply all of your patches by
hand because the tabs have been converted into spaces.  Use
MIME attachments if you have to.

Thanks again.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: FPAC and Fedora8
  2008-04-20 18:43 ` FPAC and Fedora8 Neville Cross
@ 2008-04-21 10:57   ` Bernard Pidoux
  2008-04-22  3:28     ` Neville Cross
  0 siblings, 1 reply; 10+ messages in thread
From: Bernard Pidoux @ 2008-04-21 10:57 UTC (permalink / raw)
  To: Neville Cross; +Cc: linux-hams

Hi Neville,

I wonder if you installed libax25, ax25-tools and ax25-apps I have 
configured for 2.6 kernel directory tree.

http://f6bvp.free.fr/logiciels/ax25/libax25-0.0.11.4src_f6bvp.tgz
http://f6bvp.free.fr/logiciels/ax25/ax25-apps-0.0.6.2src_f6bvp.tgz
http://f6bvp.free.fr/logiciels/ax25/ax25-tools-0.0.8.2src_f6bvp.tgz

Fedora distro is not very different from Mandriva.

If you follow the FPAC MINI HOWTO step by step you should have no 
problems for FPAC compilation.

Also I strongly suggest that you upgrade your kernel.
Linux 2.6.25 kernel includes a number of important
fixes about AX25 module.

73 de Bernard, f6bvp


Neville Cross wrote:
> Hello,
> 
> I have trying to setup a FBB station using Fedora 8. The good thing is
> that Fedora has the ax25 protocol already configured as module, it is
> matter only to call it up. I already have working ax25 outbound
> connections via RF.
> 
> In my different test I came to the problem of configuring other  items as
> ax25d and and ax25ipd. A friend TI2HAS commented to me that a good way to
> ensure the connections was using FPAC as node, and it will also serve as
> gateway.
> 
> So I gave a try to FPAC looking the mini-howto at
> http://rose.fpac.free.fr/MINI-HOWTO
> and also looking the howto at http://ftp.f6fbb.org/fpac/doc/FPAC-HOWTO.html
> 
> Some of the questions that I have are:
> How do I know numbers to use? There is any coordinator to ask?
> 
> But beyond those question I got stuck with the command make. I got errors,
> I am not sure what they meant. I tried to modify the make.confs file to
> adapt the path to my setup but still no luck. I think that I may have a
> problem with something that I have installed or I have not installed.
> 
> I will appreciate any comments, ideas or suggestions. Please see below the
> response from the system.
> 
> Thanks in advance.
> 
> Neville - YN1V
> Sysop of YN1BBS
> 
> ----------------------------------------------
> 
> [root@localhost fpac327.13]# make
> make[1]: Entering directory `/usr/local/src/ax25/fpac327.13/lib'
> gcc -Wall -Wstrict-prototypes -I../lib -I/usr/include -c libwp.c
> In file included from /usr/include/netax25/axlib.h:29,
>                  from ax25compat.h:33,
>                  from libwp.c:22:
> /usr/include/netax25/ax25.h:74: error: conflicting types for �ax25_address�
> /usr/include/linux/ax25.h:47: error: previous declaration of
> �ax25_address� was here
> /usr/include/netax25/ax25.h:77: error: redefinition of �struct sockaddr_ax25�
> /usr/include/netax25/ax25.h:87: error: redefinition of �struct
> full_sockaddr_ax25�
> /usr/include/netax25/ax25.h:94: error: redefinition of �struct
> ax25_routes_struct�
> /usr/include/netax25/ax25.h:103: error: redefinition of �struct
> ax25_ctl_struct�
> /usr/include/netax25/ax25.h:114: error: redefinition of �struct
> ax25_info_struct�
> /usr/include/netax25/ax25.h:125: error: redefinition of �struct
> ax25_fwd_struct�
> /usr/include/netax25/ax25.h:132: error: redefinition of �struct
> ax25_route_opt_struct�
> In file included from /usr/include/netax25/axlib.h:30,
>                  from ax25compat.h:33,
>                  from libwp.c:22:
> /usr/include/netrose/rose.h:68: error: conflicting types for �rose_address�
> /usr/include/linux/rose.h:44: error: previous declaration of
> �rose_address� was here
> /usr/include/netrose/rose.h:71: error: redefinition of �struct sockaddr_rose�
> /usr/include/netrose/rose.h:80: error: redefinition of �struct
> full_sockaddr_rose�
> /usr/include/netrose/rose.h:89: error: redefinition of �struct
> rose_route_struct�
> /usr/include/netrose/rose.h:99: error: redefinition of �struct
> rose_cause_struct�
> /usr/include/netrose/rose.h:105: error: redefinition of �struct
> rose_facilities_struct�
> libwp.c: In function �wp_update_addr�:
> libwp.c:762: warning: passing argument 1 of �wp_get� from incompatible
> pointer type
> libwp.c: At top level:
> libwp.c:776: error: conflicting types for �wp_search�
> wp.h:116: error: previous declaration of �wp_search� was here
> libwp.c: In function �wp_search�:
> libwp.c:780: warning: passing argument 1 of �wp_get� from incompatible
> pointer type
> libwp.c: At top level:
> libwp.c:870: error: conflicting types for �wp_get�
> wp.h:110: error: previous declaration of �wp_get� was here
> libwp.c: In function �wp_get�:
> libwp.c:880: error: incompatible types in assignment
> make[1]: *** [libwp.o] Error 1
> make[1]: Leaving directory `/usr/local/src/ax25/fpac327.13/lib'
> make: *** [all] Error 2
> [root@localhost fpac327.13]#
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] soft lockup rose_node_list_lock
  2008-04-20 22:59     ` David Miller
@ 2008-04-21 20:27       ` Bernard Pidoux
  0 siblings, 0 replies; 10+ messages in thread
From: Bernard Pidoux @ 2008-04-21 20:27 UTC (permalink / raw)
  To: David Miller; +Cc: ralf, linux-kernel, linux-hams, Linux Netdev List

Hi David,

I also spent a lot of time to understand how rose behaved and I agree 
that it is difficult to decifer a code especially dealing
with socket programming and when it was written by someone else.
But as a radioamateur, Linux is a hobby for me and I like to learn.

Actually, rose_get_neigh() is called when two different events are 
occuring :

- first, it is called by rose_connect() in order to find if an adjacent 
node is ready to route to a specific ROSE address.
- second, rose_route_frame() calls rose_get_neigh() every time an 
incoming frame must be routed to an appropriate AX25 connection.

By the way, rose_get_neigh() function is not optimized for it does not 
check if an adjacent node is already connected before a new connect is 
requested.
For this purpose I have derived a new function, I named 
rose_get_route(), that is called by rose_route_frame() to find a route 
via an adjacent node.
This function has been tested for months now and it works fine.
It adds the automatic frames routing that rose needed desperately.
I will send next a patch with this new rose_get_route().

Bernard Pidoux

p.s. my email client is set for MIME attachements, but it seems corrupted.
    I will fix that. Sorry for the unvoluntary increase of workload it 
gave you.


David Miller a écrit :
> From: Bernard Pidoux <pidoux@ccr.jussieu.fr>
> Date: Sun, 20 Apr 2008 19:09:23 +0200
>
>   
>> Since rose_route_frame() does not use rose_node_list we can safely
>> remove rose_node_list_lock spin lock here and let it be free for
>> rose_get_neigh().
>>
>> Signed-off-by: Bernard Pidoux <f6bvp@amsat.org>
>>     
>
> Indeed, I went over this code several times and I can't
> see any reason for rose_route_frame() to take the node
> list lock.
>
> Patch applied, thanks Bernard.  But one thing...
>
>   
>> diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
>> index fb9359f..5053a53 100644
>> --- a/net/rose/rose_route.c
>> +++ b/net/rose/rose_route.c
>> @@ -857,7 +857,6 @@ int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25)
>>          src_addr  = (rose_address *)(skb->data + 9);
>>          dest_addr = (rose_address *)(skb->data + 4);
>>
>> -       spin_lock_bh(&rose_node_list_lock);
>>          spin_lock_bh(&rose_neigh_list_lock);
>>          spin_lock_bh(&rose_route_list_lock);
>>
>>     
>
> Could you please fix your email client so it doesn't corrupt
> patches like this?  I've had to apply all of your patches by
> hand because the tabs have been converted into spaces.  Use
> MIME attachments if you have to.
>
> Thanks again.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>   

--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: FPAC and Fedora8
  2008-04-21 10:57   ` Bernard Pidoux
@ 2008-04-22  3:28     ` Neville Cross
  2008-04-22  5:58       ` Bernard Pidoux
  0 siblings, 1 reply; 10+ messages in thread
From: Neville Cross @ 2008-04-22  3:28 UTC (permalink / raw)
  To: Bernard Pidoux; +Cc: linux-hams

Hello Bernard,

I just checked my kernel and it turn out to be: 2.6.24.4-64.fc8

And I did not used your packages, I have installed the packages that were
ready for install from the fedora repository.

I did the compilation once, but I was looking to test a more user friendly
way to share with colleagues that are not as able in computing or do not
speak English. Not that I am that good at computer or English.

I am a bit afraid of compiling a new kernel version, as this may get in
the way for regular updates. This is not really an issue for an Ax25
discussion, so I will go to my Fedora community for support and get back
to the list in a day or two with the kernel and packages ready.

By the way, I found very easy to follow the MINI-HOWTO for FPAC.

Thanks

Neville A. Cross - YN1V


> Hi Neville,
>
> I wonder if you installed libax25, ax25-tools and ax25-apps I have
> configured for 2.6 kernel directory tree.
>
> http://f6bvp.free.fr/logiciels/ax25/libax25-0.0.11.4src_f6bvp.tgz
> http://f6bvp.free.fr/logiciels/ax25/ax25-apps-0.0.6.2src_f6bvp.tgz
> http://f6bvp.free.fr/logiciels/ax25/ax25-tools-0.0.8.2src_f6bvp.tgz
>
> Fedora distro is not very different from Mandriva.
>
> If you follow the FPAC MINI HOWTO step by step you should have no
> problems for FPAC compilation.
>
> Also I strongly suggest that you upgrade your kernel.
> Linux 2.6.25 kernel includes a number of important
> fixes about AX25 module.
>
> 73 de Bernard, f6bvp
>
>
> Neville Cross wrote:
>> Hello,
>>
>> I have trying to setup a FBB station using Fedora 8. The good thing is
>> that Fedora has the ax25 protocol already configured as module, it is
>> matter only to call it up. I already have working ax25 outbound
>> connections via RF.
>>
>> In my different test I came to the problem of configuring other  items
>> as
>> ax25d and and ax25ipd. A friend TI2HAS commented to me that a good way
>> to
>> ensure the connections was using FPAC as node, and it will also serve as
>> gateway.
>>
>> So I gave a try to FPAC looking the mini-howto at
>> http://rose.fpac.free.fr/MINI-HOWTO
>> and also looking the howto at
>> http://ftp.f6fbb.org/fpac/doc/FPAC-HOWTO.html
>>
>> Some of the questions that I have are:
>> How do I know numbers to use? There is any coordinator to ask?
>>
>> But beyond those question I got stuck with the command make. I got
>> errors,
>> I am not sure what they meant. I tried to modify the make.confs file to
>> adapt the path to my setup but still no luck. I think that I may have a
>> problem with something that I have installed or I have not installed.
>>
>> I will appreciate any comments, ideas or suggestions. Please see below
>> the
>> response from the system.
>>
>> Thanks in advance.
>>
>> Neville - YN1V
>> Sysop of YN1BBS
>>
>> ----------------------------------------------
>>
>> [root@localhost fpac327.13]# make
>> make[1]: Entering directory `/usr/local/src/ax25/fpac327.13/lib'
>> gcc -Wall -Wstrict-prototypes -I../lib -I/usr/include -c libwp.c
>> In file included from /usr/include/netax25/axlib.h:29,
>>                  from ax25compat.h:33,
>>                  from libwp.c:22:
>> /usr/include/netax25/ax25.h:74: error: conflicting types for
>> �ax25_address�
>> /usr/include/linux/ax25.h:47: error: previous declaration of
>> �ax25_address� was here
>> /usr/include/netax25/ax25.h:77: error: redefinition of �struct
>> sockaddr_ax25�
>> /usr/include/netax25/ax25.h:87: error: redefinition of �struct
>> full_sockaddr_ax25�
>> /usr/include/netax25/ax25.h:94: error: redefinition of �struct
>> ax25_routes_struct�
>> /usr/include/netax25/ax25.h:103: error: redefinition of �struct
>> ax25_ctl_struct�
>> /usr/include/netax25/ax25.h:114: error: redefinition of �struct
>> ax25_info_struct�
>> /usr/include/netax25/ax25.h:125: error: redefinition of �struct
>> ax25_fwd_struct�
>> /usr/include/netax25/ax25.h:132: error: redefinition of �struct
>> ax25_route_opt_struct�
>> In file included from /usr/include/netax25/axlib.h:30,
>>                  from ax25compat.h:33,
>>                  from libwp.c:22:
>> /usr/include/netrose/rose.h:68: error: conflicting types for
>> �rose_address�
>> /usr/include/linux/rose.h:44: error: previous declaration of
>> �rose_address� was here
>> /usr/include/netrose/rose.h:71: error: redefinition of �struct
>> sockaddr_rose�
>> /usr/include/netrose/rose.h:80: error: redefinition of �struct
>> full_sockaddr_rose�
>> /usr/include/netrose/rose.h:89: error: redefinition of �struct
>> rose_route_struct�
>> /usr/include/netrose/rose.h:99: error: redefinition of �struct
>> rose_cause_struct�
>> /usr/include/netrose/rose.h:105: error: redefinition of �struct
>> rose_facilities_struct�
>> libwp.c: In function �wp_update_addr�:
>> libwp.c:762: warning: passing argument 1 of �wp_get� from
>> incompatible
>> pointer type
>> libwp.c: At top level:
>> libwp.c:776: error: conflicting types for �wp_search�
>> wp.h:116: error: previous declaration of �wp_search� was here
>> libwp.c: In function �wp_search�:
>> libwp.c:780: warning: passing argument 1 of �wp_get� from
>> incompatible
>> pointer type
>> libwp.c: At top level:
>> libwp.c:870: error: conflicting types for �wp_get�
>> wp.h:110: error: previous declaration of �wp_get� was here
>> libwp.c: In function �wp_get�:
>> libwp.c:880: error: incompatible types in assignment
>> make[1]: *** [libwp.o] Error 1
>> make[1]: Leaving directory `/usr/local/src/ax25/fpac327.13/lib'
>> make: *** [all] Error 2
>> [root@localhost fpac327.13]#
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: FPAC and Fedora8
  2008-04-22  3:28     ` Neville Cross
@ 2008-04-22  5:58       ` Bernard Pidoux
  0 siblings, 0 replies; 10+ messages in thread
From: Bernard Pidoux @ 2008-04-22  5:58 UTC (permalink / raw)
  To: Neville Cross; +Cc: linux-hams

Hi,

It is unlikely that the AX25 packages included in the Fedora distro are 
up to date.
There is no hurry to change your kernel version.
Your priority should be to install the three packages I listed in my 
previous message.
That should make it.

73 de Bernard, f6bvp.



Neville Cross a écrit :
> Hello Bernard,
>
> I just checked my kernel and it turn out to be: 2.6.24.4-64.fc8
>
> And I did not used your packages, I have installed the packages that were
> ready for install from the fedora repository.
>
> I did the compilation once, but I was looking to test a more user friendly
> way to share with colleagues that are not as able in computing or do not
> speak English. Not that I am that good at computer or English.
>
> I am a bit afraid of compiling a new kernel version, as this may get in
> the way for regular updates. This is not really an issue for an Ax25
> discussion, so I will go to my Fedora community for support and get back
> to the list in a day or two with the kernel and packages ready.
>
> By the way, I found very easy to follow the MINI-HOWTO for FPAC.
>
> Thanks
>
> Neville A. Cross - YN1V
>
>   

--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-04-22  5:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-19 21:12 [PATCH] rose_node_list_lock was not released before returning to user space Bernard Pidoux
2008-04-20  1:38 ` David Miller
2008-04-20  1:40 ` David Miller
2008-04-20 17:09   ` [PATCH] soft lockup rose_node_list_lock Bernard Pidoux
2008-04-20 22:59     ` David Miller
2008-04-21 20:27       ` Bernard Pidoux
2008-04-20 18:43 ` FPAC and Fedora8 Neville Cross
2008-04-21 10:57   ` Bernard Pidoux
2008-04-22  3:28     ` Neville Cross
2008-04-22  5:58       ` Bernard Pidoux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox