From patchwork Mon Dec 17 22:46:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Michal_Such=C3=A1nek?= X-Patchwork-Id: 10734405 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E39E51399 for ; Mon, 17 Dec 2018 22:46:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6FED29B81 for ; Mon, 17 Dec 2018 22:46:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA2FC29FA9; Mon, 17 Dec 2018 22:46:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD69029B81 for ; Mon, 17 Dec 2018 22:46:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732099AbeLQWqt (ORCPT ); Mon, 17 Dec 2018 17:46:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:60884 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727909AbeLQWqt (ORCPT ); Mon, 17 Dec 2018 17:46:49 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 72B7EB018; Mon, 17 Dec 2018 22:46:47 +0000 (UTC) From: Michal Suchanek To: linux-modules@vger.kernel.org Cc: Lucas De Marchi , Jean Delvare , Michal Suchanek Subject: [PATCH v3 0/3] Fix dependency file corruption with parallel depmod invocation Date: Mon, 17 Dec 2018 23:46:26 +0100 Message-Id: <20181217224629.22687-1-msuchanek@suse.de> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181207154557.5865-1-msuchanek@suse.de> References: <20181207154557.5865-1-msuchanek@suse.de> MIME-Version: 1.0 Sender: owner-linux-modules@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The files produced by depmod may be corrupted if multiple depmod processes running in parallel try to update them. Since there is nothing stopping the user running depmod in parallel this looks like a bug in depmod. v3: - remove superfluous whitespace, open flag, and duplicate nul termination v2: - split into separate patches, add gcc warning fix Michal Suchanek (3): depmod: prevent module dependency files missing during depmod invocation. depmod: prevent module dependency files corruption due to parallel invocation. depmod: shut up gcc insufficinet buffer warning. tools/depmod.c | 61 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 19 deletions(-)