Print this page
asdf

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/klm/nlm_service.c
          +++ new/usr/src/uts/common/klm/nlm_service.c
↓ open down ↓ 124 lines elided ↑ open up ↑
 125  125  nlm_init_flock(struct flock64 *fl, struct nlm4_lock *nl,
 126  126          struct nlm_host *host, rpcvers_t vers, short type)
 127  127  {
 128  128          uint64_t off, len;
 129  129  
 130  130          bzero(fl, sizeof (*fl));
 131  131          off = nl->l_offset;
 132  132          len = nl->l_len;
 133  133  
 134  134          if (vers < NLM4_VERS) {
 135      -                /*
 136      -                 * Make sure range is valid for 32-bit client.
 137      -                 * Also allow len == ~0 to mean lock to EOF,
 138      -                 * which is supposed to be l_len == 0.
 139      -                 */
 140      -                if (len == MAX_UOFF32)
 141      -                        len = 0;
 142  135                  if (off > MAX_UOFF32 || len > MAX_UOFF32)
 143  136                          return (EINVAL);
 144  137                  if (off + len > MAX_UOFF32 + 1)
 145  138                          return (EINVAL);
 146  139          } else {
 147  140                  /*
 148  141                   * Check range for 64-bit client (no overflow).
 149  142                   * Again allow len == ~0 to mean lock to EOF.
 150  143                   */
 151  144                  if (len == MAX_U_OFFSET_T)
↓ open down ↓ 1079 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX