From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756637Ab2JISw1 (ORCPT ); Tue, 9 Oct 2012 14:52:27 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:51408 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332Ab2JISwY (ORCPT ); Tue, 9 Oct 2012 14:52:24 -0400 Message-ID: <5074725F.6090804@gmail.com> Date: Tue, 09 Oct 2012 14:52:15 -0400 From: Sasha Levin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120913 Thunderbird/15.0.1 MIME-Version: 1.0 To: Aristeu Rozanski CC: Tejun Heo , dan.carpenter@oracle.com, fengguang.wu@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] xattr: prevent NULL ptr deref warnings in __simple_xattr_set References: <1347651354-16289-1-git-send-email-levinsasha928@gmail.com> <1347651354-16289-2-git-send-email-levinsasha928@gmail.com> <20120914205434.GS17747@google.com> <20120914205555.GT17747@google.com> <20120914205849.GS19694@redhat.com> In-Reply-To: <20120914205849.GS19694@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/14/2012 04:58 PM, Aristeu Rozanski wrote: > On Fri, Sep 14, 2012 at 01:55:55PM -0700, Tejun Heo wrote: >> On Fri, Sep 14, 2012 at 01:54:34PM -0700, Tejun Heo wrote: >>> On Fri, Sep 14, 2012 at 09:35:54PM +0200, Sasha Levin wrote: >>>> Prevent warnings generated by smatch due to unchecked dereference of >>>> 'new_xattr' in __simple_xattr_set(). >>> >>> Isn't this an actual bug w/ or w/o smatch? Remove request (NULL >>> @value) w/o XATTR_REPLACE for an non-existent node would end up >>> calling list_add() on NULL, right? If so, please collapse these two >>> patches and mention the actual bug instead of smatch warning. >> >> And can somebody please make that function less confusing? - >> restructuring / commenting whatever. It's doing something simple. >> It's not supposed to be this confusing. > > I'll work on that. > As it's still happening in linux-next, should I send a simple patch to fix it along with Tejun's comments? Or is the rewrite of __simple_xattr_set() behind the corner? Thanks, Sasha