lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070509054815.GM4163@kernel.dk>
Date:	Wed, 9 May 2007 07:48:15 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Rogier Wolff <R.E.Wolff@...Wizard.nl>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: nbd problem.

On Tue, May 08 2007, Rogier Wolff wrote:
> 
> Hi,
> 
> The nbd client still reliably hangs when I use it. 
> 
> While looking into this, I found:
> 
> 
> 446                 req->errors = 0;
> 447                 spin_unlock_irq(q->queue_lock);
>                    ^^^^^^^^^^^^^^^^^^^^
> 448 
> 449                 mutex_lock(&lo->tx_lock);
> 450                 if (unlikely(!lo->sock)) {
> 451                         mutex_unlock(&lo->tx_lock);
> 452                         printk(KERN_ERR "%s: Attempted send on closed socket\n",
> 453                                lo->disk->disk_name);
> 454                         req->errors++;
> 455                         nbd_end_request(req);
> 456                         spin_lock_irq(q->queue_lock);
> 457                         continue;
> 458                 }
> 459 
> 460                 lo->active_req = req;
> 461 
> 462                 if (nbd_send_req(lo, req) != 0) {
> 463                         printk(KERN_ERR "%s: Request send failed\n",
> 464                                         lo->disk->disk_name);
> 465                         req->errors++;
> 466                         nbd_end_request(req);
> 467                 } else {
> 468                         spin_lock(&lo->queue_lock);
>                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 469                         list_add(&req->queuelist, &lo->queue_head);
> 470                         spin_unlock(&lo->queue_lock);
> 471                 }
> 472 
> 473                 lo->active_req = NULL;
> 
> 
> As far as I read things, the function is called with the lock
> held and interrupts disabled., the lock can then be released and 
> retaken without disabling interrupts again. 
> 
> Should this be fixed?
> 
> (it doesn't fix my hang though....)

Note lo->queue_lock vs q->queue_lock.

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ