LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> To: Keith Packard <keithp@keithp.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl>, Linux Kernel Development <linux-kernel@vger.kernel.org>, Linux Frame Buffer Device Development <linux-fbdev-devel@lists.sourceforge.net> Subject: Re: [PATCH] [drivers/video/fb] Eliminate recursive mutex in compat fb ioctl path Date: Mon, 3 Nov 2008 11:12:18 +0100 (CET) [thread overview] Message-ID: <Pine.LNX.4.64.0811031110450.12897@vixen.sonytel.be> (raw) In-Reply-To: <1225696010-6574-1-git-send-email-keithp@keithp.com> [-- Attachment #1: Type: TEXT/PLAIN, Size: 1777 bytes --] On Sun, 2 Nov 2008, Keith Packard wrote: > fb_compat_ioctl grabbed the fb mutex and then called fb_ioctl, which also > grabs the same mutex. I traced through all existing fb_compat_ioctl > functions in the various fb drivers and found that they also transform their > arguments and call the native fb_ioctl function. So, it is correct to just > remove the mutex_lock/mutex_unlock pair in the top-level compat path. Last week I submitted an alternative fix: http://lkml.org/lkml/2008/10/31/162 Probably Rafael wants to keep track of this regression, too? > Signed-off-by: Keith Packard <keithp@keithp.com> > --- > drivers/video/fbmem.c | 2 -- > 1 files changed, 0 insertions(+), 2 deletions(-) > > diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c > index cd5f20d..548cf26 100644 > --- a/drivers/video/fbmem.c > +++ b/drivers/video/fbmem.c > @@ -1253,7 +1253,6 @@ fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) > struct fb_ops *fb = info->fbops; > long ret = -ENOIOCTLCMD; > > - mutex_lock(&info->lock); > switch(cmd) { > case FBIOGET_VSCREENINFO: > case FBIOPUT_VSCREENINFO: > @@ -1279,7 +1278,6 @@ fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) > ret = fb->fb_compat_ioctl(info, cmd, arg); > break; > } > - mutex_unlock(&info->lock); > return ret; > } > #endif With kind regards, Geert Uytterhoeven Software Architect Sony Techsoft Centre Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone: +32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: Geert.Uytterhoeven@sonycom.com Internet: http://www.sony-europe.com/ A division of Sony Europe (Belgium) N.V. VAT BE 0413.825.160 · RPR Brussels Fortis · BIC GEBABEBB · IBAN BE41293037680010
prev parent reply other threads:[~2008-11-03 10:12 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-11-03 7:06 [PATCH] [drivers/video/fb] Eliminate recursive mutex in compat fb ioctl path Keith Packard 2008-11-03 10:12 ` Geert Uytterhoeven [this message]
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=Pine.LNX.4.64.0811031110450.12897@vixen.sonytel.be \ --to=geert.uytterhoeven@sonycom.com \ --cc=keithp@keithp.com \ --cc=linux-fbdev-devel@lists.sourceforge.net \ --cc=linux-kernel@vger.kernel.org \ --cc=rjw@sisk.pl \ /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: linkBe 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; as well as URLs for NNTP newsgroup(s).