Received: by 10.192.165.148 with SMTP id m20csp945925imm; Sat, 5 May 2018 01:30:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpwuUYYkqYy5UYDk7aY+6hWjVKSjsSiekLeV8SuLpo0dFbf7rK7KjSXTpor5ClHew14yYCy X-Received: by 2002:a63:9557:: with SMTP id t23-v6mr24181405pgn.77.1525509018502; Sat, 05 May 2018 01:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525509018; cv=none; d=google.com; s=arc-20160816; b=rRQiWcyEVXuG5DCzgc3ci8rQlMAVvCbtjk/llkCt0uzbk5wKGn+Yhgbxne0PGrrFin CjPEKQjfOuVHXbs+7H3IIw9oIGU4mRcNeLvJWFL4DMgm5SLZUFDy8fhEjGkLQFMmumBl 8zXe+lO7MvfbV3STbHlCew3PIfPO8LVNlA9KmG00h6ELv5LU30poyzXpLaSMNCjzPzZe UcdEhlMkZ1nLfAG0KxteaOuAC9AtvkSf3ZA+iiMVoCHC1owHhfpD4COoICeEcqO6rkN8 PTW74ruhwXent63SaTitRFSb42gxsDiBA6WjiI7xhfUacdplL0Cjn0NpNEPB+vbXFhSx 9uLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=OUeoyRaKVyn3Fm8A7/2mpeX5Xn9cJ74fLkt6JMMxCBQ=; b=hHnuyhF5B8XFDi5WXRp3Q/UlzAGC0u8lvwTxwBNY2tSxyjXGiTfK74hrM55lB/OhJO e2DR3eabCplowF2afyKSG7JtqllxkkToZPK+01DGQ9RbS4WPLFGO7tnIGqn0MbVUR2VR gfJm/clUCa0vX/snuUTJlMexze/8cWEQXkw8uCHzXGsdVQ1IdewiHttLRJ0qJS8svhT+ KXyFpEZnSoopQvuCYDO+6g3Kd5i+0snNZ5UHorglAbK+9OVDtb8nxthZLcki2/TpOkVg v8ul9FXnpQUVVJLijFuIFyc4RUWCXTo8TFPShlARNyoKAKjZ2T9SXo3kk0lp32D7zVxL F9uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=lf09Gvci; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x124-v6si14827900pgb.651.2018.05.05.01.30.01; Sat, 05 May 2018 01:30:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=lf09Gvci; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751096AbeEEI3y (ORCPT + 99 others); Sat, 5 May 2018 04:29:54 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:52566 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750802AbeEEI3w (ORCPT ); Sat, 5 May 2018 04:29:52 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w458Q1L5037015; Sat, 5 May 2018 08:29:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=OUeoyRaKVyn3Fm8A7/2mpeX5Xn9cJ74fLkt6JMMxCBQ=; b=lf09Gvciftsj0QRPfbeM1BgddPZTEbcasOHoJblcu49R2Y27Cn1TvE+aDt3qayyKYv1I r0GeIyX0o5nxw0hEXE+jlzUjlbtSL7Svyyx/2Lt3WpgdBMF/uY936Hg9a/d8WLvv2MaD WaOAP6HGxC2qrCi2vy8f7eBZaoJAXBqARTopPXx1VWz/inWKxZt0yYQPIJKfyQ1HPQ2S m4HsMTcUnHEkO0iof0XFLyblafeYxeWcKQ868zYBygJyTSzFIbwmb8g9WhtnN+6kviQI Zfq0GZxMg61aoSKLuIFaN6GR4nByCYGUitF6RpP+3uCB9/2Q90rqTz+vF06j2vdTft9R Og== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2hs24s8brj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 05 May 2018 08:29:25 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w458TNOU030646 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 5 May 2018 08:29:23 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w458TMla025877; Sat, 5 May 2018 08:29:22 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 05 May 2018 01:29:21 -0700 Date: Sat, 5 May 2018 11:29:13 +0300 From: Dan Carpenter To: Kangjie Lu Cc: "Dilger, Andreas" , Wenwen Wang , "open list:STAGING SUBSYSTEM" , Aastha Gupta , Roman Storozhenko , Jeff Layton , Greg Kroah-Hartman , NeilBrown , open list , "Drokin, Oleg" , "moderated list:STAGING - LUSTRE PARALLEL FILESYSTEM" Subject: Re: [PATCH v2] staging: lustre: llite: fix potential missing-check bug when copying lumv Message-ID: <20180505082912.r4a6tawjv7ykedc7@mwanda> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8883 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=672 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805050079 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 04, 2018 at 10:01:44AM -0500, Kangjie Lu wrote: > > There is nothing preventing the user from using struct lov_mds_md_v3 but > > filling in lmm_magic = LOV_MAGIC_V1 from the beginning, no need for a race. > > > > Right. No need for users to race. There might be a type confusion issue > though if V1 > object is used as V3 or the other way. > It's a bit confusing for someone reading the code, but in terms of the kernel it's straightforward. It's like if someone is typing with their toes, that's sort of confusing but it's not a security issue. And here we're implementing a no typing with your toes policy just to make things more higienic (static checkers in this metaphor). regards, dan carpenter