[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFH1YnNqu3DB2Ai48Dwme6uZS-8SOHa++6XGE-w=N50hw5AUCQ@mail.gmail.com>
Date: Tue, 10 Nov 2020 20:36:26 +0800
From: Zhenzhong Duan <zhenzhong.duan@...il.com>
To: Christoph Hellwig <hch@...radead.org>,
Bjorn Helgaas <bhelgaas@...gle.com>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
linux-pci@...r.kernel.org
Subject: Re: [PATCH v2] PCI: check also dynamic IDs for duplicate in new_id_store()
Hi Bjorn,
This patch got reviewed-by, could you kindly check if it can be
upstreamed? Thanks very much.
Zhenzhong
On Tue, Oct 27, 2020 at 3:52 PM Christoph Hellwig <hch@...radead.org> wrote:
>
> 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@...il.com>
>
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@....de>
Powered by blists - more mailing lists