[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #30256] device_close not automatically closed on port closure

From: Samuel Thibault
Subject: [bug #30256] device_close not automatically closed on port closure
Date: Wed, 30 Jun 2010 01:48:58 +0000
User-agent: w3m/0.5.2

Follow-up Comment #1, bug #30256 (project hurd):

Mmm, reading it looks as if they're not supposed to be coupled.

Reopening a device twice returns the same port, with an additional
reference on it.  As of now, closing the port does not close the
device, and if you reopen the device, you get again the same port, on
which you can call close_device() twice: once for the re-open, and once
for the previous open.

The issue at stake is for instance swapon: it store_open("/dev/hd2"),
which opens /dev/hd2, then call file_get_storage_info(), which gets the
device port. swapon then uses store_remap, which closes the port to
/dev/hd2 (but keeps the device port). This assumes that no device_close
has been done (i.e. the device_open responsibility done by storeio is
somehow transferred to swapon...). But what if nobody remembers to
close_device? (which is the case atm)


Reply to this item at:


  Message posté via/par Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]