mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vasily Averin <vvs@virtuozzo.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Andrey Ryabinin <aryabinin@virtuozzo.com>
Subject: Re: [PATCH] fuse: BUG_ON's correction in fuse_dev_splice_write()
Date: Mon, 19 Aug 2019 09:52:47 +0300	[thread overview]
Message-ID: <5cb431ed-5fba-0223-2d4f-64efd36c1c24@virtuozzo.com> (raw)
In-Reply-To: <CAJfpegv-EQhvJUB0AUhJ=Xx8moHHQvkDGe-yUXHENyWvboBU3A@mail.gmail.com>

On 8/1/19 2:01 PM, Miklos Szeredi wrote:
> On Tue, Jul 23, 2019 at 8:33 AM Vasily Averin <vvs@virtuozzo.com> wrote:
>>
>> commit 963545357202 ("fuse: reduce allocation size for splice_write")
>> changed size of bufs array, so first BUG_ON should be corrected too.
>> Second BUG_ON become useless, first one also includes the second check:
>> any unsigned nbuf value cannot be less than 0.
> 
> This patch seems broken: it assumes that pipe->nrbufs doesn't change.
> Have you actually tested it?

You're right, I've missed it.
I've prepared second patch version which fixes first BUG_ON only.
checkpatch.pl also advises to replace BUG_ONs to WARN_ONs and 'unsigned' to 'unsigned int'
however I'm don't understand what it's better here:
- keep all as is, 
- or merge all changes together,
- or do it in separate patches,
- or do something else?

I believe it makes sense to remove BUG_ONs in separate patch, or may be merge it with current one,
but I do not like an idea to fight against bare 'unsigned' in fuse.

Could you please comment it?

Thank you,
	Vasily Averin



  reply	other threads:[~2019-08-19  6:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23  6:33 Vasily Averin
2019-08-01 11:01 ` Miklos Szeredi
2019-08-19  6:52   ` Vasily Averin [this message]
2019-08-19  6:53   ` [PATCH] fuse: BUG_ON " Vasily Averin
2019-10-03  8:04     ` Miklos Szeredi

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=5cb431ed-5fba-0223-2d4f-64efd36c1c24@virtuozzo.com \
    --to=vvs@virtuozzo.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®