Also in 2.4.7, 2.4.9, 2.4.9-ac4, 2.4.9-ac6.
fs/locks.c, line 693:
---- int locks_mandatory_area(int read_write, struct inode *inode, struct file *filp, loff_t offset, size_t count) { struct file_lock *fl; struct file_lock *new_fl = locks_alloc_lock(0); int error;new_fl->fl_owner = current->files; [...] ----
No check on whether locks_alloc_lock() succeeds. Or do I miss something?
Patch follows:
--- fs/locks.c Fri Sep 7 23:06:49 2001 +++ fs/locks.c.new Sat Sep 8 01:03:50 2001 @@ -698,6 +698,9 @@ struct file_lock *new_fl = locks_alloc_lock(0); int error;
+ if (new_fl == NULL) + return -ENOMEM; + new_fl->fl_owner = current->files; new_fl->fl_pid = current->pid; new_fl->fl_file = filp;
-- Francis Galiegue, fg@mandrakesoft.com - Normand et fier de l'�tre "Programming is a race between programmers, who try and make more and more idiot-proof software, and universe, which produces more and more remarkable idiots. Until now, universe leads the race" -- R. Cook
This archive was generated by hypermail 2b29 : Sat Sep 15 2001 - 21:00:13 EST