[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YoNQA0OuGtj2Q9o3@kroah.com>
Date: Tue, 17 May 2022 09:34:27 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: "zhanghongtao (A)" <zhanghongtao22@...wei.com>
Cc: akpm@...ux-foundation.org, linfeilong@...wei.com,
suweifeng1@...wei.com, linux-kernel@...r.kernel.org,
io-uring@...r.kernel.org
Subject: Re: [PATCH] drivers:uio: Fix system crashes during driver switchover
On Wed, May 11, 2022 at 04:51:11PM +0800, zhanghongtao (A) wrote:
> Thanks for your reply.
> I looked through the historical emails and thought I was not the
> same problem as his.
> After the driver is switched, the application can still operate
> on the mapped address, which causes the system to crash.
> The application is not aware of the driver's switchover.
> The solution I can think of is to block the switch and wait for
> the application to release before switching, as shown in the patch.
> So want to seek help from the community, how to solve it better?
> Is there a better way?
Yes, do not unbind the driver from the device unless all userspace
programs have stopped using the device.
Also, do not use the UIO driver for disk devices, that way is crazy, use
a real block driver. What prevents you from doing that today?
thanks,
greg k-h
Powered by blists - more mailing lists