* [patch 1/1] uml: fix lvalue for gcc4 @ 2005-07-09 11:01 blaisorblade 2005-07-09 11:07 ` Russell King 0 siblings, 1 reply; 8+ messages in thread From: blaisorblade @ 2005-07-09 11:01 UTC (permalink / raw) To: akpm; +Cc: jdike, linux-kernel, user-mode-linux-devel, blaisorblade This construct is refused by GCC 4, so here's the fix. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> --- linux-2.6.git-paolo/arch/um/sys-x86_64/signal.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN arch/um/sys-x86_64/signal.c~uml-fix-for-gcc4-lvalue arch/um/sys-x86_64/signal.c --- linux-2.6.git/arch/um/sys-x86_64/signal.c~uml-fix-for-gcc4-lvalue 2005-07-09 13:01:03.000000000 +0200 +++ linux-2.6.git-paolo/arch/um/sys-x86_64/signal.c 2005-07-09 13:01:03.000000000 +0200 @@ -168,7 +168,7 @@ int setup_signal_stack_si(unsigned long frame = (struct rt_sigframe __user *) round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; - ((unsigned char *) frame) -= 128; + frame -= 128 / sizeof(frame); if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate))) goto out; _ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch 1/1] uml: fix lvalue for gcc4 2005-07-09 11:01 [patch 1/1] uml: fix lvalue for gcc4 blaisorblade @ 2005-07-09 11:07 ` Russell King 2005-07-11 19:12 ` unregister_netdevice: waiting for tap24 to become free Peter 2005-07-11 22:05 ` [uml-devel] Re: [patch 1/1] uml: fix lvalue for gcc4 Blaisorblade 0 siblings, 2 replies; 8+ messages in thread From: Russell King @ 2005-07-09 11:07 UTC (permalink / raw) To: blaisorblade; +Cc: akpm, jdike, linux-kernel, user-mode-linux-devel On Sat, Jul 09, 2005 at 01:01:33PM +0200, blaisorblade@yahoo.it wrote: > diff -puN arch/um/sys-x86_64/signal.c~uml-fix-for-gcc4-lvalue arch/um/sys-x86_64/signal.c > --- linux-2.6.git/arch/um/sys-x86_64/signal.c~uml-fix-for-gcc4-lvalue 2005-07-09 13:01:03.000000000 +0200 > +++ linux-2.6.git-paolo/arch/um/sys-x86_64/signal.c 2005-07-09 13:01:03.000000000 +0200 > @@ -168,7 +168,7 @@ int setup_signal_stack_si(unsigned long > > frame = (struct rt_sigframe __user *) > round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; > - ((unsigned char *) frame) -= 128; > + frame -= 128 / sizeof(frame); Are you sure these two are identical? The above code fragment looks suspicious anyway, particularly: frame = (struct rt_sigframe __user *) round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; which will put the frame at 8 * sizeof(struct rt_sigframe) below the point which round_down() would return (which would be 1 struct rt_sigframe below stack_top, rounded down). -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core ^ permalink raw reply [flat|nested] 8+ messages in thread
* unregister_netdevice: waiting for tap24 to become free 2005-07-09 11:07 ` Russell King @ 2005-07-11 19:12 ` Peter 2005-07-11 22:20 ` [uml-devel] " Blaisorblade 2005-07-11 22:05 ` [uml-devel] Re: [patch 1/1] uml: fix lvalue for gcc4 Blaisorblade 1 sibling, 1 reply; 8+ messages in thread From: Peter @ 2005-07-11 19:12 UTC (permalink / raw) To: linux-kernel; +Cc: user-mode-linux-devel Hi. I am hitting a bug that manifests in an unregister_netdevice error message. After the problem is triggered processes like ifconfig, tunctl and route refuse to exit, even with killed. And the only solution I have found to regaining control of the server is issuing a reboot. The server is running a number of tap devices. (It is a UML host server running the skas patches http://www.user-mode-linux.org/~blaisorblade/). Regards, Peter # uname -r 2.6.11.7-skas3-v8 unregister_netdevice: waiting for tap24 to become free. Usage count = 1 unregister_netdevice: waiting for tap24 to become free. Usage count = 1 unregister_netdevice: waiting for tap24 to become free. Usage count = 1 unregister_netdevice: waiting for tap24 to become free. Usage count = 1 unregister_netdevice: waiting for tap24 to become free. Usage count = 1 unregister_netdevice: waiting for tap24 to become free. Usage count = 1 unregister_netdevice: waiting for tap24 to become free. Usage count = 1 30684 ? DW 0:45 \_ [tunctl] 31974 ? S 0:00 /bin/bash ./monitorbw.sh 31976 ? S 0:00 \_ /bin/bash ./monitorbw.sh 31978 ? D 0:00 \_ /sbin/ifconfig 31979 ? S 0:00 \_ grep \(tap\)\|\(RX bytes\) 32052 ? S 0:00 /bin/bash /opt/uml/umlcontrol.sh start --user gildersleeve.de 32112 ? S 0:00 \_ /bin/bash /opt/uml/umlrun.sh --user gildersleeve.de 32152 ? S 0:00 \_ /bin/bash ./umlnetworksetup.sh --check --user gildersleeve.de 32176 ? D 0:00 \_ tunctl -u gildersleeve.de -t tap24 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] unregister_netdevice: waiting for tap24 to become free 2005-07-11 19:12 ` unregister_netdevice: waiting for tap24 to become free Peter @ 2005-07-11 22:20 ` Blaisorblade 2005-07-11 22:26 ` Peter 0 siblings, 1 reply; 8+ messages in thread From: Blaisorblade @ 2005-07-11 22:20 UTC (permalink / raw) To: user-mode-linux-devel; +Cc: Peter, linux-kernel On Monday 11 July 2005 21:12, Peter wrote: > Hi. I am hitting a bug that manifests in an unregister_netdevice error > message. After the problem is triggered processes like ifconfig, tunctl > and route refuse to exit, even with killed. Even from the "D" state below, it's clear that there was a deadlock on some semaphore, related to tap24... Could you search your kernel logs for traces of an Oops? > And the only solution I > have found to regaining control of the server is issuing a reboot. > The server is running a number of tap devices. (It is a UML host server > running the skas patches http://www.user-mode-linux.org/~blaisorblade/). > > Regards, Peter > > # uname -r > 2.6.11.7-skas3-v8 > > unregister_netdevice: waiting for tap24 to become free. Usage count = 1 > unregister_netdevice: waiting for tap24 to become free. Usage count = 1 > unregister_netdevice: waiting for tap24 to become free. Usage count = 1 > unregister_netdevice: waiting for tap24 to become free. Usage count = 1 > unregister_netdevice: waiting for tap24 to become free. Usage count = 1 > unregister_netdevice: waiting for tap24 to become free. Usage count = 1 > unregister_netdevice: waiting for tap24 to become free. Usage count = 1 > > > 30684 ? DW 0:45 \_ [tunctl] > 31974 ? S 0:00 /bin/bash ./monitorbw.sh > 31976 ? S 0:00 \_ /bin/bash ./monitorbw.sh > 31978 ? D 0:00 \_ /sbin/ifconfig > 31979 ? S 0:00 \_ grep \(tap\)\|\(RX bytes\) > 32052 ? S 0:00 /bin/bash /opt/uml/umlcontrol.sh start --user > gildersleeve.de > 32112 ? S 0:00 \_ /bin/bash /opt/uml/umlrun.sh --user > gildersleeve.de > 32152 ? S 0:00 \_ /bin/bash ./umlnetworksetup.sh > --check --user gildersleeve.de > 32176 ? D 0:00 \_ tunctl -u gildersleeve.de -t tap24 > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest > in dual core and dual graphics technology at this free one hour event > hosted by HP, AMD, and NVIDIA. To register visit > http://www.hp.com/go/dualwebinar > _______________________________________________ > User-mode-linux-devel mailing list > User-mode-linux-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Messenger: chiamate gratuite in tutto il mondo http://it.beta.messenger.yahoo.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unregister_netdevice: waiting for tap24 to become free 2005-07-11 22:20 ` [uml-devel] " Blaisorblade @ 2005-07-11 22:26 ` Peter 2005-07-11 22:47 ` Blaisorblade 0 siblings, 1 reply; 8+ messages in thread From: Peter @ 2005-07-11 22:26 UTC (permalink / raw) To: Blaisorblade; +Cc: user-mode-linux-devel, linux-kernel Nothing in the logs prior to the first error message. I've hit this before at different times on other servers. If there are some commands I can run to gather more diagnostics on the problem, please let me know and I'll capture more information next time. I see the error was reported with older 2.6 kernels and a patch was floating around. I'm not sure if that is integrated into the current 2.6.11 kernel. http://www.google.com/search?q=unregister_netdevice%3A+waiting Regards, Peter Jul 10 16:52:03 host39 sshd(pam_unix)[19779]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=140.123.23.77 user=halt Jul 10 16:52:07 host39 sshd(pam_unix)[19781]: check pass; user unknown Jul 10 16:52:07 host39 sshd(pam_unix)[19781]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=140.123.23.77 Jul 11 12:04:04 host39 kernel: unregister_netdevice: waiting for tap24 to become free. Usage count = 1 Blaisorblade wrote: > On Monday 11 July 2005 21:12, Peter wrote: > >>Hi. I am hitting a bug that manifests in an unregister_netdevice error >>message. After the problem is triggered processes like ifconfig, tunctl >>and route refuse to exit, even with killed. > > Even from the "D" state below, it's clear that there was a deadlock on some > semaphore, related to tap24... Could you search your kernel logs for traces > of an Oops? > >>And the only solution I >>have found to regaining control of the server is issuing a reboot. > > >>The server is running a number of tap devices. (It is a UML host server >>running the skas patches http://www.user-mode-linux.org/~blaisorblade/). >> >>Regards, Peter >> >># uname -r >>2.6.11.7-skas3-v8 >> >>unregister_netdevice: waiting for tap24 to become free. Usage count = 1 >>unregister_netdevice: waiting for tap24 to become free. Usage count = 1 >>unregister_netdevice: waiting for tap24 to become free. Usage count = 1 >>unregister_netdevice: waiting for tap24 to become free. Usage count = 1 >>unregister_netdevice: waiting for tap24 to become free. Usage count = 1 >>unregister_netdevice: waiting for tap24 to become free. Usage count = 1 >>unregister_netdevice: waiting for tap24 to become free. Usage count = 1 >> >> >>30684 ? DW 0:45 \_ [tunctl] >>31974 ? S 0:00 /bin/bash ./monitorbw.sh >>31976 ? S 0:00 \_ /bin/bash ./monitorbw.sh >>31978 ? D 0:00 \_ /sbin/ifconfig >>31979 ? S 0:00 \_ grep \(tap\)\|\(RX bytes\) >>32052 ? S 0:00 /bin/bash /opt/uml/umlcontrol.sh start --user >>gildersleeve.de >>32112 ? S 0:00 \_ /bin/bash /opt/uml/umlrun.sh --user >>gildersleeve.de >>32152 ? S 0:00 \_ /bin/bash ./umlnetworksetup.sh >>--check --user gildersleeve.de >>32176 ? D 0:00 \_ tunctl -u gildersleeve.de -t tap24 >> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: unregister_netdevice: waiting for tap24 to become free 2005-07-11 22:26 ` Peter @ 2005-07-11 22:47 ` Blaisorblade 2005-07-14 9:20 ` [uml-devel] " Peter 0 siblings, 1 reply; 8+ messages in thread From: Blaisorblade @ 2005-07-11 22:47 UTC (permalink / raw) To: Peter; +Cc: user-mode-linux-devel, linux-kernel On Tuesday 12 July 2005 00:26, Peter wrote: > Nothing in the logs prior to the first error message. > > I've hit this before at different times on other servers. If there are > some commands I can run to gather more diagnostics on the problem, > please let me know and I'll capture more information next time. > > I see the error was reported with older 2.6 kernels and a patch was > floating around. I'm not sure if that is integrated into the current > 2.6.11 kernel. The patch named there has been integrated, verifyable at http://linux.bkbits.net:8080/linux-2.6/cset@4129735fMSVl0_RA4uNcNBWHFjT-zw However this time the bug is probably due to something entirely different, the message is not very specific. Tried 2.6.12? SKAS has been already updated (plus there's an important update for SKAS, from -V8 to -V8.2). > http://www.google.com/search?q=unregister_netdevice%3A+waiting > > Regards, Peter -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] Re: unregister_netdevice: waiting for tap24 to become free 2005-07-11 22:47 ` Blaisorblade @ 2005-07-14 9:20 ` Peter 0 siblings, 0 replies; 8+ messages in thread From: Peter @ 2005-07-14 9:20 UTC (permalink / raw) To: Blaisorblade; +Cc: user-mode-linux-devel, linux-kernel I just tried 2.6.12.2 with skas-V8.2. The server (otherwise reliable), had a kernel crash (which I was unable to capture) within a couple of hours of boot up. Regards, Peter Blaisorblade wrote: > On Tuesday 12 July 2005 00:26, Peter wrote: > >>Nothing in the logs prior to the first error message. >> >>I've hit this before at different times on other servers. If there are >>some commands I can run to gather more diagnostics on the problem, >>please let me know and I'll capture more information next time. >> >>I see the error was reported with older 2.6 kernels and a patch was >>floating around. I'm not sure if that is integrated into the current >>2.6.11 kernel. > > The patch named there has been integrated, verifyable at > http://linux.bkbits.net:8080/linux-2.6/cset@4129735fMSVl0_RA4uNcNBWHFjT-zw > > However this time the bug is probably due to something entirely different, the > message is not very specific. > > Tried 2.6.12? SKAS has been already updated (plus there's an important update > for SKAS, from -V8 to -V8.2). > >>http://www.google.com/search?q=unregister_netdevice%3A+waiting >> >>Regards, Peter > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] Re: [patch 1/1] uml: fix lvalue for gcc4 2005-07-09 11:07 ` Russell King 2005-07-11 19:12 ` unregister_netdevice: waiting for tap24 to become free Peter @ 2005-07-11 22:05 ` Blaisorblade 1 sibling, 0 replies; 8+ messages in thread From: Blaisorblade @ 2005-07-11 22:05 UTC (permalink / raw) To: Russell King, jdike; +Cc: user-mode-linux-devel, linux-kernel, Andrew Morton On Saturday 09 July 2005 13:07, Russell King wrote: > On Sat, Jul 09, 2005 at 01:01:33PM +0200, blaisorblade@yahoo.it wrote: > > diff -puN arch/um/sys-x86_64/signal.c~uml-fix-for-gcc4-lvalue > > arch/um/sys-x86_64/signal.c --- > > linux-2.6.git/arch/um/sys-x86_64/signal.c~uml-fix-for-gcc4-lvalue 2005-07 > >-09 13:01:03.000000000 +0200 +++ > > linux-2.6.git-paolo/arch/um/sys-x86_64/signal.c 2005-07-09 > > 13:01:03.000000000 +0200 @@ -168,7 +168,7 @@ int > > setup_signal_stack_si(unsigned long > > > > frame = (struct rt_sigframe __user *) > > round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; > > - ((unsigned char *) frame) -= 128; > > + frame -= 128 / sizeof(frame); > > Are you sure these two are identical? SOOOOOOOOORRY, I've become crazy, I meant sizeof(*frame)... thanks for noticing. > The above code fragment looks suspicious anyway, particularly: > > frame = (struct rt_sigframe __user *) > round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8; > > which will put the frame at 8 * sizeof(struct rt_sigframe) below > the point which round_down() would return (which would be 1 struct > rt_sigframe below stack_top, rounded down). You're completely right. The code is copied from arch/x86_64/kernel/signal.c:setup_rt_frame(), so it should make some sense; but in the source, the cast is to (void*). Surely Jeff, seeing that the result is assigned to a struct rt_sigframe __user, "fixed" it. The line I'm patching is new from Jeff, and I don't know what's about (I just remember that Also, the below access_ok() called on fp (which is still NULL) is surely completely wrong, though it won't fail (after all, NULL is under TASK_SIZE. right?). On x86_64 the code is always used from arch/um/kernel/signal_kern.c, since CONFIG_whatever is not enabled. -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-07-14 9:23 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-07-09 11:01 [patch 1/1] uml: fix lvalue for gcc4 blaisorblade 2005-07-09 11:07 ` Russell King 2005-07-11 19:12 ` unregister_netdevice: waiting for tap24 to become free Peter 2005-07-11 22:20 ` [uml-devel] " Blaisorblade 2005-07-11 22:26 ` Peter 2005-07-11 22:47 ` Blaisorblade 2005-07-14 9:20 ` [uml-devel] " Peter 2005-07-11 22:05 ` [uml-devel] Re: [patch 1/1] uml: fix lvalue for gcc4 Blaisorblade
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).