VirtualBox

Ignore:
Timestamp:
Mar 5, 2009 7:55:39 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43775
Message:

Linux netfilter: use try_module_get() instead of module_get()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c

    r17344 r17375  
    11621162
    11631163    Log(("vboxNetFltOsInitInstance: this=%p: Notifier installed.\n", pThis));
    1164     if (!pThis->fDisconnectedFromHost)
    1165     {
    1166         __module_get(THIS_MODULE);
    1167         return VINF_SUCCESS;
    1168     }
    1169  
    1170     return VERR_INTNET_FLT_IF_FAILED;
     1164    if (   pThis->fDisconnectedFromHost
     1165        || !try_module_get(THIS_MODULE))
     1166        return VERR_INTNET_FLT_IF_FAILED;
     1167
     1168    return VINF_SUCCESS;
    11711169}
    11721170
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette