RE: [PATCH net-next 2/2] devlink: Fix list access without lock while reading region

2019-02-12 Thread Parav Pandit
> -Original Message- > From: Sergei Shtylyov > Sent: Tuesday, February 12, 2019 3:01 AM > To: Parav Pandit ; Jiri Pirko ; > da...@davemloft.net; netdev@vger.kernel.org > Subject: Re: [PATCH net-next 2/2] devlink: Fix list access without lock while > reading regio

Re: [PATCH net-next 2/2] devlink: Fix list access without lock while reading region

2019-02-12 Thread Sergei Shtylyov
Hello! On 12.02.2019 10:09, Parav Pandit wrote: While finding the devlink device during region reading, devlink device list is accessed and devlink device is returned without holding a lock. This could lead to user-after-free Use-after-free, perhaps? accesses. While at it, add lockdep a

[PATCH net-next 2/2] devlink: Fix list access without lock while reading region

2019-02-11 Thread Parav Pandit
While finding the devlink device during region reading, devlink device list is accessed and devlink device is returned without holding a lock. This could lead to user-after-free accesses. While at it, add lockdep assert to ensure that all future callers hold the lock when calling devlink_get_from_