Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp436436ybg; Wed, 10 Jun 2020 04:51:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxNMtDSnsn+wETUIGV2jIvl+gxsYpqH9dssmPpE83LgxTHf7Glxn6SfpJ6shk4QfKOlYzX X-Received: by 2002:a17:906:d0d7:: with SMTP id bq23mr3068025ejb.259.1591789895981; Wed, 10 Jun 2020 04:51:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591789895; cv=none; d=google.com; s=arc-20160816; b=XBcRz6lgnwJwIYznIeV5tBr88INfy5iNk4VHgkyLeNu8l84HGF/l9Mogs2bEQfdy1V 12W2YCTaG4un6k2pedu01J49mxPd0xUR7z38xyrNUfYtjhDYD1CHA+2kzyCYT3+opI8Y 5d70oAzLl8gLu8xHhW5RNullX0XTRd6H9nv362T7delrayYo/xYs6BZOoRZc+5XjSY0v booI7RSnx/opuJ6IeC8bAmXN//aIEgB8gtUf6jZ3ckvuhZRH+8rVe3H/Qi7ZWkDfhhDT pMoaA7TOikBmNeQ0Zw4vHjF6FL7Kt75I4zuOpAQBd9iBQ9u4phOtZv/tgLkseTqW7TOS 5WhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=MTOFmZu3bBcNCq6VU6XJ1QeiNoapGZuHnpb3vCgvcJo=; b=pc95zwO6CIMrJlEJR+a5gfqDmWyzPW1iTyKVXD2THHB0Q/M8M7WJvVIpyvcKizjxpl 4QqelFsggkyHdvAjN8ReeBDYAIMhuQoHnBSjw8T3YjZO0MaCUtltanGUh+rI0L6dw18s xxHKcmYSEk1pZMSABVKR/xBvlntbOTvLspwFgnjGxbrdtKv6BYH4oezINkpCazMZVCRn bwuBd5KEa0I3d/FviB8vcDd4LRIaGOVUMOMqFqc3H8mM3KcuL96NqatKZCmGIc+rUcRf 0tkRLqJdWag1VsLGF6UXuC8Zie+HSYOezyyChzYTTzB/3mFCgWZaIYvX8YvKqGvYEqh9 7kRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r25si12000465edm.609.2020.06.10.04.51.12; Wed, 10 Jun 2020 04:51:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728636AbgFJLsy (ORCPT + 99 others); Wed, 10 Jun 2020 07:48:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:35534 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728468AbgFJLsx (ORCPT ); Wed, 10 Jun 2020 07:48:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D0839AE63; Wed, 10 Jun 2020 11:48:55 +0000 (UTC) From: Jiri Slaby To: tglx@linutronix.de Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby , Brian Gerst , Dominik Brodowski Subject: [PATCH] syscalls: fix offset type of ksys_ftruncate Date: Wed, 10 Jun 2020 13:48:51 +0200 Message-Id: <20200610114851.28549-1-jslaby@suse.cz> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After the commit below, truncate on i586 uses ksys_ftruncate. But ksys_ftruncate truncates the offset to unsigned long. So switch the type of offset to loff_t which is what the lower do_sys_ftruncate expects. Signed-off-by: Jiri Slaby Fixes: 121b32a58a3a (x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments) Cc: Brian Gerst Cc: Thomas Gleixner Cc: Dominik Brodowski --- include/linux/syscalls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 63ffa6dc9da3..e97ca179d0dc 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -1370,7 +1370,7 @@ static inline long ksys_lchown(const char __user *filename, uid_t user, extern long do_sys_ftruncate(unsigned int fd, loff_t length, int small); -static inline long ksys_ftruncate(unsigned int fd, unsigned long length) +static inline long ksys_ftruncate(unsigned int fd, loff_t length) { return do_sys_ftruncate(fd, length, 1); } -- 2.27.0