lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 4 Jun 2019 19:24:10 +0200
From:   Bjørn Forsman <bjorn.forsman@...il.com>
To:     Coly Li <colyli@...e.de>
Cc:     Kent Overstreet <kent.overstreet@...il.com>,
        linux-bcache@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: bcache: oops when writing to writeback_percent without a cache device

On Tue, 4 Jun 2019 at 17:41, Coly Li <colyli@...e.de> wrote:
>
> On 2019/6/4 10:59 下午, Coly Li wrote:
> > On 2019/6/4 7:00 下午, Bjørn Forsman wrote:
> >> Hi all,
> >>
> >> I get a kernel oops from bcache when writing to
> >> /sys/block/bcache0/bcache/writeback_percent and there is no attached
> >> cache device. See the oops itself below my signature.
> >>
> >> This is on Linux 4.19.46. I looked in git and see many commits to
> >> bcache lately, but none seem to address this particular issue.
> >>
> >> Background: I'm writing to .../writeback_percent with
> >> systemd-tmpfiles. I'd rather not replace it with a script that figures
> >> out whether or not the kernel will oops if writing to the sysfs file
> >> -- the kernel should not oops in the first place.
> >
> > Hi Bjorn,
> >
> > Thank you for the reporting. I believe this is a case we missed in
> > testings. When a bcache device is not attached, it does not make sense
> > to update the writeback rate in period by the changing of writeback_percent.
> >
> > I will post a patch for your testing soon.
>
> Hi Bjorn,
>
> Could you please to try this patch ? Hope it may help a bit.

Hi Coly,

Thanks for the quick patch! I tested it on linux 5.2-rc2 and it indeed
fixes the problem.

There is one typo in the patch/commit message: s/writebac/writeback/

-- 
Best regards,
Bjørn Forsman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ