lkml.org 
[lkml]   [2020]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] PCI: check also dynamic IDs for duplicate in new_id_store()
On Mon, Oct 26, 2020 at 11:57:10AM +0800, Zhenzhong Duan wrote:
> When a device ID data is writen to /sys/bus/pci/drivers/.../new_id,
> only static ID table is checked for duplicate and multiple dynamic ID
> entries of same kind are allowed to exist in a dynamic linked list.
>
> Fix it by calling pci_match_device() which checks both dynamic and static
> IDs.
>
> After fix, it shows below result which is expected.
>
> echo "1af4:1000" > /sys/bus/pci/drivers/vfio-pci/new_id
> echo "1af4:1000" > /sys/bus/pci/drivers/vfio-pci/new_id
> -bash: echo: write error: File exists
>
> Drop the static specifier and add a prototype to avoid build error.
>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

\
 
 \ /
  Last update: 2020-10-27 08:53    [W:0.734 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site