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:   Sat, 30 Nov 2019 12:27:42 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     fugang.duan@....com
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net,stable 1/1] net: fec: match the dev_id between
 probe and remove

From: Andy Duan <fugang.duan@....com>
Date: Fri, 29 Nov 2019 06:40:28 +0000

> Test device bind/unbind on i.MX8QM platform:
> echo 5b040000.ethernet > /sys/bus/platform/drivers/fec/unbind
> echo 5b040000.ethernet > /sys/bus/platform/drivers/fec/bind
> 
> error log:
> pps pps0: new PPS source ptp0 /sys/bus/platform/drivers/fec/bind
> fec: probe of 5b040000.ethernet failed with error -2
> 
> It should decrease the dev_id when device is unbinded. So let
> the fec_dev_id as global variable and let the count match in
> .probe() and .remvoe().
> 
> Reported-by: shivani.patel <shivani.patel@...ansystech.com>
> Signed-off-by: Fugang Duan <fugang.duan@....com>

This is not correct.

Nothing says that there is a direct correlation between the devices
added and the ones removed, nor the order in which these operations
occur relative to eachother.

This dev_id allocation is buggy because you aren't using a proper
ID allocation scheme such as IDR.

I'm not applying this patch, it is incorrect and makes things
worse rather than better.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ