| .. | .. |
|---|
| 71 | 71 | } |
|---|
| 72 | 72 | |
|---|
| 73 | 73 | /* |
|---|
| 74 | | - * Handle decode buffer overflows out-of-line. |
|---|
| 75 | | - */ |
|---|
| 76 | | -static void print_overflow_msg(const char *func, const struct xdr_stream *xdr) |
|---|
| 77 | | -{ |
|---|
| 78 | | - dprintk("lockd: %s prematurely hit the end of our receive buffer. " |
|---|
| 79 | | - "Remaining buffer length is %tu words.\n", |
|---|
| 80 | | - func, xdr->end - xdr->p); |
|---|
| 81 | | -} |
|---|
| 82 | | - |
|---|
| 83 | | - |
|---|
| 84 | | -/* |
|---|
| 85 | 74 | * Encode/decode NLMv3 basic data types |
|---|
| 86 | 75 | * |
|---|
| 87 | 76 | * Basic NLMv3 data types are not defined in an IETF standards |
|---|
| .. | .. |
|---|
| 173 | 162 | dprintk("NFS: returned cookie was too long: %u\n", length); |
|---|
| 174 | 163 | return -EIO; |
|---|
| 175 | 164 | out_overflow: |
|---|
| 176 | | - print_overflow_msg(__func__, xdr); |
|---|
| 177 | 165 | return -EIO; |
|---|
| 178 | 166 | } |
|---|
| 179 | 167 | |
|---|
| .. | .. |
|---|
| 231 | 219 | __func__, be32_to_cpup(p)); |
|---|
| 232 | 220 | return -EIO; |
|---|
| 233 | 221 | out_overflow: |
|---|
| 234 | | - print_overflow_msg(__func__, xdr); |
|---|
| 235 | 222 | return -EIO; |
|---|
| 236 | 223 | } |
|---|
| 237 | 224 | |
|---|
| .. | .. |
|---|
| 303 | 290 | out: |
|---|
| 304 | 291 | return error; |
|---|
| 305 | 292 | out_overflow: |
|---|
| 306 | | - print_overflow_msg(__func__, xdr); |
|---|
| 307 | 293 | return -EIO; |
|---|
| 308 | 294 | } |
|---|
| 309 | 295 | |
|---|