Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 5aa06ad in mainline


Ignore:
Timestamp:
2018-11-25T16:40:06Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
b501de7, f6ce093
Parents:
a01f732
Message:

Give a dev reference to driver_reassign_fibril()

driver_reassign_fibril() is expecting an extra reference to dev and
drops this reference when finished, so we better give it one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/driver.c

    ra01f732 r5aa06ad  
    462462                        list_remove(&dev->driver_devices);
    463463                        fibril_mutex_unlock(&driver->driver_mutex);
     464                        /* Give an extra reference to driver_reassign_fibril */
     465                        dev_add_ref(dev);
    464466                        fid_t fid = fibril_create(driver_reassign_fibril, dev);
    465467                        if (fid == 0) {
    466468                                log_msg(LOG_DEFAULT, LVL_ERROR,
    467469                                    "Error creating fibril to assign driver.");
     470                                dev_del_ref(dev);
    468471                        }
    469472                        fibril_add_ready(fid);
Note: See TracChangeset for help on using the changeset viewer.