linux/ipc/shm.c
<<
>>
Prefs
   1/*
   2 * linux/ipc/shm.c
   3 * Copyright (C) 1992, 1993 Krishna Balasubramanian
   4 *       Many improvements/fixes by Bruno Haible.
   5 * Replaced `struct shm_desc' by `struct vm_area_struct', July 1994.
   6 * Fixed thespan21
  v2.6.22.3
  0alloca.6.11(ea_sunuse()), August.c#L8 Andpan Arcangeli" id="L6" class="line" name="76">   67/a> * 7ixed thespan21
   id="L6" class="line" name="86">   68/a> * 8ixed thespan21
  v/le.e" ysvine" na supporubrcmania9 Dragos Ac
	   69/a> * 9ixed thespan21
  vBIGMEM supporu, Andpan Arcangeli <andpan@suse.deass= id="L6" class="line" name="101">   1<0/a> *="v2ed thespan21
  vSMP2.3pand/optpc/ean-Luc Boyard <jean-luc.boyard@si/spas.frass= id="L6" class="line" name="1L1">   1</*1/span>
   21 *1linux/ipc/shm.c
   31 *1Copyright (C) 1992, 1993 KrishShspad /dev/zero supporu, Kanoj S

   41 *1      Many improvements/fixes M.   51 *1Replaced `struct shm_desc' id="L6" class="line" name="1L6">   61 *1Fixed thespan21
  vsupporubngb audit of ine obj	   le.pertihreand permiss6.11changes id="L6" class="line" name="176">   617/a> *17ixed thespan21
   Dustin Kirkland <dustin.kirkland@us.ibm.ptiass= id="L6" class="line" name="186">   618/a> *18ixed thespan21
   id="L6" class="line" name="196">   619/a> *19ixed thespan21
  v"comthechresupporu id="L2" class="line" name="L01">   120/a> *2"v2ed thespan21
  vOpenVZ, SWsoft Inc" id="L6" class="line" name="2L1">   12/*2/span>
   2< *2linux/ipc/shm.c
   32 *2Copyr" class="line" name="2L4">   42 *2     #i
	 ude < class="li
	 ude    52 *25    #i
	 ude < class="li
	 ude    62 *26    #i
	 ude < class="li
	 ude    627/a> *27    #i
	 ude < class="li
	 ude    628/a> *28    #i
	 ude < class="li
	 ude    629/a> *29    #i
	 ude < class="li
	 ude    130/a> *30    #i
	 ude < class="li
	 ude    13/*31    #i
	 ude < class="li
	 ude    23 *32    #i
	 ude < class="li
	 ude    3< *33    #i
	 ude < class="li
	 ude    43 *3     #i
	 ude < class="li
	 ude    53 *35    #i
	 ude < class="li
	 ude    63 *36    #i
	 ude < class="li
	 ude    637/a> *37    #i
	 ude < class="li
	 ude    638/a> *38    #i
	 ude < class="li
	 ude    639/a> *39    #i
	 ude < class="li
	 ude    140/a> *40    #i
	 ude < class="li
	 ude    14/*41    #i
	 ude < class="li
	 ude    24 *42opyr" class="line" name="4L3">   34 *43    #i
	 ude < class="l+ambig=i
	 ude asm-alpha/uacchrs.h|i
	 ude asm-arm/uacchrs.h|i
	 ude asm-avr32/uacchrs.h|i
	 ude asm-blackfin/uacchrs.h|i
	 ude asm-cu/uacchrs.h|i
	 ude asm-mip /uacchrs.h|i
	 ude asm-mip 64/uacchrs.h|i
	 ude asm-pa   4< *44opyr" class="line" name="4L5">   54 *45    #i
	 ude " class="lipc/util.h/a>   64 *46opyr" class="line" name="476">   647/a> *47    ly 1994 class="l+code=ea_se" iddata     ea_se" iddata     {" class="line" name="486">   648/a> *48     by Bru in94 class="l+code=id     id    ;" class="line" name="496">   649/a> *49     by Bru ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    ;" class="line" name="501">   150/a> *50     by Bru ly 1994 class="l+code=e" i     e" i     * class="l+code=e" i     e" i    ;" class="line" name="5L1">   15/*51     by Bru const ly 1994 class="l+code=vm_.pera.6.1s>
   25 *52opyr};" class="line" name="5L3">   35 *5Copyr" class="line" name="5L4">   45 *5     #define4 class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    ) (*((ly 1994 class="l+code=ea_se" iddata     ea_se" iddata     **)&( class="l+code=e" i     e" i    )-ass= class="l+code=privatiddata     privatiddata    ))" class="line" name="5L5">   5< *55opyr" class="line" name="5L6">   65 *56    lygt;" const ly 1994 class="l+code=e" id.pera.6.1s     e" id.pera.6.1s      class="l+code=ea_se" id.pera.6.1s     ea_se" id.pera.6.1s    ;" class="line" name="576">   657/a> *57    lygt;" const ly 1994 class="l+code=vm_.pera.6.1s>
   658/a> *58opyr" class="line" name="596">   659/a> *59    #define4 class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ) Bru (( class="l+code=ns     ns    )-ass= class="l+code=ids     ids    [ class="l+code=IPC_SHM_IDS     IPC_SHM_IDS    ])" class="line" name="601">   160/a> *60opyr" class="line" name="6L1">   16/*61    #define4 class="l+code=ea_sunlock     ea_sunlock    ( class="l+code=shp     eap    ) Bru             \" class="line" name="6L2">   26 *62     by Bru  class="l+code=ine_unlock     ine_unlock    (&( class="l+code=shp     eap    )-ass= class="l+code=ea_sperm     ea_sperm    )" class="line" name="6L3">   36 *6Copyr" class="line" name="6L4">   46 *64    lygt;" in94 class="l+code=newseg     newseg    (ly 1994 class="l+code=ine_"comthech     ine_"comthech     *, ly 1994 class="l+code=ine_herams     ine_herams     *);" class="line" name="6L5">   56 *65    lygt;" void4 class="l+code=ea_s.pen     ea_s.pen    (ly 1994 class="l+code=.
   6< *66    lygt;" void4 class="l+code=ea_sclosh     ea_sclosh    (ly 1994 class="l+code=.
   667/a> *67    lygt;" void4 class="l+code=ea_sde
ns    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    );" class="line" name="686">   668/a> *68    #ifdef4 class="l+code=CONFIG_PROC_FS     CONFIG_PROC_FSopyr" class="line" name="696">   669/a> *69    lygt;" in94 class="l+code= ysvine_ea_sproe_eaow     eysvine_ea_sproe_eaow    (ly 1994 class="l+code=seq_e" i     eeq_e" i     * class="l+code=s     e    , void4* class="l+code=ir     it    );" class="line" name="701">   170/a> *70    #endif" class="line" name="7L1">   17/*71opyr" class="line" name="7L2">   27 *72    void4 class="l+code=ea_sinit_1s     ea_sinit_1s    (ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    )" class="line" name="7L3">   37 *7Copyr{" class="line" name="7L4">   47 *74     by Bru  class="l+code=ns     ns    -ass= class="l+code=ea_sctlmax     ea_sctlmax     =  class="l+code=SHMMAX     SHMMAX    ;" class="line" name="7L5">   57 *75     by Bru  class="l+code=ns     ns    -ass= class="l+code=ea_sctlall     ea_sctlall     =  class="l+code=SHMALL     SHMALL    ;" class="line" name="7L6">   67 *76     by Bru  class="l+code=ns     ns    -ass= class="l+code=ea_sctlmni     ea_sctlmni     =  class="l+code=SHMMNI     SHMMNI    ;" class="line" name="776">   677/a> *77     by Bru  class="l+code=ns     ns    -ass= class="l+code=ea_sr_id_forced     ea_sr_id_forced     = 0;" class="line" name="786">   678/a> *78     by Bru  class="l+code=ns     ns    -ass= class="l+code=ea_stor     ea_stor     = 0;" class="line" name="796">   679/a> *79     by Bru  class="l+code=ine_init_ids     ine_init_ids    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ));" class="line" name="801">   180/a> *80    }" class="line" name="8L1">   18/*81opyr" class="line" name="8L2">   28 *8linux/ipc/shm.c
   38 *8Copyright (C) 1992, 1993 Krishnalled with ea_sids.rw_mutex (writer)eand .3   48 *8      Many improvements/fixes Only ea_sids.rw_mutex remains locked on exit" id="L6" class="line" name="8L5">   58 *8Replaced `struct shm_desc'/ id="L6" class="line" name="8L6">   68 *86    lygt;" void4 class="l+code= typa_sr_id      typa_sr_id    (ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    , ly 1994 class="l+code=kern_ine_herm     kern_ine_herm     * class="l+code=inep     inep    )" class="line" name="876">   687/a> *87opyr{" class="line" name="886">   688/a> *88     by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    ;" class="line" name="896">   689/a> *89     by Bru  class="l+code=shp     eap     =  class="l+code=="7bainer_of     ="7bainer_of    ( class="l+code=inep     inep    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel    ,4 class="l+code=ea_sperm     ea_sperm    );" class="line" name="901">   190/a> *90opyr" class="line" name="9L1">   19/*91     by Bru if ( class="l+code=shp     eap    -ass= class="l+code=ea_snattch     ea_snattch    ){" class="line" name="9L2">   29 *92     by Bru  by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_sperm     ea_sperm    . class="l+code=mode     mode     |=  class="l+code=SHM_DEST     SHM_DEST    ;" class="line" name="9L3">   39 *93     by Bru  by Bru  ipc/shm.c
   49 *94     by Bru  by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_sperm     ea_sperm    . class="l+code=key     key     =  class="l+code=IPC_PRIVATE     IPC_PRIVATE    ;" class="line" name="9L5">   59 *95     by Bru  by Bru  class="l+code=sh_sunlock     ea_sunlock    ( class="l+code=shp     eap    );" class="line" name="9L6">   69 *96     by Bru } else" class="line" name="976">   697/a> *97     by Bru  by Bru  class="l+code=sh_sde
   698/a> *98    }" class="line" name="996">   699/a> *99opyr" class="line" name="1001">   1<00/a> t00    #ifdef4 class="l+code=CONFIG_IPC_NS     CONFIG_IPC_NSopyr" class="line" name="10L1">   1<0 t01    void4 class="l+code=ea_sexit_1s     ea_sexit_1s    (ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    )" class="line" name="10L2">   210 t02opyr{" class="line" name="10L3">   310 t03     by Bru  class="l+code=free_ines     eree_ines    ( class="l+code=ns     ns    ,4& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ),4 class="l+code= typa_sr_id      typa_sr_id    );" class="line" name="10L4">   410 t04     by Bru  class="l+code=idrsde
   510 t05    }" class="line" name="10L6">   610 t06    #endif" class="line" name="1076">   6107/a> t07opyr" class="line" name="1086">   6108/a> t08    lygt;" in94 class="l+code=__init     __init      class="l+code=ine_"s_init     ine_"s_init    (void)" class="line" name="1096">   6109/a> t09opyr{" class="line" name="1101">   1<<0/a> 110     by Bru  class="l+code=ea_sinit_1s     ea_sinit_1s    (& class="l+code=init_ine_"s     init_ine_"s    );" class="line" name="11L1">   1<< t11     by Bru hidden"0;" class="line" name="11L2">   211 11linux}" class="line" name="11L3">   311 11Copyr" class="line" name="11L4">   411 11      class="l+code=puresinitcall     puresinitcall    ( class="l+code=ine_"s_init     ine_"s_init    );" class="line" name="11L5">   511 115opyr" class="line" name="11L6">   611 11Fixedvoid4 class="l+code=__init     __init      class="l+code=ea_sinit     ea_sinit     (void)" class="line" name="1176">   6117/a> 117opyr{" class="line" name="1186">   6118/a> 118     by Bru  class="l+code=ine_init_proe_in9erfech     ine_init_proe_in9erfech    ( ipc/shm.c   6119/a> 119    #if4 class="l+code=BITS_PER_LONG     BITS_PER_LONG     <= 32" class="line" name="1L01">   1<20/a> 120     by Bru                          ipc/shm.c   112/12/span#else" class="line" name="12L2">   21< 122     by Bru  by Bru                  ipc/shm.c   312 12Copyr#endif" class="line" name="12L4">   412 124     by Bru  by Bru                  class="l+code=IPC_SHM_IDS     IPC_SHM_IDS    ,4 class="l+code=eysvine_ea_sproe_eaow     eysvine_ea_sproe_eaow    );" class="line" name="12L5">   512 125    }" class="line" name="12L6">   612 126opyr" class="line" name="1276">   6127/a> 127ixed thespan21
2" id="L2" class="line" name="1286">   6128/a> 128ixed thespan21
  vea_slock_(check_) routlass a7e13alled in .3   6129/a> 129ixed thespan21
  vis not nechrsarily held" id="L6" class="line" name="1301">   1130/a> 13"v2ed thespan21
  / id="L6" class="line" name="13L1">   113/131    lygt;"  class="l+code=inclass=   inclas     ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=sh_slock     ea_slock    (ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    , in94 class="l+code=id     id    )" class="line" name="13L2">   213 132opyr{" class="line" name="13L3">   31< 133     by Bru ly 1994 class="l+code=kern_ine_herm     kern_ine_herm     * class="l+code=inep     inep     =  class="l+code=ine_lock     ine_lock    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ),4 class="l+code=id     id    );" class="line" name="13L4">   413 134opyr" class="line" name="13L5">   513 135     by Bru if ( class="l+code=IS_ERR     IS_ERR    ( class="l+code=inep     inep    ))" class="line" name="13L6">   613 136     by Bru  by Bru hidden"(ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     *) class="l+code=inep     inep    ;" class="line" name="1376">   6137/a> 137opyr" class="line" name="1386">   6138/a> 138     by Bru hidden" class="l+code=="7bainer_of     ="7bainer_of    ( class="l+code=inep     inep    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel    ,4 class="l+code=ea_sperm     ea_sperm    );" class="line" name="1396">   6139/a> 139    }" class="line" name="1401">   1140/a> 140opyr" class="line" name="14L1">   114/141    lygt;"  class="l+code=inclass=   inclas     void4 class="l+code=ea_slock_by_ptr     ea_slock_by_ptr    (ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=inep     inep    )" class="line" name="14L2">   214 142opyr{" class="line" name="14L3">   314 143     by Bru  class="l+code=rcu_pand_lock     rcu_pand_lock    ();" class="line" name="14L4">   41< 144     by Bru  class="l+code=spinslock     epinslock    (& class="l+code=inep     inep    -ass= class="l+code=ea_sperm     ea_sperm    . class="l+code=lock     lock    );" class="line" name="14L5">   514 145    }" class="line" name="14L6">   614 146opyr" class="line" name="1476">   6147/a> 147    lygt;"  class="l+code=inclass=   inclas     ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=sh_slock_check     ea_slock_check    (ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    ," class="line" name="1486">   6148/a> 148     by Bru                                         in94 class="l+code=id     id    )" class="line" name="1496">   6149/a> 149opyr{" class="line" name="1501">   1150/a> 150     by Bru ly 1994 class="l+code=kern_ine_herm     kern_ine_herm     * class="l+code=inep     inep     =  class="l+code=ine_lock_check     ine_lock_check    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ),4 class="l+code=id     id    );" class="line" name="15L1">   115/151opyr" class="line" name="15L2">   215 152     by Bru if ( class="l+code=IS_ERR     IS_ERR    ( class="l+code=inep     inep    ))" class="line" name="15L3">   315 153     by Bru  by Bru hidden"(ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     *) class="l+code=inep     inep    ;" class="line" name="15L4">   415 154opyr" class="line" name="15L5">   51< 155     by Bru hidden" class="l+code=="7bainer_of     ="7bainer_of    ( class="l+code=inep     inep    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel    ,4 class="l+code=ea_sperm     ea_sperm    );" class="line" name="15L6">   615 156    }" class="line" name="1576">   6157/a> 157opyr" class="line" name="1586">   6158/a> 158    lygt;"  class="l+code=inclass=   inclas     void4 class="l+code=ea_sr_id     pa_sr_id    (ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=s     e    )" class="line" name="1596">   6159/a> 159opyr{" class="line" name="1601">   1160/a> 160     by Bru  class="l+code=ine_r_id     ine_r_id    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ),4& class="l+code=e     e    -ass= class="l+code=ea_sperm     ea_sperm    );" class="line" name="16L1">   116/161    }" class="line" name="16L2">   216 162opyr" class="line" name="16L3">   316 16Copyr" class="line" name="16L4">   416 16      Many improvements/fix/* Thisvis 3alled bybngbk,">
	ebngb every ea_ at   516 165    lygt;" void4 class="l+code=ea_s.pen     ea_s.pen    (ly 1994 class="l+code=.
   61< 166    {" class="line" name="1676">   6167/a> 167     by Bru ly 1994 class="l+code=e" i     e" i     * class="l+code=e" i     e" i     =  class="l+code=vma     vma    -ass= class="l+code=vm_e" i     vm_e" i    ;" class="line" name="1686">   6168/a> 168     by Bru ly 1994 class="l+code=ea_se" iddata     ea_se" iddata     * class="l+code=efd     pfd     =  class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    );" class="line" name="1696">   6169/a> 169     by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    ;" class="line" name="1701">   1170/a> 170opyr" class="line" name="17L1">   117/171     by Bru  class="l+code=shp     eap     =  class="l+code=sh_slock     ea_slock    ( class="l+code=efd     pfd    -ass= class="l+code=ns     ns    ,4 class="l+code=efd     pfd    -ass= class="l+code=id     id    );" class="line" name="17L2">   217 172     by Bru  class="l+code=BUG_ON     BUG_ON    ( class="l+code=IS_ERR     IS_ERR    ( class="l+code=eap     eap    ));" class="line" name="17L3">   317 173     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_sgt;m     ea_sgt;m     =  class="l+code=get_se="7ds     get_se="7ds    ();" class="line" name="17L4">   417 174     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_slprid     pa_slprid     =  class="l+code=task_tgid_vnr     task_tgid_vnr    ( class="l+code=currs/fi    =urrs/f    );" class="line" name="17L5">   517 175     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_snattch     ea_snattch    ++;" class="line" name="17L6">   617 176     by Bru  class="l+code=sh_sunlock     ea_sunlock    ( class="l+code=shp     eap    );" class="line" name="1776">   6177/a> 177    }" class="line" name="1786">   6178/a> 178opyr" class="line" name="1796">   6179/a> 179ixed thespan21
2" id="L2" class="line" name="1801">   1180/a> 18"v2ed thespan21
  vsa_sde
   118/18/span>
   218 18linux/ipc/shm.c
   318 18Copyright (C) 1992, 1993 Krish@eap:/o vm_arto eree  d="L2" class="line" name="18L4">   418 18      Many improvements/fixes  d="L2" class="line" name="18L5">   518 18Replaced `struct shm_desc' It hasrto be13alled with eapeand sa_sids.rw_mutex (writer)elocked,  d="L2" class="line" name="18L6">   618 18Fixed thespan21
  vbut hiddens with eapeunlocked and ereed" id="L6" class="line" name="1876">   6187/a> 187ixed thespan21
  / id="L6" class="line" name="1886">   6188/a> 188    lygt;" void4 class="l+code=ea_sde
ns    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    )" class="line" name="1896">   6189/a> 189opyr{" class="line" name="1901">   1190/a> 190     by Bru  class="l+code=ns     ns    -ass= class="l+code=ea_stor     ea_stor     -= ( class="l+code=shp     eap    -ass= class="l+code=ea_ssegsz     ea_ssegsz     +  class="l+code=PAGE_SIZE     PAGE_SIZE     - 1) n class=  class="l+code=PAGE_SHIFT     PAGE_SHIFT    ;" class="line" name="19L1">   119/191     by Bru  class="l+code=sh_sr_id     pa_sr_id    ( class="l+code=ns     ns    ,4 class="l+code=ehp     eap    );" class="line" name="19L2">   219 192     by Bru  class="l+code=sh_sunlock     ea_sunlock    ( class="l+code=shp     eap    );" class="line" name="19L3">   319 193     by Bru if (! class="l+code=isse" idhugepages     isse" idhugepages    ( class="l+code=shp     eap    -ass= class="l+code=ea_se" i     ehm_e" i    ))" class="line" name="19L4">   419 194     by Bru  by Bru  class="l+code=shmem_lock     ea_e_slock    ( class="l+code=ehp     eap    -ass= class="l+code=ea_se" i     ehm_e" i    , 0,4 class="l+code=ehp     eap    -ass= class="l+code=mlock_user     mlock_user    );" class="line" name="19L5">   519 195     by Bru else if ( class="l+code=shp     eap    -ass= class="l+code=mlock_user     mlock_user    )" class="line" name="19L6">   619 196     by Bru  by Bru  class="l+code=user_sh_sunlock     user_sh_sunlock    ( class="l+code=e" i_inode     e" i_inode    ( class="l+code=shp     eap    -ass= class="l+code=ea_se" i     ehm_e" i    )-ass= class="l+code=i_size     i_size    ," class="line" name="1976">   6197/a> 197     by Bru  by Bru                                  class="l+code=ehp     eap    -ass= class="l+code=mlock_user     mlock_user    );" class="line" name="1986">   6198/a> 198     by Bru  class="l+code=fpur     fpur     ( class="l+code=shp     eap    -ass= class="l+code=ea_se" i     ehm_e" i    );" class="line" name="1996">   6199/a> 199     by Bru  class="l+code=security_sh_seree     eecurity_sh_seree    ( class="l+code=shp     eap    );" class="line" name="2001">   1200/a> 200     by Bru  class="l+code=ine_rcu_purss="    ine_rcu_purss=    ( class="l+code=shp     eap    );" class="line" name="20L1">   120 201    }" class="line" name="20L2">   220 202opyr" class="line" name="20L3">   320 20Copyright (C) 1992, 1993 Kr2" id="L2" class="line" name="20L4">   420 20      Many improvements/fixes sh_smaysde
   420 20Replaced `struct shm_desc' id="L6" class="line" name="20L6">   620 20Fixed thespan21
  vRiddens y 1e if and only if ther/2a7e1no active users of .3   6207/a> 207ixed thespan21
   one of .3   6208/a> 208ixed thespan21
   id="L6" class="line" name="2096">   6209/a> 209ixed thespan21
  v1)  nactl(id, IPC_RMID, NULL) was 3alled ngb thisveap  d="L6" class="line" name="2L01">   12<0/a> 21"v2ed thespan21
    d="L6" class="line" name="2LL1">   12< 21/span>
   221 21linux/ipc/shm.c
   321 21Copyrlygt;"  class="l+code=bool     bool      class="l+code=ea_smaysde
ns    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    )" class="line" name="21L4">   421 21     {" class="line" name="21L5">   521 215     by Bru hidden"( class="l+code=shp     eap    -ass= class="l+code=ea_snattch     ea_snattch     == 0)4&&" class="line" name="21L6">   621 216     by Bru  by Bru( class="l+code=ns     ns    -ass= class="l+code=ea_sr_id_forced     ea_sr_id_forced     ||" class="line" name="2176">   6217/a> 217     by Bru  by Bru ( class="l+code=shp     eap    -ass= class="l+code=ea_sperm     ea_sperm    . class="l+code=mode     mode     &  class="l+code=SHM_DEST     SHM_DEST    ));" class="line" name="2186">   6218/a> 218    }" class="line" name="2196">   6219/a> 219opyr" class="line" name="2L01">   1220/a> 22"v2ed thespan21
2" id="L2" class="line" name="22L1">   122/22/span>
   22< 22linux/ipc/shm.c
   322 22Copyright (C) 1992, 1993 KrishThe1de
criptgb hasralpandy beenvremoved erom .3   422 22      Many improvements/fixes and will later be1keree()d" id="L6" class="line" name="22L5">   522 22Replaced `struct shm_desc'/ id="L6" class="line" name="22L6">   622 226    lygt;" void4 class="l+code=ea_sclosh     ea_sclosh    (ly 1994 class="l+code=.
   6227/a> 227opyr{" class="line" name="2286">   6228/a> 228     by Bru ly 1994 class="l+code=e" i     e" i     *4 class="l+code=e" i     e" i     =  class="l+code=vma     vma    -ass= class="l+code=vm_e" i     vm_e" i    ;" class="line" name="2296">   6229/a> 229     by Bru ly 1994 class="l+code=ea_se" iddata     ea_se" iddata     * class="l+code=efd     pfd     =  class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    );" class="line" name="2301">   1230/a> 230     by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    ;" class="line" name="23L1">   123/231     by Bru ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns     =  class="l+code=efd     pfd    -ass= class="l+code=ns     ns    ;" class="line" name="23L2">   223 232opyr" class="line" name="23L3">   32< 233     by Bru  class="l+code=down_write     down_write    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="23L4">   423 234     by Bru  Many improvements/fix/* remove erom .3   523 235     by Bru  class="l+code=shp     eap     =  class="l+code=sh_slock     ea_slock    ( class="l+code=ns     ns    ,4 class="l+code=efd     pfd    -ass= class="l+code=id     id    );" class="line" name="23L6">   623 236     by Bru  class="l+code=BUG_ON     BUG_ON    ( class="l+code=IS_ERR     IS_ERR    ( class="l+code=eap     eap    ));" class="line" name="2376">   6237/a> 237     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_slprid     pa_slprid     =  class="l+code=task_tgid_vnr     task_tgid_vnr    ( class="l+code=currs/fi    =urrs/f    );" class="line" name="2386">   6238/a> 238     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_sdt;m     ea_sdt;m     =  class="l+code=get_se="7ds     get_se="7ds    ();" class="line" name="2396">   6239/a> 239     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_snattch     ea_snattch    --;" class="line" name="2401">   1240/a> 240     by Bru if ( class="l+code=sh_smaysde
   124/241     by Bru  by Bru  class="l+code=sh_sde
   224 242     by Bru else" class="line" name="24L3">   324 243     by Bru  by Bru  class="l+code=sh_sunlock     ea_sunlock    ( class="l+code=shp     eap    );" class="line" name="24L4">   42< 244     by Bru  class="l+code=up_write     up_write    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="24L5">   524 245    }" class="line" name="24L6">   624 246opyr" class="line" name="2476">   6247/a> 247ixed thespan21
2"hnalled with ns-ass=ea_sids(ns).rw_mutex locked 9/ id="L6" class="line" name="2486">   6248/a> 248    lygt;" in94 class="l+code=ea_strysde
   6249/a> 249opyr{" class="line" name="2501">   1250/a> 250     by Bru ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns     =  class="l+code=data     data    ;" class="line" name="25L1">   125/251     by Bru ly 1994 class="l+code=kern_ine_herm     kern_ine_herm     * class="l+code=inep     inep     =  class="l+code=p     p    ;" class="line" name="25L2">   225 252     by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap     =  class="l+code=="7bainer_of     ="7bainer_of    ( class="l+code=inep     inep    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel    ,4 class="l+code=ea_sperm     ea_sperm    );" class="line" name="25L3">   325 25Copyr" class="line" name="25L4">   425 254     by Bru if ( class="l+code=shp     eap    -ass= class="l+code=ea_screator     ea_screator     !=  class="l+code==urrs/fi    =urrs/f    )" class="line" name="25L5">   52< 255     by Bru         hidden"0;" class="line" name="25L6">   625 256opyr" class="line" name="2576">   6257/a> 257     by Bru  thespan21
2" id="L2" class="line" name="2586">   6258/a> 258ixed thespan21
         * Mark it os orphaned to de
   6259/a> 259ixed thespan21
         * kernel.pa_sr_id_forcedvis changed" id="L6" class="line" name="2601">   1260/a> 26"v2ed thespan21
         * Itvis noop if the/followingvehm_maysde
   126/26/span>
   226 262     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_screator     ea_screator     =  class="l+code=NULL     NULL    ;" class="line" name="26L3">   326 26Copyr" class="line" name="26L4">   426 264     by Bru  Many improvements/fix/* id="L6" class="line" name="26L5">   526 26Replaced `struct shm_desc        * Don't even y y to de
   62< 26Fixed thespan21
         * is not set, it eaouldn't be1deletedvher/" id="L6" class="line" name="2676">   6267/a> 267ixed thespan21
         */ id="L6" class="line" name="2686">   6268/a> 268     by Bru if (! class="l+code=ns     ns    -ass= class="l+code=ea_sr_id_forced     ea_sr_id_forced    )" class="line" name="2696">   6269/a> 269     by Bru         hidden"0;" class="line" name="2701">   1270/a> 270opyr" class="line" name="27L1">   127/271     by Bru if ( class="l+code=sh_smaysde
   227 272     by Bru  by Bru  class="l+code=sh_slock_by_ptr     ea_slock_by_ptr    ( class="l+code=shp     eap    );" class="line" name="27L3">   327 273     by Bru  by Bru  class="l+code=sh_sde
   427 274     by Bru }" class="line" name="27L5">   527 275     by Bru hidden"0;" class="line" name="27L6">   627 276    }" class="line" name="2776">   6277/a> 277opyr" class="line" name="2786">   6278/a> 278ixed thespan21
2"hnalled with ns-ass=ea_sids(ns).rw_mutex locked 9/ id="L6" class="line" name="2796">   6279/a> 279ixedlygt;" in94 class="l+code=ea_strysde
   1280/a> 28"v2ed{" class="line" name="28L1">   128/281     by Bru ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns     =  class="l+code=data     data    ;" class="line" name="28L2">   228 282     by Bru ly 1994 class="l+code=kern_ine_herm     kern_ine_herm     * class="l+code=inep     inep     =  class="l+code=p     p    ;" class="line" name="28L3">   328 283     by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap     =  class="l+code=="7bainer_of     ="7bainer_of    ( class="l+code=inep     inep    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel    ,4 class="l+code=ea_sperm     ea_sperm    );" class="line" name="28L4">   428 284opyr" class="line" name="28L5">   528 285     by Bru  Many improvements/fix/* id="L6" class="line" name="28L6">   628 28Fixed thespan21
         * We want to de
   6287/a> 287ixed thespan21
         * exit'ed origingt;ng proeess" id="L6" class="line" name="2886">   6288/a> 288ixed thespan21
         * id="L6" class="line" name="2896">   6289/a> 289ixed thespan21
         * Asveap-ass=* a7e13hanged under/rw_mutex, it'sveafe to skip eapelock;ng" id="L6" class="line" name="2901">   1290/a> 29"v2ed thespan21
         */ id="L6" class="line" name="29L1">   129/291     by Bru if ( class="l+code=shp     eap    -ass= class="l+code=ea_screator     ea_screator     !=  class="l+code=NULL     NULL    )" class="line" name="29L2">   229 292     by Bru  by Bru hidden"0;" class="line" name="29L3">   329 29Copyr" class="line" name="29L4">   429 294     by Bru if ( class="l+code=sh_smaysde
   529 295     by Bru          class="l+code=sh_slock_by_ptr     ea_slock_by_ptr    ( class="l+code=shp     eap    );" class="line" name="29L6">   629 296     by Bru  by Bru  class="l+code=sh_sde
   6297/a> 297     by Bru }" class="line" name="2986">   6298/a> 298     by Bru hidden"0;" class="line" name="2996">   6299/a> 299    }" class="line" name="3001">   1300/a> 300opyr" class="line" name="30L1">   130 301    void4 class="l+code=ea_sde
ns    )" class="line" name="30L2">   230 302opyr{" class="line" name="30L3">   330 303     by Bru  class="l+code=down_write     down_write    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="30L4">   430 304     by Bru if ( class="l+code=sh_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=in_use     in_use    )" class="line" name="3054">   430 305     by Bru          class="l+code=idr_for_each     idr_for_each    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=inessidr     inessidr    ,4& class="l+code=ea_strysde
   430 306     by Bru  class="l+code=up_write     up_write    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="3076">   6307/a> 307    }" class="line" name="3086">   6308/a> 308opyr" class="line" name="3096">   6309/a> 309opyr" class="line" name="3L01">   13<0/a> 31"v2edvoid4 class="l+code=exit_sh_     exit_sh_    (ly 1994 class="l+code=task_
   13< 31/span{" class="line" name="3LL2">   231 312     by Bru ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns     =  class="l+code=task     task    -ass= class="l+code=nsproxy     nsproxy    -ass= class="l+code=ine_"s     ine_"s    ;" class="line" name="31L3">   331 31Copyr" class="line" name="31L4">   431 314     by Bru if ( class="l+code=sh_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=in_use     in_use     == 0)" class="line" name="3154">   431 315     by Bru         hidden;" class="line" name="3164">   431 316opyr" class="line" name="3176">   6317/a> 317     by Bru  thespan21
2" De
   6318/a> 318     by Bru  class="l+code=down_write     down_write    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="3196">   6319/a> 319     by Bru if ( class="l+code=sh_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=in_use     in_use    )" class="line" name="3L01">   1320/a> 320     by Bru          class="l+code=idr_for_each     idr_for_each    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=inessidr     inessidr    ,4& class="l+code=ea_strysde
   132/321     by Bru  class="l+code=up_write     up_write    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="32L2">   23< 32linux}" class="line" name="32L3">   332 32Copyr" class="line" name="32L4">   432 32     lygt;" in94 class="l+code=ea_sfaulfi    ea_sfaulf    (ly 1994 class="l+code=.
   432 32Repla{" class="line" name="32L6">   632 326     by Bru ly 1994 class="l+code=e" i     e" i     * class="l+code=e" i     e" i     =  class="l+code=vma     vma    -ass= class="l+code=vm_e" i     vm_e" i    ;" class="line" name="3276">   6327/a> 327     by Bru ly 1994 class="l+code=sa_se" iddata     ea_se" iddata     * class="l+code=efd     pfd     =  class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    );" class="line" name="3286">   6328/a> 328opyr" class="line" name="3296">   6329/a> 329     by Bru hidden" class="l+code=efd     pfd    -ass= class="l+code=v_s.ps     v_s.ps    -ass= class="l+code=faulfi    faulf    ( class="l+code=vma     vma    ,  class="l+code=vmf     vmf    );" class="line" name="3301">   1330/a> 330    }" class="line" name="33L1">   133/331opyr" class="line" name="33L2">   233 332opyr#ifdef  class="l+code=CONFIG_NUMA     CONFIG_NUMAopyr" class="line" name="33L3">   33< 333    lygt;" in94 class="l+code=ea_sset_policy     ea_sset_policy    (ly 1994 class="l+code=.
   433 33     {" class="line" name="33L5">   533 335     by Bru ly 1994 class="l+code=e" i     e" i     * class="l+code=e" i     e" i     =  class="l+code=vma     vma    -ass= class="l+code=vm_e" i     vm_e" i    ;" class="line" name="33L6">   633 336     by Bru ly 1994 class="l+code=sa_se" iddata     ea_se" iddata     * class="l+code=efd     pfd     =  class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    );" class="line" name="3376">   6337/a> 337     by Bru in94 class="l+code=err     err     = 0;" class="line" name="3386">   6338/a> 338     by Bru if ( class="l+code=efd     pfd    -ass= class="l+code=v_s.ps     v_s.ps    -ass= class="l+code=set_policy     eet_policy    )" class="line" name="3396">   6339/a> 339     by Bru          class="l+code=err     err     =  class="l+code=efd     pfd    -ass= class="l+code=v_s.ps     v_s.ps    -ass= class="l+code=set_policy     eet_policy    ( class="l+code=vma     vma    ,  class="l+code=new     new    );" class="line" name="3401">   1340/a> 340     by Bru hidden" class="l+code=err     err    ;" class="line" name="34L1">   134/341    }" class="line" name="34L2">   234 342opyr" class="line" name="34L3">   334 343    lygt;" ly 1994 class="l+code=mempolicy     mempolicy     * class="l+code=ea_sget_policy     ea_sget_policy    (ly 1994 class="l+code=.
   43< 344     by Bru                                 unsigned long4 class="l+code=addr     addr    )" class="line" name="34L5">   534 34Repla{" class="line" name="34L6">   634 346     by Bru ly 1994 class="l+code=e" i     e" i     * class="l+code=e" i     e" i     =  class="l+code=vma     vma    -ass= class="l+code=vm_e" i     vm_e" i    ;" class="line" name="3476">   6347/a> 347     by Bru ly 1994 class="l+code=sa_se" iddata     ea_se" iddata     * class="l+code=efd     pfd     =  class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    );" class="line" name="3486">   6348/a> 348     by Bru ly 1994 class="l+code=mempolicy     mempolicy     * class="l+code=pol     pol     =  class="l+code=NULL     NULL    ;" class="line" name="3496">   6349/a> 349opyr" class="line" name="3501">   1350/a> 350     by Bru if ( class="l+code=efd     pfd    -ass= class="l+code=v_s.ps     v_s.ps    -ass= class="l+code=get_policy     get_policy    )" class="line" name="35L1">   135/351     by Bru  by Bru  class="l+code=pol     pol     =  class="l+code=efd     pfd    -ass= class="l+code=v_s.ps     v_s.ps    -ass= class="l+code=get_policy     get_policy    ( class="l+code=vma     vma    ,  class="l+code=addr     addr    );" class="line" name="35L2">   235 352     by Bru else if ( class="l+code=vma     vma    -ass= class="l+code=vm_policy     vm_policy    )" class="line" name="35L3">   335 353     by Bru  by Bru  class="l+code=pol     pol     =  class="l+code=vma     vma    -ass= class="l+code=vm_policy     vm_policy    ;" class="line" name="35L4">   435 354opyr" class="line" name="35L5">   53< 355     by Bru hidden" class="l+code=pol     pol    ;" class="line" name="35L6">   635 356    }" class="line" name="3576">   6357/a> 357    #endif" class="line" name="3586">   6358/a> 358opyr" class="line" name="3596">   6359/a> 359ixedlygt;" in94 class="l+code=ea_smmap     ea_smmap    (ly 1994 class="l+code=e" i     e" i     *4 class="l+code=e" i     e" i    , ly 1994 class="l+code=v_sspan>
   1360/a> 36"v2ed{" class="line" name="36L1">   136/361     by Bru ly 1994 class="l+code=sa_se" iddata     ea_se" iddata     * class="l+code=efd     pfd     =  class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    );" class="line" name="36L2">   236 362     by Bru in94 class="l+code=hid     ret    ;" class="line" name="36L3">   336 36Copyr" class="line" name="36L4">   436 364     by Bru  class="l+code=hid     ret     =  class="l+code=efd     pfd    -ass= class="l+code=e" i     e" i    -ass= class="l+code=es.p     es.p    -ass= class="l+code=mmap     mmap    ( class="l+code=efd     pfd    -ass= class="l+code=e" i     e" i    ,  class="l+code=vma     vma    );" class="line" name="36L5">   536 365     by Bru if ( class="l+code=hid     ret     != 0)" class="line" name="36L6">   63< 366     by Bru  by Bru hidden" class="l+code=hid     ret    ;" class="line" name="3676">   6367/a> 367     by Bru  class="l+code=sfd     pfd    -ass= class="l+code=v_s.ps     v_s.ps     =  class="l+code=vma     vma    -ass= class="l+code=vm_.ps     v_s.ps    ;" class="line" name="3686">   6368/a> 368    #ifdef  class="l+code=CONFIG_MMU     CONFIG_MMUopyr" class="line" name="3696">   6369/a> 369     by Bru  class="l+code=BUG_ON     BUG_ON    (! class="l+code=efd     pfd    -ass= class="l+code=v_s.ps     v_s.ps    -ass= class="l+code=faulfi    faulf    );" class="line" name="3701">   1370/a> 370opyr#endif" class="line" name="37L1">   137/371     by Bru  class="l+code=vma     vma    -ass= class="l+code=vm_.ps     v_s.ps     = & class="l+code=ea_svm_.ps     ea_svm_.ps    ;" class="line" name="37L2">   237 372     by Bru  class="l+code=shm_.pen     ea_s.pen    ( class="l+code=vma     vma    );" class="line" name="37L3">   337 37Copyr" class="line" name="37L4">   437 374     by Bru hidden" class="l+code=hid     ret    ;" class="line" name="37L5">   537 375    }" class="line" name="37L6">   637 376opyr" class="line" name="3776">   6377/a> 377opyrlygt;" in94 class="l+code=ea_sreleash     ea_sreleash    (ly 1994 class="l+code=inode     inode     * class="l+code=ino     ino    , ly 1994 class="l+code=e" i     e" i     * class="l+code=e" i     e" i    )" class="line" name="3786">   6378/a> 378ixed{" class="line" name="3796">   6379/a> 379     by Bru ly 1994 class="l+code=ea_se" iddata     ea_se" iddata     * class="l+code=efd     pfd     =  class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    );" class="line" name="3801">   1380/a> 380opyr" class="line" name="38L1">   138/381     by Bru  class="l+code=put_ine_"s     put_ine_"s    ( class="l+code=efd     pfd    -ass= class="l+code=ns     ns    );" class="line" name="38L2">   238 382     by Bru  class="l+code=shm_e" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    ) =  class="l+code=NULL     NULL    ;" class="line" name="38L3">   338 383     by Bru  class="l+code=keree     keree    ( class="l+code=sfd     pfd    );" class="line" name="38L4">   438 384     by Bru hidden"0;" class="line" name="38L5">   538 385    }" class="line" name="38L6">   638 386opyr" class="line" name="3876">   6387/a> 387opyrlygt;" in94 class="l+code=ea_sfsync     ea_sesync    (ly 1994 class="l+code=e" i     e" i     * class="l+code=e" i     e" i    ,  class="l+code=loff_d     loff_d      class="l+code=etarfi    etarf    ,  class="l+code=loff_d     loff_d      class="l+code=end     end    ,4in94 class="l+code=datasync     datasync    )" class="line" name="3886">   6388/a> 388ixed{" class="line" name="3896">   6389/a> 389     by Bru ly 1994 class="l+code=ea_se" iddata     ea_se" iddata     * class="l+code=efd     pfd     =  class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    );" class="line" name="3901">   1390/a> 390opyr" class="line" name="39L1">   139/391     by Bru if (! class="l+code=efd     pfd    -ass= class="l+code=e" i     e" i    -ass= class="l+code=es.p     es.p    -ass= class="l+code=fsync     fsync    )" class="line" name="39L2">   239 392     by Bru  by Bru hidden"- class="l+code=EINVAL     EINVAL    ;" class="line" name="39L3">   339 393     by Bru hidden" class="l+code=efd     pfd    -ass= class="l+code=e" i     e" i    -ass= class="l+code=es.p     es.p    -ass= class="l+code=fsync     fsync    ( class="l+code=efd     pfd    -ass= class="l+code=e" i     e" i    ,  class="l+code=etarfi    etarf    ,  class="l+code=end     end    ,4 class="l+code=datasync     datasync    );" class="line" name="39L4">   439 394    }" class="line" name="39L5">   539 395    " class="line" name="39L6">   639 396    lygt;" long4 class="l+code=ea_sfallocate     ea_sfallocate    (ly 1994 class="l+code=e" i     e" i     * class="l+code=e" i     e" i    , in94 class="l+code=mode     mode    ,  class="l+code=loff_d     loff_d      class="l+code=offsid     offsid    ," class="line" name="3976">   6397/a> 397     by Bru  by Bru            class="l+code=loff_d     loff_d      class="l+code=len     len    )" class="line" name="3986">   6398/a> 398ixed{" class="line" name="3996">   6399/a> 399     by Bru ly 1994 class="l+code=ea_se" iddata     ea_se" iddata     * class="l+code=efd     pfd     =  class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    );" class="line" name="4001">   1400/a> 400opyr" class="line" name="40L1">   140 401     by Bru if (! class="l+code=efd     pfd    -ass= class="l+code=e" i     e" i    -ass= class="l+code=es.p     es.p    -ass= class="l+code=fallocate     fallocate    )" class="line" name="40L2">   240 402     by Bru  by Bru hidden"- class="l+code=EOPNOTSUPP     EOPNOTSUPP    ;" class="line" name="40L3">   340 403     by Bru hidden" class="l+code=efd     pfd    -ass= class="l+code=e" i     e" i    -ass= class="l+code=es.p     es.p    -ass= class="l+code=fallocate     fallocate    ( class="l+code=e" i     e" i    ,  class="l+code=mode     mode    ,  class="l+code=offsid     offsid    ,  class="l+code=len     len    );" class="line" name="4043">   340 404    }" class="line" name="4054">   440 405    " class="line" name="4064">   440 406    lygt;" unsigned long4 class="l+code=ea_sget_unmapped_span     ea_sget_unmapped_span    (ly 1994 class="l+code=e" i     e" i     * class="l+code=e" i     e" i    ," class="line" name="4074">   4407/a> 407     by Bru unsigned long4 class="l+code=addr     addr    , unsigned long4 class="l+code=len     len    , unsigned long4 class="l+code=pgoff     pgoff    ," class="line" name="4084">   4408/a> 408     by Bru unsigned long4 class="l+code=flags     flags    )" class="line" name="4094">   4409/a> 409opyr{" class="line" name="4L01">   14<0/a> 410     by Bru ly 1994 class="l+code=ea_se" iddata     ea_se" iddata     * class="l+code=efd     pfd     =  class="l+code=ea_se" iddata     ea_se" iddata    ( class="l+code=e" i     e" i    );" class="line" name="4LL1">   14< 411     by Bru hidden" class="l+code=efd     pfd    -ass= class="l+code=e" i     e" i    -ass= class="l+code=es.p     es.p    -ass= class="l+code=get_unmapped_span     get_unmapped_span    ( class="l+code=efd     pfd    -ass= class="l+code=e" i     e" i    ,  class="l+code=addr     addr    ,  class="l+code=len     len    ," class="line" name="4LL2">   241 412     by Bru  by Bru                                  class="l+code=pgoff     pgoff    ,4 class="l+code=flags     flags    );" class="line" name="4LL3">   341 41Copyr}" class="line" name="41L4">   441 414opyr" class="line" name="4154">   441 415    lygt;" const ly 1994 class="l+code=e" is.pergt;ons     e" is.pergt;ons      class="l+code=ea_se" id.pergt;ons     ea_se" id.pergt;ons     = {" class="line" name="4L64">   441 416     by Bru . class="l+code=mmap     mmap               =  class="l+code=ea_smmap     ea_smmap    ," class="line" name="4L74">   4417/a> 417     by Bru . class="l+code=fsync     fsync              =  class="l+code=ea_sfsync     ea_sesync    ," class="line" name="4L84">   4418/a> 418     by Bru . class="l+code=releash     releash            =  class="l+code=ea_sreleash     ea_sreleash    ," class="line" name="4L94">   4419/a> 419    #ifndef  class="l+code=CONFIG_MMU     CONFIG_MMUopyr" class="line" name="4L01">   1420/a> 420     by Bru . class="l+code=get_unmapped_span     get_unmapped_span          =  class="l+code=ea_sget_unmapped_span     ea_sget_unmapped_span    ," class="line" name="42L1">   142/421    #endif" class="line" name="42L2">   24< 422     by Bru . class="l+code=llseek     llseek             =  class="l+code=noop_llseek     noop_llseek    ," class="line" name="42L3">   342 423     by Bru . class="l+code=fallocate     fallocate          =  class="l+code=ea_sfallocate     ea_sfallocate    ," class="line" name="42L4">   442 42     };" class="line" name="4L54">   442 425    " class="line" name="42L6">   642 426    lygt;" const ly 1994 class="l+code=e" is.pergt;ons     e" is.pergt;ons      class="l+code=ea_se" id.pergt;ons_huge     ea_sf" id.pergt;ons_huge     = {" class="line" name="4276">   6427/a> 427     by Bru . class="l+code=mmap     mmap               =  class="l+code=ea_smmap     ea_smmap    ," class="line" name="4286">   6428/a> 428     by Bru . class="l+code=fsync     fsync              =  class="l+code=ea_sfsync     ea_sesync    ," class="line" name="4296">   6429/a> 429     by Bru . class="l+code=releash     releash            =  class="l+code=ea_sreleash     ea_sreleash    ," class="line" name="4301">   1430/a> 430     by Bru . class="l+code=get_unmapped_span     get_unmapped_span          =  class="l+code=ea_sget_unmapped_span     ea_sget_unmapped_span    ," class="line" name="43L1">   143/431     by Bru . class="l+code=llseek     llseek             =  class="l+code=noop_llseek     noop_llseek    ," class="line" name="43L2">   243 432     by Bru . class="l+code=fallocate     fallocate          =  class="l+code=ea_sfallocate     ea_sfallocate    ," class="line" name="43L3">   34< 433    };" class="line" name="43L4">   443 434opyr" class="line" name="43L5">   543 435    in94 class="l+code=issf" idea_shugepages     issf" idea_shugepages    (ly 1994 class="l+code=e" i     e" i     * class="l+code=e" i     e" i    )" class="line" name="43L6">   643 436    {" class="line" name="4376">   6437/a> 437     by Bru hidden" class="l+code=e" i     e" i    -ass= class="l+code=es.p     es.p     == & class="l+code=ea_se" id.pergt;ons_huge     ea_sf" id.pergt;ons_huge    ;" class="line" name="4386">   6438/a> 438    }" class="line" name="4396">   6439/a> 439opyr" class="line" name="4401">   1440/a> 440    lygt;" const ly 1994 class="l+code=vm_.pergt;ons_
   144/441     by Bru . class="l+code=.pen     .pen       =  class="l+code=ea_s.pen     ea_s.pen    , Bru  thespan21
2" callback for a new vm-span .pen 9/ id="L6" class="line" name="44L2">   244 442     by Bru . class="l+code=closh     closh     b=  class="l+code=ea_sclosh     ea_sclosh    , Bru thespan21
2" callback for when the/vm-span is releashd 9/ id="L6" class="line" name="44L3">   344 443     by Bru . class="l+code=faulfi    faulf      =  class="l+code=ea_sfaulfi    ea_sfaulf    ," class="line" name="44L4">   44< 444    #if  class="l+code=definedi    defined    ( class="l+code=CONFIG_NUMA     CONFIG_NUMAopyr)" class="line" name="44L5">   544 445     by Bru . class="l+code=set_policy     eet_policy     =  class="l+code=ea_sset_policy     ea_sset_policy    ," class="line" name="44L6">   644 446     by Bru . class="l+code=get_policy     get_policy     =  class="l+code=ea_sget_policy     ea_sget_policy    ," class="line" name="4476">   6447/a> 447    #endif" class="line" name="4486">   6448/a> 448    };" class="line" name="4496">   6449/a> 449opyr" class="line" name="4501">   1450/a> 45"v2ed thespan21
/** id="L6" class="line" name="45L1">   145/451     thespan21
 * newseg - Create a new shspad memory oegts/f id="L6" class="line" name="45L2">   245 452     thespan21
 * @ns:="comthech  d="L6" class="line" name="45L3">   345 453     thespan21
 * @params:=ptr to the/
   445 454opyr thespan21
 *  d="L6" class="line" name="45L5">   54< 455     thespan21
 * nalled with sa_sids.rw_mutex held as a writer" id="L6" class="line" name="45L6">   645 45Fixed thespan21
 9/ id="L6" class="line" name="4576">   6457/a> 457opyr" class="line" name="4586">   6458/a> 458opyrlygt;" in94 class="l+code=newseg     newseg    (ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    , ly 1994 class="l+code=ine_params     ine_params     * class="l+code=params     params    )" class="line" name="4596">   6459/a> 459opyr{" class="line" name="4601">   1460/a> 460     by Bru  class="l+code=key_d     key_d      class="l+code=key     key     =  class="l+code=params     params    -ass= class="l+code=key     key    ;" class="line" name="46L1">   146/461     by Bru in94 class="l+code=ea_flg     ea_flg     =  class="l+code=params     params    -ass= class="l+code=flg     flg    ;" class="line" name="46L2">   246 462     by Bru  class="l+code=size_d     size_d      class="l+code=eize     size     =  class="l+code=params     params    -ass= class="l+code=u     u    . class="l+code=size     size    ;" class="line" name="46L3">   346 463     by Bru in94 class="l+code=error     error    ;" class="line" name="46L4">   446 464     by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    ;" class="line" name="46L5">   546 465     by Bru  class="l+code=size_d     size_d      class="l+code=numpages     numpages     = ( class="l+code=eize     size     +  class="l+code=PAGE_SIZE     PAGE_SIZE     - 1) ass=ass=  class="l+code=PAGE_SHIFT     PAGE_SHIFT    ;" class="line" name="46L6">   64< 466     by Bru ly 1994 class="l+code=e" i     e" i     *4 class="l+code=e" i     e" i    ;" class="line" name="4676">   6467/a> 467     by Bru chsp  class="l+code=ncom     ncom    [13];" class="line" name="4686">   6468/a> 468     by Bru in94 class="l+code=idi    id    ;" class="line" name="4696">   6469/a> 469     by Bru  class="l+code=vm_elags_d     vm_elags_d      class="l+code=acctelag     acctelag     = 0;" class="line" name="4701">   1470/a> 470opyr" class="line" name="47L1">   147/471     by Bru if ( class="l+code=eize     size     &ls=  class="l+code=SHMMIN     SHMMIN     ||  class="l+code=eize     size     ass=  class="l+code=ns     ns    -ass= class="l+code=ea_sctlmax     ea_sctlmax    )" class="line" name="47L2">   247 472     by Bru  by Bru hidden"- class="l+code=EINVAL     EINVAL    ;" class="line" name="47L3">   347 47Copyr" class="line" name="47L4">   447 474     by Bru if ( class="l+code=ns     ns    -ass= class="l+code=ea_stofi    ea_stot     +  class="l+code=numpages     numpages     ass=  class="l+code=ns     ns    -ass= class="l+code=ea_sctlall     ea_sctlall    )" class="line" name="47L5">   547 475     by Bru         hidden"- class="l+code=ENOSPC     ENOSPC    ;" class="line" name="47L6">   647 476opyr" class="line" name="4776">   6477/a> 477     by Bru  class="l+code=shp     eap     =  class="l+code=ine_rcu_alloc     ine_rcu_alloc    (lizeof(* class="l+code=shp     eap    ));" class="line" name="4786">   6478/a> 478     by Bru if (! class="l+code=ehp     eap    )" class="line" name="4796">   6479/a> 479     by Bru         hidden"- class="l+code=ENOMEM     ENOMEM    ;" class="line" name="4801">   1480/a> 480opyr" class="line" name="48L1">   148/481     by Bru  class="l+code=ehp     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=key     key     =  class="l+code=key     key    ;" class="line" name="48L2">   248 482     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=mode     mode     = ( class="l+code=ea_flg     ea_flg     &  class="l+code=S_IRWXUGO     S_IRWXUGO    );" class="line" name="48L3">   348 483     by Bru  class="l+code=shp     eap    -ass= class="l+code=mlock_user     mlock_user     =  class="l+code=NULL     NULL    ;" class="line" name="48L4">   448 484opyr" class="line" name="48L5">   548 485     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=security     eecurity     =  class="l+code=NULL     NULL    ;" class="line" name="48L6">   648 486     by Bru  class="l+code=error     error     =  class="l+code=eecuritydea_salloc     eecuritydea_salloc    ( class="l+code=ehp     eap    );" class="line" name="4876">   6487/a> 487     by Bru if ( class="l+code=error     error    ) {" class="line" name="4886">   6488/a> 488     by Bru          class="l+code=ine_rcu_putss="    ine_rcu_putss=    ( class="l+code=ehp     eap    );" class="line" name="4896">   6489/a> 489     by Bru         hidden" class="l+code=error     error    ;" class="line" name="4901">   1490/a> 490     by Bru }" class="line" name="49L1">   149/491opyr" class="line" name="49L2">   249 492     by Bru  class="l+code=sprin9="    sprin9=     ( class="l+code=ncom     ncom    ,u thespan21"SYSV%08x" id="L6,4 class="l+code=key     key    );" class="line" name="49L3">   349 493     by Bru if ( class="l+code=sh_flg     ea_flg     &  class="l+code=SHM_HUGETLB     SHM_HUGETLB    ) {" class="line" name="49L4">   449 494     by Bru         ly 1994 class="l+code=hlygtm     hlygtm     * class="l+code=hs     hs     =  class="l+code=hlygtm_lizelog     hlygtm_lizelog    (( class="l+code=sh_flg     ea_flg     &ss=ass=  class="l+code=SHM_HUGE_SHIFT     SHM_HUGE_SHIFT    )" class="line" name="49L5">   549 495     by Bru                                         &  class="l+code=SHM_HUGE_MASK     SHM_HUGE_MASK    );" class="line" name="49L6">   649 496     by Bru  by Bru  class="l+code=size_d     size_d      class="l+code=hugeeize     hugeeize    ;" class="line" name="4976">   6497/a> 497opyr" class="line" name="4986">   6498/a> 498     by Bru         if (! class="l+code=hs     hs    ) {" class="line" name="4996">   6499/a> 499     by Bru          by Bru  class="l+code=error     error     = - class="l+code=EINVAL     EINVAL    ;" class="line" name="5001">   1500/a> 500     by Bru                 goto  class="l+code=no_e" i     no_e" i    ;" class="line" name="5011">   150 501     by Bru         }" class="line" name="50L2">   250 502     by Bru  by Bru  class="l+code=hugeeize     hugeeize     =  class="l+code=ALIGN     ALIGN    ( class="l+code=eize     size    ,4 class="l+code=huge_page_eize     huge_page_eize    ( class="l+code=hs     hs    ));" class="line" name="50L3">   350 50Copyr" class="line" name="5043">   350 504     by Bru          thespan21
2" hugetlbsf" ideiddp applies ly i994accounting 9/ id="L6" class="line" name="5054">   450 505     by Bru         if ( class="l+code=sh_flg     ea_flg     &  class="l+code=SHM_NORESERVE     SHM_NORESERVE    )" class="line" name="5064">   450 506     by Bru  by Bru  by Bru  class="l+code=acctelag     acctelag     =  class="l+code=VM_NORESERVE     VM_NORESERVE    ;" class="line" name="5074">   4507/a> 507     by Bru  by Bru  class="l+code=e" i     e" i     =  class="l+code=hugetlbsf" ideiddp     hugetlbsf" ideiddp    ( class="l+code=ncom     ncom    ,u class="l+code=hugeeize     hugeeize    ,  class="l+code=acctelag     acctelag    ," class="line" name="5084">   4508/a> 508     by Bru                           & class="l+code=eap     eap    -ass= class="l+code=mlock_user     mlock_user    ,  class="l+code=HUGETLB_SHMFS_INODE     HUGETLB_SHMFS_INODE    ," class="line" name="5094">   4509/a> 509     by Bru          by Bru         ( class="l+code=sh_flg     ea_flg     &ss=ass=  class="l+code=SHM_HUGE_SHIFT     SHM_HUGE_SHIFT    ) &  class="l+code=SHM_HUGE_MASK     SHM_HUGE_MASK    );" class="line" name="5L01">   15<0/a> 510     by Bru } else {" class="line" name="5LL1">   15< 511     by Bru          thespan21
2" id="L6" class="line" name="5LL2">   251 512     thespan21
                 * Do no94allow no4accounting for OVERCOMMIT_NEVER, even  d="L6" class="line" name="5LL3">   351 513     thespan21
                 * if it's asked for" id="L6" class="line" name="51L4">   451 514opyr thespan21
                 */ id="L6" class="line" name="5154">   451 515     by Bru         if  (( class="l+code=sh_flg     ea_flg     &  class="l+code=SHM_NORESERVE     SHM_NORESERVE    ) &&" class="line" name="5164">   451 516     by Bru  by Bru  by Bru          class="l+code=sysctl_overptioit_memory     eysctl_overptioit_memory     !=  class="l+code=OVERCOMMIT_NEVER     OVERCOMMIT_NEVER    )" class="line" name="5L74">   4517/a> 517     by Bru  by Bru          class="l+code=acctelag     acctelag     =  class="l+code=VM_NORESERVE     VM_NORESERVE    ;" class="line" name="5L84">   4518/a> 518     by Bru          class="l+code=e" i     e" i     =  class="l+code= naemsf" ideiddp      naemsf" ideiddp    ( class="l+code=ncom     ncom    ,u class="l+code=eize     size    ,4 class="l+code=acctelag     acctelag    );" class="line" name="5L94">   4519/a> 519     by Bru }" class="line" name="5L01">   1520/a> 520     by Bru  class="l+code=error     error     =  class="l+code=PTR_ERR     PTR_ERR    ( class="l+code=e" i     e" i    );" class="line" name="52L1">   152/521     by Bru if ( class="l+code=IS_ERR     IS_ERR    ( class="l+code=e" i     e" i    ))" class="line" name="52L2">   25< 522     by Bru  by Bru goto  class="l+code=no_e" i     no_e" i    ;" class="line" name="52L3">   352 52Copyr" class="line" name="52L4">   452 524     by Bru  class="l+code=idi    id     =  class="l+code=ine_addidi    ine_addid    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ), & class="l+code=eap     eap    -ass= class="l+code=ea_sper_     ea_sper_    ,4 class="l+code=ns     ns    -ass= class="l+code=ea_sctlmni     ea_sctlmni    );" class="line" name="5254">   452 525     by Bru if ( class="l+code=idi    id     &ls= 0) {" class="line" name="52L6">   652 526     by Bru  by Bru  class="l+code=error     error     =  class="l+code=idi    id    ;" class="line" name="5276">   6527/a> 527     by Bru  by Bru goto  class="l+code=no_idi    no_id    ;" class="line" name="5284">   4528/a> 528     by Bru }" class="line" name="5L94">   4529/a> 529opyr" class="line" name="5301">   1530/a> 530     by Bru  class="l+code=eap     eap    -ass= class="l+code=ea_scpridi    ea_scprid     =  class="l+code=task_tgid_vnr     task_tgid_vnr    ( class="l+code=currr  >    currr      );" class="line" name="53L1">   153/531     by Bru  class="l+code=ehp     eap    -ass= class="l+code=ea_slpridi    ea_slprid     = 0;" class="line" name="53L2">   253 532     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_sati_     ea_sati_     =  class="l+code= np     eap    -ass= class="l+code=ea_sdti_     ea_sdti_     = 0;" class="line" name="53L3">   35< 533     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_scti_     ea_scti_     =  class="l+code=get_seconds     get_seconds    ();" class="line" name="53L4">   453 534     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_ssegsz     ea_ssegsz     =  class="l+code= ize     size    ;" class="line" name="53L5">   553 535     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_snattch     ea_snattch     = 0;" class="line" name="53L6">   653 536     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_se" i     ea_se" i     =  class="l+code=e" i     e" i    ;" class="line" name="5376">   6537/a> 537     by Bru  class="l+code=shp     eap    -ass= class="l+code=ea_screator     ea_screator     =  class="l+code=currr  >    currr      ;" class="line" name="5384">   4538/a> 538     by Bru  thespan21
2" id="L6" class="line" name="5396">   6539/a> 539opyr thespan21
         * ea_id gets reported as "inode#" in /proc/pid/maps" id="L6" class="line" name="5401">   1540/a> 54"v2ed thespan21
         * proc-ps tools use this. Changing this will break them" id="L6" class="line" name="54L1">   154/541     thespan21
         */ id="L6" class="line" name="54L2">   254 542     by Bru  class="l+code=f" idinode     f" idinode    ( class="l+code=e" i     e" i    )-ass= class="l+code=i_ino     i_ino     =  class="l+code= np     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=idi    id    ;" class="line" name="54L3">   354 54Copyr" class="line" name="54L4">   45< 544     by Bru  class="l+code=ns     ns    -ass= class="l+code=ea_stofi    ea_stot     +=  class="l+code=numpages     numpages    ;" class="line" name="54L5">   554 545     by Bru  class="l+code=error     error     =  class="l+code=enp     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=idi    id    ;" class="line" name="54L6">   654 546     by Bru  class="l+code=shm_unlock     ea_sunlock    ( class="l+code=ehp     eap    );" class="line" name="5476">   6547/a> 547     by Bru hidden" class="l+code=error     error    ;" class="line" name="5486">   6548/a> 548    " class="line" name="5496">   6549/a> 549opyr class="l+code=no_idi    no_id    :" class="line" name="5501">   1550/a> 550     by Bru if ( class="l+code=issf" idhugepages     issf" idhugepages    ( class="l+code=e" i     e" i    ) &&  class="l+code=shp     eap    -ass= class="l+code=mlock_user     mlock_user    )" class="line" name="55L1">   155/551     by Bru          class="l+code=user_shm_unlock     user_shm_unlock    ( class="l+code=eize     size    ,4 class="l+code=shp     eap    -ass= class="l+code=mlock_user     mlock_user    );" class="line" name="55L2">   255 552     by Bru  class="l+code=fpufi    fpuf    ( class="l+code=e" i     e" i    );" class="line" name="55L3">   355 553     class="l+code=no_e" i     no_e" i    :" class="line" name="55L4">   455 554     by Bru  class="l+code=securitydea_seree     securitydea_seree    ( class="l+code=ehp     eap    );" class="line" name="55L5">   55< 555     by Bru  class="l+code=ine_rcu_putss="    ine_rcu_putss=    ( class="l+code=ehp     eap    );" class="line" name="55L6">   655 556     by Bru hidden" class="l+code=error     error    ;" class="line" name="5576">   6557/a> 557opyr}" class="line" name="5586">   6558/a> 558    " class="line" name="5596">   6559/a> 559opyr thespan21
2" id="L6" class="line" name="5601">   1560/a> 56"v2ed thespan21
 * nalled with sa_sids.rw_mutex and inep locked" id="L6" class="line" name="56L1">   156/561     thespan21
 */ id="L6" class="line" name="56L2">   256 562    lygt;"  class="l+code=inclass=   inclas     in94 class="l+code=ea_ssecurity     ea_ssecurity    (ly 1994 class="l+code=kern_ine_per_     kern_ine_per_     * class="l+code=inep"    inep    , in94 class="l+code=ea_flg     ea_flg    )" class="line" name="56L3">   356 563    {" class="line" name="56L4">   456 564     by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    ;" class="line" name="56L5">   556 565    " class="line" name="56L6">   65< 566     by Bru  class="l+code=shp     eap     =  class="l+code=c"7bainer_o="    c"7bainer_o=    ( class="l+code=inep"    inep    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel    ,4 class="l+code=sh_sper_     ea_sper_    );" class="line" name="5676">   6567/a> 567     by Bru hidden" class="l+code=eecuritydea_sassociate     eecuritydea_sassociate    ( class="l+code=ehp     eap    ,4 class="l+code=sh_flg     ea_flg    );" class="line" name="5686">   6568/a> 568    }" class="line" name="5696">   6569/a> 569opyr" class="line" name="5701">   1570/a> 57"v2ed thespan21
/* id="L6" class="line" name="57L1">   157/571     thespan21
 * nalled with sa_sids.rw_mutex and inep locked" id="L6" class="line" name="57L2">   257 572     thespan21
 */ id="L6" class="line" name="57L3">   357 57Copyrlygt;"  class="l+code=inclass=   inclas     in94 class="l+code=ea_smore_checks     ea_smore_checks    (ly 1994 class="l+code=kern_ine_per_     kern_ine_per_     * class="l+code=inep"    inep    ," class="line" name="57L4">   457 574     by Bru                         ly 1994 class="l+code=ine_params     ine_params     * class="l+code=params     params    )" class="line" name="57L5">   557 575    {" class="line" name="57L6">   657 576     by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    ;" class="line" name="5776">   6577/a> 577opyr" class="line" name="5786">   6578/a> 578     by Bru  class="l+code=shp     eap     =  class="l+code=c"7bainer_o="    c"7bainer_o=    ( class="l+code=inep"    inep    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel    ,4 class="l+code=sh_sper_     ea_sper_    );" class="line" name="5796">   6579/a> 579     by Bru if ( class="l+code=shp     eap    -ass= class="l+code=ea_ssegsz     ea_ssegsz     &ls=  class="l+code=params     params    -ass= class="l+code=u     u    . class="l+code=size     size    )" class="line" name="5801">   1580/a> 580     by Bru         hidden"- class="l+code=EINVAL     EINVAL    ;" class="line" name="58L1">   158/581opyr" class="line" name="58L2">   258 582     by Bru hidden"0;" class="line" name="58L3">   358 58Copyr}" class="line" name="58L4">   458 584opyr" class="line" name="58L5">   558 585     class="l+code=SYSCALL_DEFINE3     SYSCALL_DEFINE3    ( class="l+code=ehmgid     ehmgid    ,4 class="l+code=key_d     key_d    ,4 class="l+code=key     key    ,u class="l+code=eize_d     size_d    ,u class="l+code=eize     size    ,4in9,4 class="l+code=sh_flg     ea_flg    )" class="line" name="58L6">   658 586    {" class="line" name="5876">   6587/a> 587     by Bru ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    ;" class="line" name="5886">   6588/a> 588     by Bru ly 1994 class="l+code=ine_.ps     ine_.ps      class="l+code=ea_s.ps     ea_s.ps    ;" class="line" name="5896">   6589/a> 589     by Bru ly 1994 class="l+code=ine_params     ine_params      class="l+code=sh_sparams     sh_sparams    ;" class="line" name="5901">   1590/a> 590opyr" class="line" name="59L1">   159/591     by Bru  class="l+code=ns     ns     =  class="l+code=currr  >    currr      -ass= class="l+code=nsproxy     nsproxy    -ass= class="l+code=ine_"s     ine_ns    ;" class="line" name="59L2">   259 592    " class="line" name="59L3">   359 593     by Bru  class="l+code=sh_s.ps     ea_s.ps    . class="l+code=getnew     getnew     =  class="l+code=newseg     newseg    ;" class="line" name="59L4">   459 594     by Bru  class="l+code=sh_s.ps     ea_s.ps    . class="l+code=associate     associate     =  class="l+code=ea_ssecurity     ea_ssecurity    ;" class="line" name="59L5">   559 595     by Bru  class="l+code=sh_s.ps     ea_s.ps    . class="l+code=more_checks     more_checks     =  class="l+code=ea_smore_checks     ea_smore_checks    ;" class="line" name="59L6">   659 596opyr" class="line" name="5976">   6597/a> 597     by Bru  class="l+code=sh_sparams     sh_sparams    . class="l+code=key     key     =  class="l+code=key     key    ;" class="line" name="5986">   6598/a> 598     by Bru  class="l+code=sh_sparams     sh_sparams    . class="l+code=flg     flg     =  class="l+code=ea_flg     ea_flg    ;" class="line" name="5996">   6599/a> 599     by Bru  class="l+code=sh_sparams     sh_sparams    . class="l+code=u     u    . class="l+code=size     size     =  class="l+code= ize     size    ;" class="line" name="6001">   1600/a> 600opyr" class="line" name="6011">   160 601     by Bru hidden" class="l+code=inegid     inegid    ( class="l+code=ns     ns    , & class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ), & class="l+code=ea_s.ps     ea_s.ps    , & class="l+code=ea_sparams     sh_sparams    );" class="line" name="60L2">   260 602    }" class="line" name="60L3">   360 60Copyr" class="line" name="6043">   360 604    lygt;"  class="l+code=inclass=   inclas     unsigned long  class="l+code=c"pydea_id_to_user     c"pydea_id_to_user    (void  class="l+code=__user     __user     * class="l+code=bu="    bu=    , ly 1994 class="l+code=ea_id64_ds     ea_id64_ds     * class="l+code=in     in    , in94 class="l+code=version     version    )" class="line" name="6054">   460 605    {" class="line" name="6064">   460 606     by Bru switch( class="l+code=version     version    ) {" class="line" name="6074">   4607/a> 607     by Bru case4 class="l+code=IPC_6   4608/a> 608     by Bru         hidden" class="l+code=c"pydto_user     c"pydto_user    ( class="l+code=bu="    bu=    ,  class="l+code=in     in    , lizeof(* class="l+code=in     in    ));" class="line" name="6094">   4609/a> 609     by Bru case4 class="l+code=IPC_OLD/a>   16<0/a> 610     by Bru     {" class="line" name="6LL1">   16< 611     by Bru         ly 1994 class="l+code=ea_id_ds     ea_id_ds      class="l+code=oufi    ou     ;" class="line" name="6LL2">   261 612    " class="line" name="6LL3">   361 613     by Bru          class="l+code=memsid     memsid    (& class="l+code=oufi    ou     , 0, lizeof( class="l+code=oufi    ou     ));" class="line" name="61L4">   461 614     by Bru          class="l+code=ine64_per_dto_ine_per_     ine64_per_dto_ine_per_    (& class="l+code=in     in    -ass= class="l+code=ea_sper_     ea_sper_    ,4& class="l+code=oufi    ou     . class="l+code=sh_sper_     ea_sper_    );" class="line" name="6154">   461 615     by Bru          class="l+code=oufi    ou     . class="l+code=sh_ssegsz     ea_ssegsz       =  class="l+code=in     in    -ass= class="l+code=ea_ssegsz     ea_ssegsz    ;" class="line" name="6164">   461 616     by Bru  by Bru  class="l+code=oufi    ou     . class="l+code=sh_sati_i     ea_sati_i       =  class="l+code=in     in    -ass= class="l+code=ea_sati_i     ea_sati_i    ;" class="line" name="6174">   4617/a> 617     by Bru  by Bru  class="l+code=oufi    ou     . class="l+code=sh_sdti_i     ea_sdti_i       =  class="l+code=in     in    -ass= class="l+code=ea_sdti_i     ea_sdti_i    ;" class="line" name="6184">   4618/a> 618     by Bru          class="l+code=oufi    ou     . class="l+code=sh_scti_i     ea_scti_i       =  class="l+code=in     in    -ass= class="l+code=ea_scti_i     ea_scti_i    ;" class="line" name="6194">   4619/a> 619     by Bru          class="l+code=oufi    ou     . class="l+code=sh_scpidi    ea_scpid        =  class="l+code=in     in    -ass= class="l+code=ea_scpidi    ea_scpid    ;" class="line" name="6L01">   1620/a> 620     by Bru          class="l+code=oufi    ou     . class="l+code=sh_slpidi    ea_slpid        =  class="l+code=in     in    -ass= class="l+code=ea_slpidi    ea_slpid    ;" class="line" name="6LL1">   162/621     by Bru          class="l+code=oufi    ou     . class="l+code=sh_snattch     ea_snattch      =  class="l+code=in     in    -ass= class="l+code=ea_snattch     ea_snattch    ;" class="line" name="6LL2">   26< 622    " class="line" name="62L3">   362 623     by Bru         hidden" class="l+code=c"pydto_user     c"pydto_user    ( class="l+code=bu="    bu=    , & class="l+code=oufi    ou     , lizeof( class="l+code=oufi    ou     ));" class="line" name="62L4">   462 624     by Bru     }" class="line" name="6254">   462 625     by Bru defaulf:" class="line" name="62L6">   662 626     by Bru  by Bru hidden"- class="l+code=EINVAL     EINVAL    ;" class="line" name="6276">   6627/a> 627     by Bru }" class="line" name="6284">   4628/a> 628    }" class="line" name="6L94">   4629/a> 629opyr" class="line" name="6301">   1630/a> 630    lygt;"  class="l+code=inclass=   inclas     unsigned long" class="line" name="63L1">   163/631     class="l+code=c"pydea_id_from_user     c"pydea_id_from_user    (ly 1994 class="l+code=ea_id64_ds     ea_id64_ds     * class="l+code=oufi    ou     , void  class="l+code=__user     __user     * class="l+code=bu="    bu=    , in94 class="l+code=version     version    )" class="line" name="63L2">   263 632    {" class="line" name="63L3">   36< 633     by Bru switch( class="l+code=version     version    ) {" class="line" name="63L4">   463 634     by Bru case4 class="l+code=IPC_6   563 635     by Bru         if ( class="l+code=c"pydfrom_user     c"pydfrom_user    ( class="l+code=oufi    ou     ,  class="l+code=bu="    bu=    , lizeof(* class="l+code=oufi    ou     )))" class="line" name="63L6">   663 636     by Bru  by Bru  by Bru hidden"- class="l+code=EFAULT     EFAULT    ;" class="line" name="6376">   6637/a> 637     by Bru  by Bru hidden"0;" class="line" name="6384">   4638/a> 638     by Bru case4 class="l+code=IPC_OLD/a>   6639/a> 639     by Bru     {" class="line" name="6401">   1640/a> 640     by Bru         ly 1994 class="l+code=ea_id_ds     ea_id_ds      class="l+code=tbu=_oldi    tbu=_old    ;" class="line" name="64L1">   164/641opyr" class="line" name="64L2">   264 642     by Bru  by Bru if ( class="l+code=c"pydfrom_user     c"pydfrom_user    (& class="l+code=tbu=_oldi    tbu=_old    ,  class="l+code=bu="    bu=    , lizeof( class="l+code=tbu=_oldi    tbu=_old    )))" class="line" name="64L3">   364 643     by Bru          by Bru hidden"- class="l+code=EFAULT     EFAULT    ;" class="line" name="64L4">   46< 644opyr" class="line" name="64L5">   564 645     by Bru          class="l+code=oufi    ou     -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=uidi    uid           =  class="l+code=tbu=_oldi    tbu=_old    . class="l+code=sh_sper_     ea_sper_    . class="l+code=uidi    uid    ;" class="line" name="64L6">   664 646     by Bru  by Bru  class="l+code=oufi    ou     -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=gidi    gid           =  class="l+code=tbu=_oldi    tbu=_old    . class="l+code=sh_sper_     ea_sper_    . class="l+code=gidi    gid    ;" class="line" name="6476">   6647/a> 647     by Bru  by Bru  class="l+code=oufi    ou     -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=mode     mode          =  class="l+code=tbu=_oldi    tbu=_old    . class="l+code=sh_sper_     ea_sper_    . class="l+code=mode     mode    ;" class="line" name="6484">   4648/a> 648    " class="line" name="6496">   6649/a> 649     by Bru         hidden"0;" class="line" name="6501">   1650/a> 650     by Bru     }" class="line" name="65L1">   165/651     by Bru defaulf:" class="line" name="65L2">   265 652     by Bru  by Bru hidden"- class="l+code=EINVAL     EINVAL    ;" class="line" name="65L3">   365 653     by Bru }" class="line" name="65L4">   465 654    }" class="line" name="65L5">   56< 655    " class="line" name="65L6">   665 656    lygt;"  class="l+code=inclass=   inclas     unsigned long  class="l+code=c"pydea_info_to_user     c"pydea_info_to_user    (void  class="l+code=__user     __user     * class="l+code=bu="    bu=    , ly 1994 class="l+code=ea_info6   6657/a> 657opyr{" class="line" name="6586">   6658/a> 658     by Bru lwitch( class="l+code=version     version    ) {" class="line" name="6596">   6659/a> 659     by Bru case4 class="l+code=IPC_6   1660/a> 660     by Bru         hidden" class="l+code=c"pydto_user     c"pydto_user    ( class="l+code=bu="    bu=    ,  class="l+code=in     in    , lizeof(* class="l+code=in     in    ));" class="line" name="66L1">   166/661     by Bru case4 class="l+code=IPC_OLD/a>   266 662     by Bru  by {" class="line" name="66L3">   366 663     by Bru         ly 1994 class="l+code=ea_info/a>   466 664opyr" class="line" name="66L5">   566 665     by Bru         if( class="l+code=in     in    -ass= class="l+code=ea_max/a>   66< 666     by Bru  by Bru  by Bru  class="l+code=oufi    ou     . class="l+code=sh_max/a>   6667/a> 667     by Bru  by Bru else" class="line" name="6686">   6668/a> 668     by Bru                  class="l+code=oufi    ou     . class="l+code=sh_max/a>   6669/a> 669opyr" class="line" name="6701">   1670/a> 670     by Bru          class="l+code=oufi    ou     . class="l+code=sh_min     sh_min          =  class="l+code=in     in    -ass= class="l+code=ea_min     sh_min    ;" class="line" name="67L1">   167/671     by Bru          class="l+code=oufi    ou     . class="l+code=sh_mni     ea_mni          =  class="l+code=in     in    -ass= class="l+code=ea_mni     ea_mni    ;" class="line" name="67L2">   267 672     by Bru  by Bru  class="l+code=oufi    ou     . class="l+code=sh_seg     sh_seg          =  class="l+code=in     in    -ass= class="l+code=ea_seg     sh_seg    ;" class="line" name="67L3">   367 673     by Bru          class="l+code=oufi    ou     . class="l+code=sh_all     ea_all          =  class="l+code=in     in    -ass= class="l+code=ea_all     ea_all    ; " class="line" name="67L4">   467 674opyr" class="line" name="67L5">   567 675     by Bru         hidden" class="l+code=c"pydto_user     c"pydto_user    ( class="l+code=bu="    bu=    , & class="l+code=oufi    ou     , lizeof( class="l+code=oufi    ou     ));" class="line" name="67L6">   667 676     by Bru  by }" class="line" name="6776">   6677/a> 677     by Bru defaulf:" class="line" name="6786">   6678/a> 678     by Bru         hidden"- class="l+code=EINVAL     EINVAL    ;" class="line" name="6796">   6679/a> 679     by Bru }" class="line" name="6801">   1680/a> 680    }" class="line" name="68L1">   168/681opyr" class="line" name="68L2">   268 682     thespan21
/* id="L6" class="line" name="68L3">   368 683     thespan21
 * nalculate and add used RSS and swap pages of a sa_" id="L6" class="line" name="68L4">   468 684opyr thespan21
 * nalled with sa_sids.rw_mutex held as a hiader  d="L6" class="line" name="68L5">   568 685     thespan21
 */ id="L6" class="line" name="68L6">   668 686    lygt;" void  class="l+code=sa_sadd_rss_swap     ea_sadd_rss_swap    (ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    ," class="line" name="6876">   6687/a> 687     by Bru unsigned long * class="l+code=rss_add     rss_add    , unsigned long * class="l+code=swp_add     swp_add    )" class="line" name="6886">   6688/a> 688    {" class="line" name="6896">   6689/a> 689     by Bru ly 1994 class="l+code=inode     inode     * class="l+code=inode     inode    ;" class="line" name="6901">   1690/a> 690opyr" class="line" name="69L1">   169/691     by Bru  class="l+code=inode     inode     =  class="l+code=e" idinode     f" idinode    ( class="l+code=shp     eap    -ass= class="l+code=ea_se" i     ea_se" i    );" class="line" name="69L2">   269 692    " class="line" name="69L3">   369 693     by Bru if ( class="l+code=issf" idhugepages     issf" idhugepages    ( class="l+code=shp     eap    -ass= class="l+code=ea_se" i     ea_se" i    )) {" class="line" name="69L4">   469 694     by Bru  by Bru ly 1994 class="l+code=address_shech     address_shech     * class="l+code=mapping     mapping     =  class="l+code=inode     inode    -ass= class="l+code=i_mapping     i_mapping    ;" class="line" name="69L5">   569 695     by Bru         ly 1994 class="l+code=hlygte     hlygte     * class="l+code=h     h     =  class="l+code=hlygtese" i     hlygtese" i    ( class="l+code=shp     eap    -ass= class="l+code=ea_se" i     ea_se" i    );" class="line" name="69L6">   669 696     by Bru  by Bru * class="l+code=rss_add     rss_add     +=  class="l+code=pagessperdhuge_page     pagessperdhuge_page    ( class="l+code=h     h    ) *  class="l+code=mapping     mapping    -ass= class="l+code=nrpages     nrpages    ;" class="line" name="6976">   6697/a> 697     by Bru } else {" class="line" name="6986">   6698/a> 698    #ifdef  class="l+code=CONFIG_SHMEM     CONFIG_SHMEM    " class="line" name="6996">   6699/a> 699     by Bru         ly 1994 class="l+code=ea_emdinode_info/a>   1700/a> 700     by Bru          class="l+code=spin_lock     epin_lock    (& class="l+code=info/a>   170 701     by Bru         * class="l+code=rss_add     rss_add     +=  class="l+code=inode     inode    -ass= class="l+code=i_mapping     i_mapping    -ass= class="l+code=nrpages     nrpages    ;" class="line" name="70L2">   270 702     by Bru  by Bru * class="l+code=swp_add     swp_add     +=  class="l+code=info/a>   270 703     by Bru          class="l+code=epin_unlock     epin_unlock    (& class="l+code=info/a>   270 704    #else" class="line" name="7054">   470 705     by Bru         * class="l+code=rss_add     rss_add     +=  class="l+code=inode     inode    -ass= class="l+code=i_mapping     i_mapping    -ass= class="l+code=nrpages     nrpages    ;" class="line" name="7064">   470 706    #endif" class="line" name="7074">   4707/a> 707     by Bru }" class="line" name="7084">   4708/a> 708    }" class="line" name="7094">   4709/a> 709opyr" class="line" name="7L01">   17<0/a> 71"v2ed thespan21
/* id="L6" class="line" name="7LL1">   17< 711     thespan21
 * nalled with sa_sids.rw_mutex held as a hiader  d="L6" class="line" name="7LL2">   271 712     thespan21
 */ id="L6" class="line" name="7LL3">   371 71Copyrlygt;" void  class="l+code=sa_sget_sygt     ea_sget_sygt    (ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    , unsigned long * class="l+code=rss     rss    ," class="line" name="71L4">   471 714     by Bru         unsigned long * class="l+code=swp     swp    )" class="line" name="7154">   471 715    {" class="line" name="7164">   471 716     by Bru in94 class="l+code=next_idi    next_id    ;" class="line" name="7174">   4717/a> 717     by Bru in94 class="l+code=total     total    ,  class="l+code=in_use     in_use    ;" class="line" name="7184">   4718/a> 718    " class="line" name="7194">   4719/a> 719     by Bru * class="l+code=rss     rss     = 0;" class="line" name="7L01">   1720/a> 720     by Bru * class="l+code=swp     swp     = 0;" class="line" name="7LL1">   172/721opyr" class="line" name="7LL2">   27< 722     by Bru  class="l+code=in_use     in_use     =  class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=in_use     in_use    ;" class="line" name="72L3">   372 72Copyr" class="line" name="72L4">   472 724     by Bru for ( class="l+code=total     total     = 0,  class="l+code=next_idi    next_id     = 0;4 class="l+code=total     total     &ls=  class="l+code=in_use     in_use    ;  class="l+code=next_idi    next_id    ++) {" class="line" name="7254">   472 725     by Bru         ly 1994 class="l+code=kern_ine_per_     kern_ine_per_     * class="l+code=ine     ine    ;" class="line" name="7264">   472 726     by Bru  by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    ;" class="line" name="7276">   6727/a> 727opyr" class="line" name="7284">   4728/a> 728     by Bru          class="l+code=ine     ine     =  class="l+code=idr_findi    idr_find    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=ipcssidr     ipcssidr    ,  class="l+code=next_idi    next_id    );" class="line" name="7L94">   4729/a> 729     by Bru         if ( class="l+code=ine     ine     ==  class="l+code=NULL     NULL    )" class="line" name="7301">   1730/a> 730     by Bru                 c"7binue;" class="line" name="73L1">   173/731     by Bru          class="l+code=shp     eap     =  class="l+code=c"7bainer_o="    c"7bainer_o=    ( class="l+code=ine     ine    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel    ,4 class="l+code=sh_sper_     ea_sper_    );" class="line" name="73L2">   273 732    " class="line" name="73L3">   37< 733     by Bru          class="l+code=ea_sadd_rss_swap     ea_sadd_rss_swap    ( class="l+code=shp     eap    ,4 class="l+code=rss     rss    ,  class="l+code=ewp     swp    );" class="line" name="73L4">   473 734opyr" class="line" name="73L5">   573 735     by Bru          class="l+code=total     total    ++;" class="line" name="7364">   473 736     by Bru }" class="line" name="7376">   6737/a> 737opyr}" class="line" name="7384">   4738/a> 738    " class="line" name="7396">   6739/a> 739opyr thespan21
2" id="L6" class="line" name="7401">   1740/a> 74"v2ed thespan21
 * This function handles some sa_ctl ptioands which require the rw_mutex id="L6" class="line" name="74L1">   174/741     thespan21
 * to be held in write mode" id="L6" class="line" name="74L2">   274 742     thespan21
 * NOTE: no locks must be held, the rw_mutex is taken inside this function" id="L6" class="line" name="74L3">   374 743     thespan21
 */ id="L6" class="line" name="74L4">   47< 744    lygt;" in94 class="l+code=ea_ctl_down     sh_ctl_down    (ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    , in94 class="l+code=ea_idi    ea_id    , in94 class="l+code=cmdi    cmd    ," class="line" name="74L5">   574 745     by Bru         by Bru ly 1994 class="l+code=ea_id_ds     ea_id_ds      class="l+code=__user     __user     * class="l+code=bu="    bu=    , in94 class="l+code=version     version    )" class="line" name="74L6">   674 746    {" class="line" name="7476">   6747/a> 747     by Bru ly 1994 class="l+code=kern_ine_per_     kern_ine_per_     * class="l+code=inep"    inep    ;" class="line" name="7484">   4748/a> 748     by Bru ly 1994 class="l+code=sa_id64_ds     ea_id64_ds      class="l+code=sa_id64     ea_id64    ;" class="line" name="7496">   6749/a> 749     by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    ;" class="line" name="7501">   1750/a> 750     by Bru in94 class="l+code=err     err    ;" class="line" name="75L1">   175/751opyr" class="line" name="75L2">   275 752     by Bru if ( class="l+code=cmdi    cmd     ==  class="l+code=IPC_SET     IPC_SET    ) {" class="line" name="75L3">   375 753     by Bru         if ( class="l+code=c"pydsa_id_from_user     c"pydea_id_from_user    (& class="l+code=ea_id64     ea_id64    ,  class="l+code=bu="    bu=    ,  class="l+code=version     version    ))" class="line" name="75L4">   475 754     by Bru                 hidden"- class="l+code=EFAULT     EFAULT    ;" class="line" name="75L5">   57< 755     by Bru }" class="line" name="75L6">   675 756opyr" class="line" name="7576">   6757/a> 757     by Bru  class="l+code=inep"    inep     =  class="l+code=ipcctl_pre_down     ipcctl_pre_down    ( class="l+code=ns     ns    , & class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ),  class="l+code=ea_idi    ea_id    ,  class="l+code=cmdi    cmd    ," class="line" name="7586">   6758/a> 758     by Bru                        & class="l+code=ea_id64     ea_id64    . class="l+code=sh_sper_     ea_sper_    , 0);" class="line" name="7596">   6759/a> 759     by Bru if ( class="l+code=IS_ERR     IS_ERR    ( class="l+code=inep"    inep    ))" class="line" name="7601">   1760/a> 760     by Bru         hidden" class="l+code=PTR_ERR     PTR_ERR    ( class="l+code=inep"    inep    );" class="line" name="76L1">   176/761opyr" class="line" name="76L2">   276 762     by Bru  class="l+code=shp     eap     =  class="l+code=c"7bainer_o="    c"7bainer_o=    ( class="l+code=inep"    inep    , ly 1994 class="l+code=ea_id_kernel     ea_id_kernel    ,4 class="l+code=sh_sper_     ea_sper_    );" class="line" name="76L3">   376 76Copyr" class="line" name="76L4">   476 764     by Bru  class="l+code=err     err     =  class="l+code=eecuritydea__sh_ctl     eecuritydea__sh_ctl    ( class="l+code=shp     eap    ,4 class="l+code=cmdi    cmd    );" class="line" name="76L5">   576 765     by Bru if ( class="l+code=err     err    )" class="line" name="76L6">   67< 766     by Bru  by Bru goto  class="l+code=ouf_unlock     ouf_unlock    ;" class="line" name="7676">   6767/a> 767     by Bru lwitch ( class="l+code=cmdi    cmd    ) {" class="line" name="7686">   6768/a> 768     by Bru case4 class="l+code=IPC_RMID/a>   6769/a> 769     by Bru          class="l+code=dodea__r_idi    dodea__r_id    ( class="l+code=ns     ns    ,  class="l+code=inep"    inep    );" class="line" name="7701">   1770/a> 770     by Bru         goto  class="l+code=ouf_up"    ouf_up    ;" class="line" name="77L1">   177/771     by Bru case4 class="l+code=IPC_SET     IPC_SET    :" class="line" name="77L2">   277 772     by Bru  by Bru  class="l+code=err     err     =  class="l+code=ine_updgtesper_     ine_updgtesper_    (& class="l+code=ea_id64     ea_id64    . class="l+code=sh_sper_     ea_sper_    ,  class="l+code=inep"    inep    );" class="line" name="77L3">   377 773     by Bru         if ( class="l+code=err     err    )" class="line" name="77L4">   477 774     by Bru                 goto  class="l+code=ouf_unlock     ouf_unlock    ;" class="line" name="77L5">   577 775     by Bru          class="l+code=shp     eap    -ass= class="l+code=ea_scti_     ea_scti_     =  class="l+code=get_sec"7ds     get_sec"7ds    ();" class="line" name="77L6">   677 776     by Bru  by     break;" class="line" name="7776">   6777/a> 777     by Bru defaulf:" class="line" name="7786">   6778/a> 778     by Bru          class="l+code=err     err     = - class="l+code=EINVAL     EINVAL    ;" class="line" name="7796">   6779/a> 779     by Bru }" class="line" name="7801">   1780/a> 780     class="l+code=ouf_unlock     ouf_unlock    :" class="line" name="78L1">   178/781     by Bru  class="l+code=ea_sunlock     ea_sunlock    ( class="l+code=shp     eap    );" class="line" name="78L2">   278 782     class="l+code=ouf_up"    ouf_up    :" class="line" name="78L3">   378 783     by Bru  class="l+code=up_write"    up_write    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="78L4">   478 784     by Bru hidden" class="l+code=err     err    ;" class="line" name="78L5">   578 785    }" class="line" name="78L6">   678 786opyr" class="line" name="7876">   6787/a> 787     class="l+code=SYSCALL_DEFINE3     SYSCALL_DEFINE3    ( class="l+code=sh_ctl     eh_ctl    , in9,  class="l+code=ea_idi    ea_id    , in9,  class="l+code=cmdi    cmd    , ly 1994 class="l+code=ea_id_ds     ea_id_ds      class="l+code=__user     __user     *,  class="l+code=bu="    bu=    )" class="line" name="7886">   6788/a> 788    {" class="line" name="7896">   6789/a> 789     by Bru ly 1994 class="l+code=ea_id_kernel     ea_id_kernel     * class="l+code=shp     eap    ;" class="line" name="7901">   1790/a> 790     by Bru in94 class="l+code=err     err    ,  class="l+code=version     version    ;" class="line" name="79L1">   179/791     by Bru ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    ;" class="line" name="79L2">   279 792    " class="line" name="79L3">   379 793     by Bru if ( class="l+code=cmdi    cmd     &ls= 0 ||  class="l+code=ea_idi    ea_id     &ls= 0) {" class="line" name="79L4">   479 794     by Bru  by Bru  class="l+code=err     err     = - class="l+code=EINVAL     EINVAL    ;" class="line" name="79L5">   579 795     by Bru         goto  class="l+code=ouf"    ouf    ;" class="line" name="79L6">   679 796     by Bru }" class="line" name="7976">   6797/a> 797opyr" class="line" name="7986">   6798/a> 798     by Bru  class="l+code=version     version     =  class="l+code=ine_parse_version     ine_parse_version    (& class="l+code=cmdi    cmd    );" class="line" name="7996">   6799/a> 799     by Bru  class="l+code=ns     ns     =  class="l+code=currr  >    currr      -ass= class="l+code=nsproxy     nsproxy    -ass= class="l+code=ine_"s     ine_"s    ;" class="line" name="8001">   1800/a> 800opyr" class="line" name="8011">   180 801     by Bru lwitch ( class="l+code=cmdi    cmd    ) {  thespan21
2" hiplech with pro" in9erfech ? */ id="L6" class="line" name="80L2">   280 802     by Bru case4 class="l+code=IPC_INFO     IPC_INFO    :" class="line" name="8032">   280 803     by Bru {" class="line" name="8042">   280 804     by Bru  by Bru ly 1994 class="l+code=sa_info6   280 805    " class="line" name="8064">   480 806     by Bru  by Bru  class="l+code=err     err     =  class="l+code=eecuritydea__sh_ctl     eecuritydea__sh_ctl    ( class="l+code=NULL     NULL    ,4 class="l+code=cmdi    cmd    );" class="line" name="8074">   4807/a> 807     by Bru  by Bru if ( class="l+code=err     err    )" class="line" name="8084">   4808/a> 808     by Bru                 hidden" class="l+code=err     err    ;" class="line" name="8094">   4809/a> 809opyr" class="line" name="8L01">   18<0/a> 810     by Bru          class="l+code=memse >    memse     (& class="l+code=ea_info/a>   18< 811     by Bru          class="l+code=sh_info/a>   281 812     by Bru  by Bru  class="l+code=sh_info/a>   281 813     by Bru          class="l+code=ea_info/a>   281 814opyr" class="line" name="8154">   481 815     by Bru          class="l+code=sh_info/a>   481 816     by Bru  by Bru if( class="l+code=c"pydea_info_to_user     c"pydea_info_to_user     ( class="l+code=bu="    bu=    , & class="l+code=ea_info/a>   4817/a> 817     by Bru  by Bru         hidden"- class="l+code=EFAULT     EFAULT    ;" class="line" name="8184">   4818/a> 818    " class="line" name="8194">   4819/a> 819     by Bru          class="l+code=down_hiad     down_hiad    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="8L01">   1820/a> 820     by Bru          class="l+code=err     err     =  class="l+code=ine_get_maxidi    ine_get_maxid    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ));" class="line" name="8LL1">   182/821     by Bru          class="l+code=up_hiad     up_hiad    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="8LL2">   28< 822    " class="line" name="82L3">   382 823     by Bru         if( class="l+code=err     err    &ls=0)" class="line" name="82L4">   482 824     by Bru                  class="l+code=err     err     = 0;" class="line" name="8254">   482 825     by Bru         goto  class="l+code=ouf"    ouf    ;" class="line" name="8264">   482 826     by Bru }" class="line" name="8276">   6827/a> 827     by Bru case4 class="l+code=SHM_INFO     SHM_INFO    :" class="line" name="8284">   4828/a> 828     by Bru {" class="line" name="8L94">   4829/a> 829     by Bru         ly 1994 class="l+code=sa__info/a>   1830/a> 830opyr" class="line" name="83L1">   183/831     by Bru          class="l+code=err     err     =  class="l+code=eecuritydea__sh_ctl     eecuritydea__sh_ctl    ( class="l+code=NULL     NULL    ,4 class="l+code=cmdi    cmd    );" class="line" name="83L2">   283 832     by Bru  by Bru if ( class="l+code=err     err    )" class="line" name="83L3">   38< 833     by Bru                 hidden" class="l+code=err     err    ;" class="line" name="83L4">   483 834opyr" class="line" name="83L5">   583 835     by Bru          class="l+code=memse >    memse     (& class="l+code=ea__info/a>   483 836     by Bru  by Bru  class="l+code=down_hiad     down_hiad    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="8376">   6837/a> 837     by Bru  by Bru  class="l+code=ea__info/a>   4838/a> 838     by Bru          class="l+code=sa_sget_sygt     ea_sget_sygt     ( class="l+code=ns     ns    , & class="l+code=ea_sinfo/a>   4839/a> 839     by Bru          class="l+code=ea_sinfo/a>   1840/a> 840     by Bru          class="l+code=sa_sinfo/a>   184/841     by Bru          class="l+code=sh_sinfo/a>   284 842     by Bru  by Bru  class="l+code=err     err     =  class="l+code=ine_get_maxidi    ine_get_maxid    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ));" class="line" name="84L3">   384 843     by Bru          class="l+code=up_hiad     up_hiad    (& class="l+code=ea_sids     ea_sids    ( class="l+code=ns     ns    ). class="l+code=rw_mutex     rw_mutex i  );" class="line" name="84L4">   48< 844     by Bru         if ( class="l+code=c"pydto_user     c"pydto_user    ( class="l+code=bu="    bu=    , & class="l+code=ea__info/a>   584 845     by Bru         by Bru   class="l+code=err     err     = - class="l+code=EFAULT     EFAULT    ;" class="line" name="84L6">   684 846     by Bru  by Bru  by Bru goto  class="l+code=ouf"    ouf    ;" class="line" name="8476">   6847/a> 847     by Bru  by Bru }" class="line" name="8484">   4848/a> 848    " class="line" name="8496">   6849/a> 849     by Bru          class="l+code=err     err     =  class="l+code=err     err     &ls= 0 ? 0 :" class="l+code=err     err    ;" class="line" name="8501">   1850/a> 850     by Bru         goto  class="l+code=ouf"    ouf    ;" class="line" name="85L1">   185/851     by Bru }" class="line" name="85L2">   285 852     by Bru case4 class="l+code=SHM_STAT     SHM_STAT    :" class="line" name="85L3">   385 853     by Bru case4 class="l+code=IPC_STAT     IPC_STAT    :" class="line" name="85L4">   485 854     by Bru {" class="line" name="85L5">   58< 855     by Bru         ly 1994 class="l+code=sa_id64_ds     ea_id64_ds      class="l+code=tbu="    tbu=    ;" class="line" name="85L6">   685 856     by Bru  by Bru in94 class="l+code=resulf"    resulf    ;" class="line" name="8576">   6857/a> 857opyr" class="line" name="8586">   6858/a> 858     by Bru         if ( class="l+code=cmdi    cmd     ==  class="l+code=SHM_STAT     SHM_STAT    ) {" class="line" name="8596">   6859/a> 859     by Bru                  class="l+code=shp     eap     =  class="l+code=ea__lock     ea_slock    ( class="l+code=ns     ns    ,  class="l+code=sa_idi    ea_id    );" class="line" name="8601">   1860/a> 860     by Bru                 if ( class="l+code=IS_ERR     IS_ERR    ( class="l+code=shp     eap    )) {" class="line" name="86L1">   186/861     by Bru                          class="l+code=err     err     =  class="l+code=PTR_ERR     PTR_ERR    ( class="l+code=shp     eap    );" class="line" name="86L2">   286 862     by Bru  by Bru                 goto  class="l+code=ouf"    ouf    ;" class="line" name="86L3">   386 863     by Bru                 }" class="line" name="86L4">   486 864     by Bru                  class="l+code=resulf"    resulf     =  class="l+code=eap     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=idi    id    ;" class="line" name="86L5">   586 865     by Bru         } else {" class="line" name="86L6">   68< 866     by Bru  by Bru          class="l+code=shp     eap     =  class="l+code=ea__lock_check     ea_slock_check    ( class="l+code=ns     ns    ,  class="l+code=sa_idi    ea_id    );" class="line" name="8676">   6867/a> 867     by Bru  by Bru         if ( class="l+code=IS_ERR     IS_ERR    ( class="l+code=shp     eap    )) {" class="line" name="8686">   6868/a> 868     by Bru                          class="l+code=err     err     =  class="l+code=PTR_ERR     PTR_ERR    ( class="l+code=shp     eap    );" class="line" name="8696">   6869/a> 869     by Bru                         goto  class="l+code=ouf"    ouf    ;" class="line" name="8701">   1870/a> 870     by Bru                 }" class="line" name="87L1">   187/871     by Bru                  class="l+code=resulf"    resulf     = 0;" class="line" name="87L2">   287 872     by Bru  by Bru }" class="line" name="87L3">   387 873     by Bru          class="l+code=err     err     = - class="l+code=EACCES     EACCES    ;" class="line" name="87L4">   487 874     by Bru         if ( class="l+code=ineper_s     ineper_s    ( class="l+code=ns     ns    , & class="l+code=eap     eap    -ass= class="l+code=ea_sper_     ea_sper_    ,  class="l+code=S_IRUGO     S_IRUGO    ))" class="line" name="87L5">   587 875     by Bru                 goto  class="l+code=ouf_unlock     ouf_unlock    ;" class="line" name="87L6">   687 876     by Bru  by      class="l+code=err     err     =  class="l+code=eecuritydea__sh_ctl     eecuritydea__sh_ctl    ( class="l+code=shp     eap    ,4 class="l+code=cmdi    cmd    );" class="line" name="8776">   6877/a> 877     by Bru  by Bru if ( class="l+code=err     err    )" class="line" name="8786">   6878/a> 878     by Bru                 goto  class="l+code=ouf_unlock     ouf_unlock    ;" class="line" name="8796">   6879/a> 879     by Bru          class="l+code=memse >    memse     (& class="l+code=tbu="    tbu=    , 0, lizeof( class="l+code=tbu="    tbu=    ));" class="line" name="8801">   1880/a> 880     by Bru          class="l+code=kerneldto_ine64_per_     kerneldto_ine64_per_    (& class="l+code=eap     eap    -ass= class="l+code=ea_sper_     ea_sper_    , & class="l+code=tbu="    tbu=    . class="l+code=sh_sper_     ea_sper_    );" class="line" name="88L1">   188/881     by Bru          class="l+code=tbu="    tbu=    . class="l+code=sh_ssegsz     sa__eegsz     b=  class="l+code=eap     eap    -ass= class="l+code=ea_ssegsz     sa__eegsz    ;" class="line" name="88L2">   288 882     by Bru  by Bru  class="l+code=tbu="    tbu=    . class="l+code=sh_satime     sh_satime     b=  class="l+code=eap     eap    -ass= class="l+code=ea_sati_     ea_sati_    ;" class="line" name="88L3">   388 883     by Bru          class="l+code=tbu="    tbu=    . class="l+code=sh_sdtime     sh_sdtime     b=  class="l+code=eap     eap    -ass= class="l+code=ea_sdti_     ea_sdti_    ;" class="line" name="88L4">   488 884     by Bru          class="l+code=tbu="    tbu=    . class="l+code=sh_sctime     sh_sctime     b=  class="l+code=eap     eap    -ass= class="l+code=ea_scti_     ea_scti_    ;" class="line" name="88L5">   588 885     by Bru          class="l+code=tbu="    tbu=    . class="l+code=sh_scpidi    ea_scpid     by=  class="l+code=eap     eap    -ass= class="l+code=ea_scpridi    ea_scprid    ;" class="line" name="88L6">   688 886     by Bru  by      class="l+code=tbu="    tbu=    . class="l+code=sh_slpidi    ea_slpid     by=  class="l+code=eap     eap    -ass= class="l+code=ea_slpridi    ea_slprid    ;" class="line" name="8876">   6887/a> 887     by Bru  by Bru  class="l+code=tbu="    tbu=    . class="l+code=sh_snattchi    ea_snattch     =  class="l+code=eap     eap    -ass= class="l+code=ea_snattchi    ea_snattch    ;" class="line" name="8886">   6888/a> 888     by Bru          class="l+code=sa_sunlock     ea_sunlock    ( class="l+code=shp     eap    );" class="line" name="8896">   6889/a> 889     by Bru         if( class="l+code=c"pydsa_id_to_user     c"pydea_id_to_user     ( class="l+code=bu="    bu=    , & class="l+code=tbu="    tbu=    ,  class="l+code=version     version    ))" class="line" name="8901">   1890/a> 890     by Bru                  class="l+code=err     err     = - class="l+code=EFAULT     EFAULT    ;" class="line" name="89L1">   189/891     by Bru         else" class="line" name="89L2">   289 892     by Bru  by Bru          class="l+code=err     err     =  class="l+code=resulf"    resulf    ;" class="line" name="89L3">   389 893     by Bru         goto  class="l+code=ouf"    ouf    ;" class="line" name="89L4">   489 894     by Bru }" class="line" name="89L5">   589 895     by Bru case4 class="l+code=SHM_LOCK     SHM_LOCK    :" class="line" name="89L6">   689 896     by Bru case4 class="l+code=SHM_UNLOCK     SHM_UNLOCK    :" class="line" name="8976">   6897/a> 897     by Bru {" class="line" name="8986">   6898/a> 898     by Bru         ly 1994 class="l+code=file     file     * class="l+code=shm_file     shm_file    ;" class="line" name="8996">   6899/a> 899opyr" class="line" name="9001">   1900/a> 900     by Bru          class="l+code=sap     eap     =  class="l+code=ea__lock_check     ea_slock_check    ( class="l+code=ns     ns    ,  class="l+code=sa_idi    ea_id    );" class="line" name="9011">   190 901     by Bru         if ( class="l+code=IS_ERR     IS_ERR    ( class="l+code=shp     eap    )) {" class="line" name="90L2">   290 902     by Bru  by Bru          class="l+code=err     err     =  class="l+code=PTR_ERR     PTR_ERR    ( class="l+code=shp     eap    );" class="line" name="9032">   290 903     by Bru                 goto  class="l+code=ouf"    ouf    ;" class="line" name="9042">   290 904     by Bru  by Bru }" class="line" name="9052">   290 905    " class="line" name="9064">   490 906     by Bru  by Bru  class="l+code=audit_ine_obj"    audit_ine_obj    (&( class="l+code=shp     eap    -ass= class="l+code=ea_sper_     ea_sper_    ));" class="line" name="9074">   4907/a> 907opyr" class="line" name="9084">   4908/a> 908     by Bru         if (! class="l+code=ns_capable     ns_capable    ( class="l+code=ns     ns    -ass= class="l+code=user_"s     user_"s    ,  class="l+code=CAP_IPC_LOCK     CAP_IPC_LOCK    )) {" class="line" name="9094">   4909/a> 909     by Bru                  class="l+code=kuid_t     kuid_t      class="l+code=euidi    euid     =  class="l+code=currr  _euidi    currr  _euid    ();" class="line" name="9L01">   19<0/a> 910     by Bru                  class="l+code=err     err     = - class="l+code=EPERM     EPERM    ;" class="line" name="9LL1">   19< 911     by Bru                 if (! class="l+code=uid_eq     uid_eq    ( class="l+code=euidi    euid    ,  class="l+code=sap     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=uidi    uid    ) &&" class="line" name="9LL2">   291 912     by Bru  by Bru             ! class="l+code=uid_eq     uid_eq    ( class="l+code=euidi    euid    ,  class="l+code=sap     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=cuidi    cuid    ))" class="line" name="9L32">   291 913     by Bru                         goto  class="l+code=ouf_unlock     ouf_unlock    ;" class="line" name="9L42">   291 914     by Bru                 if ( class="l+code=cmdi    cmd     ==  class="l+code=SHM_LOCK     SHM_LOCK     && ! class="l+code=rlimif"    rlimif    ( class="l+code=RLIMIT_MEMLOCK     RLIMIT_MEMLOCK    ))" class="line" name="9L52">   291 915     by Bru                         goto  class="l+code=ouf_unlock     ouf_unlock    ;" class="line" name="9L64">   491 916     by Bru  by Bru }" class="line" name="9174">   4917/a> 917opyr" class="line" name="9184">   4918/a> 918     by Bru          class="l+code=err     err     =  class="l+code=eecuritydea__sh_ctl     eecuritydea__sh_ctl    ( class="l+code=shp     eap    ,4 class="l+code=cmdi    cmd    );" class="line" name="9194">   4919/a> 919     by Bru         if ( class="l+code=err     err    )" class="line" name="9L01">   1920/a> 920     by Bru                 goto  class="l+code=ouf_unlock     ouf_unlock    ;" class="line" name="9LL1">   192/921opyr" class="line" name="9LL2">   29< 922     by Bru  by Bru  class="l+code=sh__file     shm_file     =  class="l+code=eap     eap    -ass= class="l+code=ea_sfile     shm_file    ;" class="line" name="92L3">   392 923     by Bru         if ( class="l+code=is_file_hugepages     is_file_hugepages    ( class="l+code=sh_sfile     shm_file    ))" class="line" name="92L4">   492 924     by Bru                 goto  class="l+code=ouf_unlock     ouf_unlock    ;" class="line" name="9L52">   292 925    " class="line" name="9264">   492 926     by Bru  by Bru if ( class="l+code=cmdi    cmd     ==  class="l+code=SHM_LOCK     SHM_LOCK    ) {" class="line" name="9276">   6927/a> 927     by Bru  by Bru         ly 1994 class="l+code=user_ly 199     user_ly 199     * class="l+code=user     user     =  class="l+code=currr  _user     currr  _user    ();" class="line" name="9284">   4928/a> 928     by Bru                  class="l+code=err     err     =  class="l+code=ehme__lock     ea_e_slock    ( class="l+code=sh_sfile     shm_file    , 1,4 class="l+code=user     user    );" class="line" name="9294">   4929/a> 929     by Bru          by Bru if (! class="l+code=err     err     && !( class="l+code=shp     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=mode     mode     &  class="l+code=SHM_LOCKED/a>   1930/a> 930     by Bru                          class="l+code=shp     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=mode     mode     |=  class="l+code=SHM_LOCKED/a>   193/931     by Bru                          class="l+code=shp     eap    -ass= class="l+code=mlock_user     mlock_user     =  class="l+code=user     user    ;" class="line" name="93L2">   293 932     by Bru  by Bru         }" class="line" name="93L3">   39< 933     by Bru                 goto  class="l+code=ouf_unlock     ouf_unlock    ;" class="line" name="93L4">   493 934     by Bru  by Bru }" class="line" name="93L5">   593 935    " class="line" name="9364">   493 936     by Bru  by Bru  thespan21
2" SHM_UNLOCK */ id="L6" class="line" name="9376">   6937/a> 937     by Bru  by Bru if (!( class="l+code=shp     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=mode     mode     &  class="l+code=SHM_LOCKED/a>   4938/a> 938     by Bru                 goto  class="l+code=ouf_unlock     ouf_unlock    ;" class="line" name="9394">   4939/a> 939     by Bru          class="l+code=ea_e__lock     ea_e_slock    ( class="l+code=sh_sfile     shm_file    , 0,  class="l+code=sap     eap    -ass= class="l+code=mlock_user     mlock_user    );" class="line" name="9401">   1940/a> 940     by Bru          class="l+code=sap     eap    -ass= class="l+code=ea_sper_     ea_sper_    . class="l+code=mode     mode     &= ~ class="l+code=SHM_LOCKED/a>   194/941     by Bru          class="l+code=shp     eap    -ass= class="l+code=mlock_user     mlock_user     =  class="l+code=NULL     NULL    ;" class="line" name="94L2">   294 942     by Bru  by Bru  class="l+code=get_file     get_file    ( class="l+code=sh_sfile     shm_file    );" class="line" name="94L3">   394 943     by Bru          class="l+code=sa_sunlock     ea_sunlock    ( class="l+code=shp     eap    );" class="line" name="94L4">   49< 944     by Bru          class="l+code=ea_e__unlock_mapping     sh_e__unlock_mapping    ( class="l+code=sh_sfile     shm_file    -ass= class="l+code=f_mapping     f_mapping    );" class="line" name="94L5">   594 945     by Bru          class="l+code=fpuf"    fpuf    ( class="l+code=sh_sfile     shm_file    );" class="line" name="9464">   494 946     by Bru  by Bru goto  class="l+code=ouf"    ouf    ;" class="line" name="9476">   6947/a> 947     by Bru }" class="line" name="9484">   4948/a> 948     by Bru case4 class="l+code=IPC_RMID/a>   6949/a> 949     by Bru case4 class="l+code=IPC_SET     IPC_SET    :" class="line" name="9501">   1950/a> 950     by Bru          class="l+code=err     err     =  class="l+code=ehmctl_down     shmctl_down    ( class="l+code=ns     ns    ,  class="l+code=sa_idi    ea_id    ,  class="l+code=cmdi    cmd    ,  class="l+code=bu="    bu=    ,  class="l+code=version     version    );" class="line" name="95L1">   195/951     by Bru         hidden" class="l+code=err     err    ;" class="line" name="95L2">   295 952     by Bru defaulf:" class="line" name="95L3">   395 953     by Bru         hidden"- class="l+code=EINVAL     EINVAL    ;" class="line" name="95L4">   495 954     by Bru }" class="line" name="95L5">   59< 955    " class="line" name="95L6">   695 956     class="l+code=ouf_unlock     ouf_unlock    :" class="line" name="9576">   6957/a> 957     by Bru  class="l+code=sa_sunlock     ea_sunlock    ( class="l+code=shp     eap    );" class="line" name="9586">   6958/a> 958     class="l+code=ouf"    ouf    :" class="line" name="9596">   6959/a> 959     by Bru hidden" class="l+code=err     err    ;" class="line" name="9601">   1960/a> 960    }" class="line" name="96L1">   196/961opyr" class="line" name="96L2">   296 962     thespan21
2" id="L6" class="line" name="96L3">   396 963     thespan21
 * Fix  naaddr, allocate descriptor, map  na, add attach descriptor to lists. id="L6" class="line" name="96L4">   496 964     thespan21
 * id="L6" class="line" name="96L5">   596 965     thespan21
 * NOTE! Despite the="com, this is NOT a direct system call r  rypoint. The id="L6" class="line" name="96L6">   69< 966     thespan21
 * "raddr" thing points to kernel thech, and there has to be a wrapper around id="L6" class="line" name="9676">   6967/a> 967     thespan21
 * this. id="L6" class="line" name="9686">   6968/a> 968     thespan21
 */ id="L6" class="line" name="9696">   6969/a> 969    long  class="l+code=do_sh_gt     do_sh_gt    (in94 class="l+code=sa_idi    ea_id    , char4 class="l+code=__user     __user     * class="l+code=shmaddri    ea_addr    , in94 class="l+code=sa_flg     sh_flg    ,  class="l+code=ulong     ulong     * class="l+code=raddri    raddr    ," class="line" name="9701">   1970/a> 970     by Bru       unsigned long  class="l+code= nalba     sh_lba    )" class="line" name="97L1">   197/971    {" class="line" name="97L2">   297 972     by Bru ly 1994 class="l+code=sa_id_kerneli    ea_id_kernel     * class="l+code=shp     eap    ;" class="line" name="97L3">   397 973     by Bru unsigned long  class="l+code=addri    addr    ;" class="line" name="97L4">   497 974     by Bru unsigned long  class="l+code= ize     size    ;" class="line" name="97L5">   597 975     by Bru ly 1994 class="l+code=file     file     *4 class="l+code=file     file    ;" class="line" name="97L6">   697 976     by Bru in94    class="l+code=err     err    ;" class="line" name="9776">   6977/a> 977     by Bru unsigned long  class="l+code=flags     flags    ;" class="line" name="9786">   6978/a> 978     by Bru unsigned long  class="l+code=prot     prot    ;" class="line" name="9796">   6979/a> 979     by Bru in94 class="l+code=acc_mode     acc_mode    ;" class="line" name="9801">   1980/a> 980     by Bru ly 1994 class="l+code=ine_"comthech     ine_"comthech     * class="l+code=ns     ns    ;" class="line" name="98L1">   198/981     by Bru ly 1994 class="l+code=sa__file_data     sh__file_data     * class="l+code=sfdi    efd    ;" class="line" name="98L2">   298 982     by Bru ly 1994 class="l+code=pathi    path      class="l+code=pathi    path    ;" class="line" name="98L3">   398 983     by Bru  class="l+code=fmode_t     fmode_t      class="l+code=f_mode     f_mode    ;" class="line" name="98L4">   498 984     by Bru unsigned long  class="l+code=populatei    populate     = 0;" class="line" name="98L5">   598 985    " class="line" name="98L6">   698 986     by Bru  class="l+code=err     err     = - class="l+code=EINVAL     EINVAL    ;" class="line" name="9876">   6987/a> 987     by Bru if ( class="l+code=sa_idi    ea_id     &ls= 0)" class="line" name="9886">   6988/a> 988     by Bru         goto  class="l+code=ouf"    ouf    ;" class="line" name="9896">   6989/a> 989     by Bru else if (( class="l+code=addri    addr     = ( class="l+code=ulong     ulong    ) class="l+code=shmaddri    ea_addr    )) {" class="line" name="9901">   1990/a> 990     by Bru         if ( class="l+code=addri    addr     & ( class="l+code=sa_lba     sh_lba     - 1)) {" class="line" name="99L1">   199/991     by Bru          by Bru if ( class="l+code=sa_flg     sh_flg     &  class="l+code=SHM_RND/a>   299 992     by Bru  by Bru          by Bru  class="l+code=addri    addr     &= ~( class="l+code=sa_lba     sh_lba     - 1); Bru  thespan21
2" round down */ id="L6" class="line" name="99L3">   399 993     by Bru          by Bru else" class="line" name="99L4">   499 994    #ifndef4 class="l+code=__ARCH_FORCE_SHMLBA     __ARCH_FORCE_SHMLBA    " class="line" name="99L5">   599 995     by Bru          by Bru         if ( class="l+code=addri    addr     & ~ class="l+code=PAGE_MASK     PAGE_MASK    )" class="line" name="99L6">   699 996    #endif" class="line" name="9976">   6997/a> 997     by Bru  by Bru                         goto  class="l+code=ouf"    ouf    ;" class="line" name="9986">   6998/a> 998     by Bru         }" class="line" name="9996">   6999/a> 999     by Bru          class="l+code=flags     flags     =  class="l+code=MAP_SHARED/a>   110001">   7b/35/02af7e13e6908028bba9968d799b60c53272_3/10001> class="line" name="10011">   1100   1100   1100   1100   1100   1100   11007/a>   11008/a>   11009/a>   110<0/a>   110<   1101   1101   1101   1101   1101   11017/a>   11018/a>   11019/a>   11020/a>   1102   110<annot rely on the=fs check since SYSV IPC does have an id="L6" class="line" name="10231">   1102   1102   1102   1102   11027/a>   11028/a>   11029/a>   11030/a>   1103   1103   110<   1103   1103   1103   11037/a>   11038/a>   11039/a>   11040/a>   1104    path_ge     (& class="l+code=pathi    path    );" class="line" name="10421">   1104   1104   110<   1104   1104   11047/a>   11048/a>   11049/a>   11050/a>   1105   1105   1105   1105   110<   1105   11057/a>   11058/a>   11059/a>   11060/a>   1106   1106ns    );" class="line" name="10631">   1106   1106   1106   110<   11067/a>   11068/a>   11069/a>   11070/a>   1107   1107   1107   1107   1107   1107   11077/a>   11078/a>   11079/a>   11080/a>   1108   1108   1108   1108   1108   1108   11087/a>   11088/a>   11089/a>   11090/a>   1109   1109   1109   1109   1109   1109   11097/a>   11098/a>   11099/a>   111001">   1110   1110   1110   1110   1110   1110   11107/a>   11108/a>   11109/a>