|
Lines 619-624
Link Here
|
| 619 |
return error; |
619 |
return error; |
| 620 |
} |
620 |
} |
| 621 |
|
621 |
|
|
|
622 |
#define MAX_EVENTS (INT_MAX / sizeof(struct epoll_event)) |
| 622 |
|
623 |
|
| 623 |
/* |
624 |
/* |
| 624 |
* Implement the event wait interface for the eventpoll file. It is the kernel |
625 |
* Implement the event wait interface for the eventpoll file. It is the kernel |
|
Lines 635-641
Link Here
|
| 635 |
current, epfd, events, maxevents, timeout)); |
636 |
current, epfd, events, maxevents, timeout)); |
| 636 |
|
637 |
|
| 637 |
/* The maximum number of event must be greater than zero */ |
638 |
/* The maximum number of event must be greater than zero */ |
| 638 |
if (maxevents <= 0) |
639 |
if (maxevents <= 0 || maxevents > MAX_EVENTS) |
| 639 |
return -EINVAL; |
640 |
return -EINVAL; |
| 640 |
|
641 |
|
| 641 |
/* Verify that the area passed by the user is writeable */ |
642 |
/* Verify that the area passed by the user is writeable */ |
| 642 |
---- End forwarded message ----- |
|
|
| 643 |
- |
| 644 |
- |
| 645 |
"Have you noticed the way people's intelligence capabilities decline |
643 |
"Have you noticed the way people's intelligence capabilities decline |
| 646 |
sharply the minute they start waving guns around?" |
644 |
sharply the minute they start waving guns around?" |
| 647 |
-- Dr. Who |
645 |
-- Dr. Who |