All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernard Pidoux <pidoux@ccr.jussieu.fr>
To: Ralf Baechle DL5RB <ralf@linux-mips.org>,
	David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org,
	linux-hams <linux-hams@vger.kernel.org>
Subject: [PATCH] rose_node_list_lock was not released before returning to user space
Date: Sat, 19 Apr 2008 23:12:20 +0200	[thread overview]
Message-ID: <480A6034.1080806@ccr.jussieu.fr> (raw)

 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



             reply	other threads:[~2008-04-19 21:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-19 21:12 Bernard Pidoux [this message]
2008-04-20  1:38 ` [PATCH] rose_node_list_lock was not released before returning to user space 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-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

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=480A6034.1080806@ccr.jussieu.fr \
    --to=pidoux@ccr.jussieu.fr \
    --cc=davem@davemloft.net \
    --cc=linux-hams@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ralf@linux-mips.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 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.