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>] [day] [month] [year] [list]
Date:	Sat, 30 Sep 2006 05:15:34 +0200 (MET DST)
From:	"Peter T. Breuer" <ptb@....it.uc3m.es>
To:	"linux kernel" <linux-kernel@...r.kernel.org>
Subject: how stop sync on last close of removable medium?

blkdev_close calls blkdev_put, which does a sync if we were the last
opener of the device and are now closing:

          if (!--bdev->bd_openers) {
                  sync_blockdev(bdev);
                  kill_bdev(bdev);
          }

This is bad news for nbd-like devices which use a client daemon
to transfer data out of the device. If there are requests pending
when the daemon is killed off (hey, we may want to shut down!)
then the sync in the daemon's close of its device creates a deadlock.
The sync will not complete until the daemon sends pending
requests which it will not do since it is closing due to death.

Is there a mechanism to prevent this sync occuring? Say for
removable devices?

(I don't see it, due to blindness and mental density ...  I could change
blkdev_close in inode->i_fops, I suppose, but that is attached to an
inode, presumably of our special device node in the fs above, and by the
time I get to it we have already opened the device node and it seems
that changing the release method then doesn't actually do anything.
Shrug).

Peter
-
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