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:   Fri, 31 Jan 2020 10:07:06 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Jacob Keller <jacob.e.keller@...el.com>
Cc:     netdev@...r.kernel.org, jiri@...nulli.us, valex@...lanox.com,
        linyunsheng@...wei.com, lihong.yang@...el.com
Subject: Re: [PATCH 02/15] devlink: add functions to take snapshot while
 locked

On Thu, 30 Jan 2020 14:58:57 -0800, Jacob Keller wrote:
> +static int
> +devlink_region_snapshot_create_locked(struct devlink_region *region,
> +				      u8 *data, u32 snapshot_id,
> +				      devlink_snapshot_data_dest_t *destructor)

-1 on the _locked suffix. Please follow the time-honored tradition of
using double underscore for internal helpers which make assumption
about calling context.

> +{
> +	struct devlink_snapshot *snapshot;

lockdep_assert_held() is much better than just a kdoc comment.

> +	/* check if region can hold one more snapshot */
> +	if (region->cur_snapshots == region->max_snapshots)
> +		return -ENOMEM;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ