bugThe GNU Hurd - Bugs: bug #30256, device_close not automatically...

 
 

bug #30256: device_close not automatically closed on port closure

Submitted by:  None
Submitted on:  Thu 24 Jun 2010 10:03:31 PM UTC  
 
Category: GNU MachSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: 
Originator Email: -unavailable-Open/Closed: Open
Reproducibility: Every TimeSize (loc): None
Planned Release: NoneEffort: 0.00
Wiki-like text discussion box: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 30 Jun 2010 02:20:34 AM UTC, comment #2:

I'd have thought that no_senders would be called when the port is
really closed, but for some reason that doesn't happen. portinfo claims
only my test process has a reference to the port. The kernel source
code seems to make sure that the kernel only has a receive reference to
the port.

Samuel Thibault <sthibaul>
Project Member
Wed 30 Jun 2010 01:48:58 AM UTC, comment #1:

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)

Samuel Thibault <sthibaul>
Project Member
Thu 24 Jun 2010 10:03:31 PM UTC, original submission:

if a process uses device_open() but not device_close before exiting, the mach device will remain open.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by sthibaul (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup