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:	Mon, 6 Oct 2008 09:44:33 +0300
From:	"Pekka Enberg" <penberg@...helsinki.fi>
To:	"Alex Chiang" <achiang@...com>
Cc:	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 11/15] PCI: rpaphp: kmalloc/kfree slot->name directly

On Sat, Oct 4, 2008 at 2:18 AM, Alex Chiang <achiang@...com> wrote:
> @@ -63,10 +63,9 @@ struct slot *alloc_slot_struct(struct device_node *dn,
>                                           GFP_KERNEL);
>        if (!slot->hotplug_slot->info)
>                goto error_hpslot;
> -       slot->hotplug_slot->name = kmalloc(strlen(drc_name) + 1, GFP_KERNEL);
> -       if (!slot->hotplug_slot->name)
> +       slot->name = kmalloc(strlen(drc_name) + 1, GFP_KERNEL);
> +       if (!slot->name)
>                goto error_info;
> -       slot->name = slot->hotplug_slot->name;
>        strcpy(slot->name, drc_name);

Minor nit: you could use kstrdup() here.
--
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