From: Alex Davis Subject: Possible coding issue in udf?? Date: Fri, 13 May 2011 19:57:20 -0700 (PDT) Message-ID: <367853.39582.qm@web130121.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Return-path: Received: from nm21.bullet.mail.ne1.yahoo.com ([98.138.90.84]:26753 "HELO nm21.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757120Ab1ENC5V (ORCPT ); Fri, 13 May 2011 22:57:21 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: In fs/udf/inode.c, line 1455, linux 2.6.35, there is the following code: udfperms = ((inode->i_mode & S_IRWXO)) | ((inode->i_mode & S_IRWXG) << 2) | ((inode->i_mode & S_IRWXU) << 4); Shouldn't we be shifting by 3 bits? i.e: udfperms = ((inode->i_mode & S_IRWXO)) | ((inode->i_mode & S_IRWXG) << 3) | ((inode->i_mode & S_IRWXU) << 6); The S_I.. constants are all defined in include/linux/stat.h as 3-bit values. I will send a patch if needed. I code, therefore I am