Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760200Ab1EORPz (ORCPT ); Sun, 15 May 2011 13:15:55 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:59220 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752020Ab1EORPx (ORCPT ); Sun, 15 May 2011 13:15:53 -0400 From: Andreas Schwab To: Andi Kleen Cc: Alex Davis , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: Possible coding issue in udf?? References: <367853.39582.qm@web130121.mail.mud.yahoo.com> X-Yow: A KAISER ROLL?! What good is a Kaiser Roll without a little COLE SLAW on the SIDE? Date: Sun, 15 May 2011 19:15:50 +0200 In-Reply-To: (Andi Kleen's message of "Sun, 15 May 2011 08:14:02 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1243 Lines: 36 Andi Kleen writes: > Alex Davis writes: > >> 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 would suggest you test it first. Put in a UDF disk that triggers > this case (verify with a printk). Check in ls -l if the > permissions are correct or wrong. That's the write part of UDF, so a read-only test won't trigger. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/