From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D14C6C43387 for ; Thu, 20 Dec 2018 10:33:34 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B4A821720 for ; Thu, 20 Dec 2018 10:33:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=yandex.com header.i=@yandex.com header.b="YDgRxRpf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B4A821720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=yandex.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1gZvdk-0000KD-Op; Thu, 20 Dec 2018 05:33:16 -0500 Received: from forward105j.mail.yandex.net ([5.45.198.248]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gZvdi-0000K7-JV for kernelnewbies@kernelnewbies.org; Thu, 20 Dec 2018 05:33:14 -0500 Received: from mxback6j.mail.yandex.net (mxback6j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10f]) by forward105j.mail.yandex.net (Yandex) with ESMTP id BD2D12E045D for ; Thu, 20 Dec 2018 13:33:09 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback6j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 4qJA3NB7k4-X9S8V2Nj; Thu, 20 Dec 2018 13:33:09 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1545301989; bh=VEWXPGJpHdtuSTzZUKs+cDun09or2l2CGA5d8uUI/Zs=; h=From:To:Subject:Date:Message-Id; b=YDgRxRpfN9fJi16Waf3R+IG8c1MfBuB6XzxlH2StejTx5HF59j8yOdrcPT6ST5D8P u+i/PqhaFtyWnutwhytfcVvHzOKVkHSxC8i8GqMQZPTf1hQKZTi0zncxx/6ENYq839 clEr03cCs1voed0DmeaVsPhBqTTClDLQVq7Xhznk= Authentication-Results: mxback6j.mail.yandex.net; dkim=pass header.i=@yandex.com Received: by sas2-9bd6ba081e5d.qloud-c.yandex.net with HTTP; Thu, 20 Dec 2018 13:33:09 +0300 From: Lev Olshvang To: kernelnewbies Subject: In a process context kernel_read returns -EINTR, how to proceed? MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Thu, 20 Dec 2018 13:33:09 +0300 Message-Id: <92921545301989@sas2-9bd6ba081e5d.qloud-c.yandex.net> X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org Hi All, I use kernel_read to read file in chunks of 4K size in a process context On several files, like libc, libm, I got -EINTR error. Then I repeated the attempt limited number of times but still on every read attempt I got -EINTR I do not understand who may interrupt such a small read, I suppose these libraries are already mapped in other processes so no real I/O should be done. In a user space it is recommended to repeat syscall, what is the proper course of action in kernel. As I stated, this code is not in a kernel thread or atomic context, it is in a process context so a tried before next attempt yield() but to no success. Waiting for your advises. Thx, Lev _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies