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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8bd0f97a0903110343m1f2f01catbc6cd54ecce91db9@mail.gmail.com>
Date:	Wed, 11 Mar 2009 06:43:33 -0400
From:	Mike Frysinger <vapier.adi@...il.com>
To:	graff yang <graff.yang@...il.com>
Cc:	samuel@...tiz.org, irda-users@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, graf.yang@...log.com,
	cooloney@...nel.org
Subject: Re: [PATCH] [net/irda]: new Blackfin on-chip SIR IrDA driver

On Wed, Mar 11, 2009 at 05:56, graff yang wrote:
> On Wed, Mar 11, 2009 at 3:57 PM, Mike Frysinger wrote:
>> On Wed, Mar 11, 2009 at 03:29,  <graff.yang@...il.com> wrote:
>>> +static int __devinit bfin_sir_probe(struct platform_device *pdev)
>>> +{
>>> +       struct net_device *dev;
>>> +       struct bfin_sir_self *self;
>>> +       unsigned int baudrate_mask;
>>> +       struct bfin_sir_port *sir_port;
>>> +       int err;
>>> +
>>> +       err = peripheral_request_list(per[pdev->id], DRIVER_NAME);
>>
>> what if pdev->id is set to 12512 ?
>
> The pdev->id is defined in board files, for example, uart0 should be 0.

so ?  what's to stop the user from setting it to 12415 ?  the driver
must sanity check these things.  you can never assume platform dev
resources always have valid pointers and valid values.

>>> +       switch (max_rate) {
>>> +       default:
>>> +               printk(KERN_WARNING "bfin_sir: Invalid maximum baud rate, using 9600\n");
>>
>> dev_warn(&dev->dev,....) ?
>
> Here the netdev has not been registered.

then use pdev->dev ?
-mike
--
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