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]
Message-ID: <20110610204403.GA13450@kroah.com>
Date:	Fri, 10 Jun 2011 13:44:03 -0700
From:	Greg KH <greg@...ah.com>
To:	Jim Cromie <jim.cromie@...il.com>, Arnd Bergmann <arnd@...db.de>
Cc:	linux-kernel@...r.kernel.org, rpjday@...shcourse.ca
Subject: Re: [PATCH] fix bogus use of rc = alloc_chrdev_region()

On Fri, Jun 10, 2011 at 02:29:42PM -0600, Jim Cromie wrote:
> can someone pick this up,
> for this release or next ?

It was rumored that Arnd wanted to take over drivers/char/.

Arnd?


> 
> On Thu, Jun 2, 2011 at 11:38 PM, Jim Cromie <jim.cromie@...il.com> wrote:
> > Robert P.J. Day noticed a bogus assignment: major = rc, after
> > the call to alloc_chrdev_region() in pc8736x_gpio_init().
> >
> > The code as written expects return-code behavior as for
> > register_chrdev(), ie on success: rc = reserved-major when
> > requested-major = 0.  But for alloc_chrdev_region(), this isnt the
> > case.  Since its used for debug printing only, just excise the mess.
> >
> > Signed-of-by: Jim Cromie <jim.cromie@...il.com>
> > Reported-by: Robert P.J. Day <rpjday@...shcourse.ca>
> > cc: Greg KH <greg@...ah.com.
> > Signed-off-by: Jim Cromie <jim.cromie@...il.com>
> > ---
> >  drivers/char/pc8736x_gpio.c |    5 +----
> >  1 files changed, 1 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/char/pc8736x_gpio.c b/drivers/char/pc8736x_gpio.c
> > index b304ec0..30d92fe 100644
> > --- a/drivers/char/pc8736x_gpio.c
> > +++ b/drivers/char/pc8736x_gpio.c
> > @@ -314,10 +314,7 @@ static int __init pc8736x_gpio_init(void)
> >                dev_err(&pdev->dev, "register-chrdev failed: %d\n", rc);
> >                goto undo_request_region;
> >        }
> > -       if (!major) {
> > -               major = rc;
> > -               dev_dbg(&pdev->dev, "got dynamic major %d\n", major);
> > -       }
> > +       dev_dbg(&pdev->dev, "using chardev major %d\n", major);
> >
> >        pc8736x_init_shadow();
> >
> > --
> > 1.7.4.2
> >
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ