All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 7/7] mkquota: Fix potental NULL pointer dereference
Date: Wed, 11 Aug 2021 19:32:55 +0200	[thread overview]
Message-ID: <20210811173255.4efoabz73vj4wz2y@work> (raw)
In-Reply-To: <YRKmIDH8XWBwGXAT@mit.edu>

On Tue, Aug 10, 2021 at 12:15:28PM -0400, Theodore Ts'o wrote:
> On Fri, Aug 06, 2021 at 11:58:20AM +0200, Lukas Czerner wrote:
> > get_dq() function can fail when the memory allocation fails and so we
> > could end up dereferencing NULL pointer. Fix it.
> > 
> > Also, we should really return -ENOMEM instead of -1, or even 0 from
> > various functions in quotaio_tree.c when memory allocation fails.
> > Fix it as well.
> 
> The quota*.c files were taking from the quota_tools package, and are
> currently using the converion of setting errno and returning -1.  I
> don't think an incomplete conversion to the kernel error return
> convention is the way to go.  My long term plan for the quota
> functions in libsupport is to convert them to use the comerr_t error
> return convention, remove all of the printf functions from the
> functions, so they can be properly moved into libext2fs library as a
> first class supported library functions, and so that the high-level
> ext2fs functions would update the quota files --- so that programs
> like fuse2fs would properly update the quota records.
> 
> So I'm going to drop the error handling changes from this patch before
> applying it.

Understood, thanks!

-Lukas

> 
> Cheers,
> 
> 					- Ted
> 


  reply	other threads:[~2021-08-11 17:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06  9:58 [PATCH 1/7] e2fsck: value stored to err is never read Lukas Czerner
2021-08-06  9:58 ` [PATCH 2/7] ext2fs: initialize retval before using it Lukas Czerner
2021-08-10 14:59   ` Theodore Ts'o
2021-08-06  9:58 ` [PATCH 3/7] e2fsprogs: fix unexpected NULL variable Lukas Czerner
2021-08-10 15:01   ` Theodore Ts'o
2021-08-06  9:58 ` [PATCH 4/7] e2fsprogs: remove augmented rbtree functionality Lukas Czerner
2021-08-10 15:01   ` Theodore Ts'o
2021-08-06  9:58 ` [PATCH 5/7] libss: handle memory allcation failure in ss_help() Lukas Czerner
2021-08-10 15:03   ` Theodore Ts'o
2021-08-06  9:58 ` [PATCH 6/7] libss: Add missing error handling for fdopen() Lukas Czerner
2021-08-10 15:03   ` Theodore Ts'o
2021-08-06  9:58 ` [PATCH 7/7] mkquota: Fix potental NULL pointer dereference Lukas Czerner
2021-08-10 16:15   ` Theodore Ts'o
2021-08-11 17:32     ` Lukas Czerner [this message]
2021-08-10 14:58 ` [PATCH 1/7] e2fsck: value stored to err is never read Theodore Ts'o
2021-08-11 17:33   ` Lukas Czerner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210811173255.4efoabz73vj4wz2y@work \
    --to=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.