From: Tobias Powalowski <tobias.powalowski@googlemail.com>
To: Tejun Heo <tj@kernel.org>, gregkh@linuxfoundation.org
Cc: "Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Thomas Bächler" <thomas@archlinux.org>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
linux-kernel@vger.kernel.org, davej@redhat.com
Subject: Re: [PATCH driver-core-linus] kernfs: add back missing error check in kernfs_fop_mmap()
Date: Sun, 20 Apr 2014 18:55:38 +0200 [thread overview]
Message-ID: <5353FC0A.2080302@googlemail.com> (raw)
In-Reply-To: <20140420122921.GA32624@htj.dyndns.org>
[-- Attachment #1.1: Type: text/plain, Size: 1685 bytes --]
Am 20.04.2014 14:29, schrieb Tejun Heo:
> While updating how mmap enabled kernfs files are handled by lockdep,
> 9b2db6e18945 ("sysfs: bail early from kernfs_file_mmap() to avoid
> spurious lockdep warning") inadvertently dropped error return check
> from kernfs_file_mmap(). The intention was just dropping "if
> (ops->mmap)" check as the control won't reach the point if the mmap
> callback isn't implemented, but I mistakenly removed the error return
> check together with it.
>
> This led to Xorg crash on i810 which was reported and bisected to the
> commit and then to the specific change by Tobias.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-and-bisected-by: Tobias Powalowski <tobias.powalowski@googlemail.com>
> References: http://lkml.kernel.org/g/533D01BD.1010200@googlemail.com
> ---
> Hello,
>
> Oops, sorry that I didn't see the mistake which seems so obvious now.
> Can you please verify that this patch works?
>
> Thanks a lot for the report and bisection!
>
> fs/kernfs/file.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
> index 8034706..e01ea4a 100644
> --- a/fs/kernfs/file.c
> +++ b/fs/kernfs/file.c
> @@ -484,6 +484,8 @@ static int kernfs_fop_mmap(struct file *file, struct vm_area_struct *vma)
>
> ops = kernfs_ops(of->kn);
> rc = ops->mmap(of, vma);
> + if (rc)
> + goto out_put;
>
> /*
> * PowerPC's pci_mmap of legacy_mem uses shmem_zero_setup()
Hi,
confirmed patch works fine.
Thanks.
greetings
tpowa
--
Tobias Powalowski
Archlinux Developer & Package Maintainer (tpowa)
http://www.archlinux.org
tpowa@archlinux.org
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 555 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Tobias Powalowski <tobias.powalowski@googlemail.com>
To: Tejun Heo <tj@kernel.org>, gregkh@linuxfoundation.org
Cc: "Thomas Bächler" <thomas@archlinux.org>,
linux-kernel@vger.kernel.org,
intel-gfx <intel-gfx@lists.freedesktop.org>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
davej@redhat.com
Subject: Re: [PATCH driver-core-linus] kernfs: add back missing error check in kernfs_fop_mmap()
Date: Sun, 20 Apr 2014 18:55:38 +0200 [thread overview]
Message-ID: <5353FC0A.2080302@googlemail.com> (raw)
In-Reply-To: <20140420122921.GA32624@htj.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]
Am 20.04.2014 14:29, schrieb Tejun Heo:
> While updating how mmap enabled kernfs files are handled by lockdep,
> 9b2db6e18945 ("sysfs: bail early from kernfs_file_mmap() to avoid
> spurious lockdep warning") inadvertently dropped error return check
> from kernfs_file_mmap(). The intention was just dropping "if
> (ops->mmap)" check as the control won't reach the point if the mmap
> callback isn't implemented, but I mistakenly removed the error return
> check together with it.
>
> This led to Xorg crash on i810 which was reported and bisected to the
> commit and then to the specific change by Tobias.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-and-bisected-by: Tobias Powalowski <tobias.powalowski@googlemail.com>
> References: http://lkml.kernel.org/g/533D01BD.1010200@googlemail.com
> ---
> Hello,
>
> Oops, sorry that I didn't see the mistake which seems so obvious now.
> Can you please verify that this patch works?
>
> Thanks a lot for the report and bisection!
>
> fs/kernfs/file.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
> index 8034706..e01ea4a 100644
> --- a/fs/kernfs/file.c
> +++ b/fs/kernfs/file.c
> @@ -484,6 +484,8 @@ static int kernfs_fop_mmap(struct file *file, struct vm_area_struct *vma)
>
> ops = kernfs_ops(of->kn);
> rc = ops->mmap(of, vma);
> + if (rc)
> + goto out_put;
>
> /*
> * PowerPC's pci_mmap of legacy_mem uses shmem_zero_setup()
Hi,
confirmed patch works fine.
Thanks.
greetings
tpowa
--
Tobias Powalowski
Archlinux Developer & Package Maintainer (tpowa)
http://www.archlinux.org
tpowa@archlinux.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 555 bytes --]
next prev parent reply other threads:[~2014-04-20 16:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 6:37 3.14 issue with i810 graphic card bisected Tobias Powalowski
2014-04-18 20:38 ` Tejun Heo
2014-04-19 5:36 ` Tobias Powalowski
2014-04-19 18:00 ` Tobias Powalowski
2014-04-19 19:00 ` Tobias Powalowski
2014-04-20 2:19 ` Felix Miata
2014-05-15 0:56 ` Felix Miata
2014-05-15 7:08 ` Daniel Vetter
2014-04-20 12:29 ` [PATCH driver-core-linus] kernfs: add back missing error check in kernfs_fop_mmap() Tejun Heo
2014-04-20 12:29 ` Tejun Heo
2014-04-20 16:55 ` Tobias Powalowski [this message]
2014-04-20 16:55 ` Tobias Powalowski
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=5353FC0A.2080302@googlemail.com \
--to=tobias.powalowski@googlemail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=davej@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas@archlinux.org \
--cc=tj@kernel.org \
/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.