--- 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;