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] [day] [month] [year] [list]
Message-ID: <20200608195520.GB30374@kadam>
Date:   Mon, 8 Jun 2020 22:55:21 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Souptick Joarder <jrdr.linux@...il.com>
Cc:     "open list:ANDROID DRIVERS" <devel@...verdev.osuosl.org>,
        Bharath Vedartham <linux.bhar@...il.com>,
        harshjain32@...il.com, John Hubbard <jhubbard@...dia.com>,
        Simon Sandström <simon@...anor.nu>,
        linux-kernel@...r.kernel.org, Greg KH <gregkh@...uxfoundation.org>,
        jane.pnx9@...il.com
Subject: Re: [PATCH] staging: kpc2000: kpc_dma: Convert get_user_pages() -->
 pin_user_pages()

On Tue, Jun 09, 2020 at 01:03:51AM +0530, Souptick Joarder wrote:
> On Tue, Jun 9, 2020 at 12:47 AM Dan Carpenter <dan.carpenter@...cle.com> wrote:
> >
> > On Tue, Jun 09, 2020 at 12:31:42AM +0530, Souptick Joarder wrote:
> > > > > @@ -189,10 +192,9 @@ static int kpc_dma_transfer(struct dev_private_data *priv,
> > > > >       sg_free_table(&acd->sgt);
> > > > >    err_dma_map_sg:
> > > > >    err_alloc_sg_table:
> > > >
> > > > So now we end up with two unnecessary labels. Probably best to delete two of these
> > > > three and name the remaining one appropriately:
> > >
> > > Hmm, I thought about it. But later decided to wait for review comments
> > > on the same in v1.
> > > I will remove it now.
> >
> > These are all unrelated to pin_user_pages().  Please don't do it in the
> > same patch. Staging code is there because it's ugly...  If you don't
> > want to do unrelated changes to label names then you don't have to.
> 
> What I am planning is to put this changes in a series. One patch will take care
> of pin_user_pages() related changes, 2nd patch will take care of minor bug
> fix in error path + level correction and 3rd patch
> will take care of set_page_dirty() -> set_page_dirty_lock().


Always do bug fixes first.  Always do the easiest least controversial
after first.

Do the error handling bug first.  Change "rv" to int.  That's closely
related to the error handling.  Then set_page_dirty_lock().  Then the
conversion to pin_user_pages().

Then if you want you can do any unrelated clean ups and error label
renames as patch 4.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ