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, 16 Mar 2007 12:14:03 +0200
From:	Artem Bityutskiy <dedekind@...radead.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, haver@...t.ibm.com,
	hch@...radead.org, dwmw2@...radead.org, jwboyer@...ux.vnet.ibm.com
Subject: Re: [PATCH 10/22 take 3] UBI: EBA unit

On Thu, 2007-03-15 at 11:07 -0800, Andrew Morton wrote:
> > +	spin_lock(&ubi->eba.eba_tbl_lock);
> > +	ubi_assert(ubi->eba.eba_tbl[idx].recs);
> > +	leb_ver = ubi->eba.eba_tbl[idx].recs[lnum].leb_ver;
> > +	spin_unlock(&ubi->eba.eba_tbl_lock);
> > +
> > +	return leb_ver;
> > +}
> 
> I very much doubt that the locking in this function (and in the similar
> ones here) does anything useful.

Well, yes, these are integers.

> > +static inline void leb_unmap(struct ubi_info *ubi, int vol_id, int lnum)
> 
> The patch is full of nutty inlining.

Yeah, this file has too much of them.

> Suggestion: just remove all of it.  Then reintroduce inlining in only
> those places where a benefit is demonstrable.  Reduced code size according to
> /bin/size would be a suitable metric.

OK, thanks.

> > +	spin_unlock(&ubi->eba.eba_tbl_lock);
> > +
> > +	return pnum;
> > +}
> 
> Again, the locking seems pointless.

Thanks for comments, will be fixed.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ