VirtualBox

Ignore:
Timestamp:
Nov 5, 2008 3:07:37 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38873
Message:

Solaris/VBoxNetFlt: attempt to fix recursive mutex enters on other modules probably caused due to high priority messages being queued up by us.

File:
1 edited

Legend:

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

    r13840 r13875  
    113113static int VBoxNetFltSolarisModReadPut(queue_t *pQueue, mblk_t *pMsg);
    114114static int VBoxNetFltSolarisModWritePut(queue_t *pQueue, mblk_t *pMsg);
    115 static int VBoxNetFltSolarisModWriteService(queue_t *pQueue);
    116115
    117116/**
     
    165164{
    166165    VBoxNetFltSolarisModWritePut,
    167     VBoxNetFltSolarisModWriteService,
     166    NULL,                           /* service */
    168167    NULL,                           /* open */
    169168    NULL,                           /* close */
     
    855854/**
    856855 * Read side put procedure for processing messages in the read queue.
     856 * All streams, bound and unbound share this read procedure.
    857857 *
    858858 * @param   pQueue      Pointer to the queue.
     
    905905                    {
    906906                        vboxNetFltSolarisRecv(pThis, pStream, pQueue, pMsg);
     907                        pMsg = NULL;
    907908                        fSendUpstream = false;
    908909                    }
     
    925926                                LogRel((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: Invalid notification size; expected>=%d got=%d\n",
    926927                                            DL_NOTIFY_IND_SIZE, MBLKL(pMsg)));
     928
    927929                                fSendUpstream = false;
    928930                                break;
     
    987989                             */
    988990                            LogFlow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: DL_BIND_ACK. Bound to requested SAP!\n"));
    989                             freemsg(pMsg);
    990991                            fSendUpstream = false;
    991992                            break;
     
    998999                             */
    9991000                            vboxNetFltSolarisCachePhysAddr(pThis, pMsg);
    1000                             freemsg(pMsg);
    10011001                            fSendUpstream = false;
    10021002                            break;
     
    10201020                            }
    10211021
    1022                             freemsg(pMsg);
    10231022                            fSendUpstream = false;
    10241023                            break;
     
    10401039                                pPromiscStream->fRawMode ? "ON" : "OFF"));
    10411040
    1042                         freemsg(pMsg);
    10431041                        fSendUpstream = false;
    10441042                    }
     
    10671065    {
    10681066        /*
    1069          * Pass foward messages when adjacent module can receive, otherwise queue them.
     1067         * Don't queue up things here, can cause bad things to happen when the system
     1068         * is under heavy loads and we need to jam across high priority messages which
     1069         * if it's not done properly will end up in an infinite loop.
    10701070         */
    1071         if (canputnext(pQueue))
    1072             putnext(pQueue, pMsg);
    1073         else
    1074             putbq(pQueue, pMsg);
     1071        putnext(pQueue, pMsg);
     1072    }
     1073    else if (pMsg)
     1074    {
     1075        /*
     1076         * We need to free up the message if we don't pass it through.
     1077         */
     1078        freemsg(pMsg);
    10751079    }
    10761080
     
    10811085/**
    10821086 * Write side put procedure for processing messages in the write queue.
     1087 * All streams, bound and unbound share this write procedure.
    10831088 *
    10841089 * @param   pQueue      Pointer to the queue.
     
    10911096    LogFlow((DEVICE_NAME ":VBoxNetFltSolarisModWritePut pQueue=%p pMsg=%p\n", pQueue, pMsg));
    10921097
    1093     if (pMsg)
    1094     {
    1095         /*
    1096          * Pass foward messages when adjacent module can receive, otherwise queue them.
    1097          */
    1098         if (canputnext(pQueue))
    1099             putnext(pQueue, pMsg);
    1100         else
    1101             putbq(pQueue, pMsg);
    1102     }
    1103 
    1104     return 0;
    1105 }
    1106 
    1107 
    1108 /**
    1109  * Write side service procedure for deferred message processing on the write queue.
    1110  *
    1111  * @param   pQueue      Pointer to the queue.
    1112  *
    1113  * @returns corresponding solaris error code.
    1114  */
    1115 static int VBoxNetFltSolarisModWriteService(queue_t *pQueue)
    1116 {
    1117     LogFlow((DEVICE_NAME ":VBoxNetFltSolarisModWriteService pQueue=%p\n", pQueue));
    1118 
    1119     /*
    1120      * Implement just the flow controlled service draining of the queue.
    1121      * Nothing else to do here, we handle all the important stuff in the Put procedure.
    1122      */
    1123     mblk_t *pMsg;
    1124     while (pMsg = getq(pQueue))
    1125     {
    1126         if (canputnext(pQueue))
    1127             putnext(pQueue, pMsg);
    1128         else
    1129         {
    1130             putbq(pQueue, pMsg);
    1131             break;
    1132         }
    1133     }
    1134 
     1098    putnext(pQueue, pMsg);
    11351099    return 0;
    11361100}
Note: See TracChangeset for help on using the changeset viewer.

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