소스 검색

ipmi: fasync BKL pushdown

This driver really needs it to avoid races against open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Jonathan Corbet 17 년 전
부모
커밋
70b028b7ea
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      drivers/char/ipmi/ipmi_devintf.c

+ 2 - 0
drivers/char/ipmi/ipmi_devintf.c

@@ -101,7 +101,9 @@ static int ipmi_fasync(int fd, struct file *file, int on)
 	struct ipmi_file_private *priv = file->private_data;
 	int                      result;
 
+	lock_kernel(); /* could race against open() otherwise */
 	result = fasync_helper(fd, file, on, &priv->fasync_queue);
+	unlock_kernel();
 
 	return (result);
 }