Skip to content

Commit dc0dec4

Browse files
committed
Fix the issue brought by the commit 9c04b03
This commit remove the fastsocket check in the filp_close. It is right in the normal case. When the process is killed by kernel, the close system call is not injected by fastsocket. So the fast socket still reach the filp_close. It is unexpected.
1 parent 268bdaa commit dc0dec4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

kernel/fs/open.c

+8
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,14 @@ int filp_close(struct file *filp, fl_owner_t id)
979979
return 0;
980980
}
981981

982+
/*
983+
When the process is killed by kernel, the close call will not be injected by fastsocket.
984+
As a result, the fast socket will reach here. So we need to check if it is the fast socket.
985+
*/
986+
if (filp->f_mode & FMODE_FASTSOCKET && filp->f_op && filp->f_op->release) {
987+
return filp->f_op->release(NULL, filp);
988+
}
989+
982990
if (filp->f_op && filp->f_op->flush)
983991
retval = filp->f_op->flush(filp, id);
984992

0 commit comments

Comments
 (0)