Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1579803

Re: IB/hfi1: Use memdup_user() rather than duplicating its implementation in hfi1_user_sdma_process_request()

From Dan Carpenter <dan.carpenter@oracle.com>
Newsgroups linux.kernel
Subject Re: IB/hfi1: Use memdup_user() rather than duplicating its implementation in hfi1_user_sdma_process_request()
Date 2017-02-13 15:10 +0100
Message-ID <tapuj-4IS-23@gated-at.bofh.it> (permalink)
References <t9qC5-ha-13@gated-at.bofh.it> <t9qC5-ha-15@gated-at.bofh.it> <t9HWi-2oa-23@gated-at.bofh.it> <tamwq-2Cb-23@gated-at.bofh.it> <tamPN-2Yu-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Feb 13, 2017 at 12:12:51PM +0100, SF Markus Elfring wrote:
> >> Thanks for the patch, but this one is already taken care of along
> >> with other similar uses of kmalloc/copy:
> >>
> >> http://marc.info/?l=linux-rdma&m=148656088729538&w=2
> >>
> > 
> > Michael's patch doesn't change user_sdma_free_request() so it introduces
> > a kfreeing an error pointer bug.
> 
> Did you notice that another local variable “tmp” was introduced in the update step
> “[PATCH 27/27] IB/hfi1: Code reuse with memdup_copy” so that
> the mentioned function will usually get a null pointer after a failure there?
> 

Ah right.  Thanks.  I missed that.

regards,
dan carpenter

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] IB/hfi1: Fine-tuning for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-10 22:10 +0100
  [PATCH 1/5] IB/hfi1: Use kcalloc() in hfi1_user_exp_rcv_init() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-10 22:10 +0100
  [PATCH 4/5] IB/hfi1: Use memdup_user() rather than duplicating its  implementation in hfi1_user_sdma_process_request() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-10 22:10 +0100
    Re: [PATCH 4/5] IB/hfi1: Use memdup_user() rather than duplicating  its implementation in hfi1_user_sdma_process_request() Dennis Dalessandro <dennis.dalessandro@intel.com> - 2017-02-11 16:40 +0100
      Re: [PATCH 27/27] IB/hfi1: Code reuse with memdup_copy SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-13 11:00 +0100
      Re: [PATCH 4/5] IB/hfi1: Use memdup_user() rather than duplicating  its implementation in hfi1_user_sdma_process_request() Dan Carpenter <dan.carpenter@oracle.com> - 2017-02-13 12:00 +0100
        Re: IB/hfi1: Use memdup_user() rather than duplicating its  implementation in hfi1_user_sdma_process_request() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-13 12:20 +0100
          Re: IB/hfi1: Use memdup_user() rather than duplicating its  implementation in hfi1_user_sdma_process_request() Dan Carpenter <dan.carpenter@oracle.com> - 2017-02-13 15:10 +0100
  [PATCH 5/5] IB/hfi1: Improve another size determination in  hfi1_user_sdma_process_request() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-10 22:10 +0100
  [PATCH 3/5] IB/hfi1: Adjust another size determination in  hfi1_user_sdma_alloc_queues() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-10 22:10 +0100
    Re: [PATCH 3/5] IB/hfi1: Adjust another size determination in  hfi1_user_sdma_alloc_queues() Johannes Thumshirn <jthumshirn@suse.de> - 2017-02-13 10:20 +0100
      Re: [PATCH 3/5] IB/hfi1: Adjust another size determination in  hfi1_user_sdma_alloc_queues() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-13 10:40 +0100
        Re: [PATCH 3/5] IB/hfi1: Adjust another size determination in  hfi1_user_sdma_alloc_queues() Johannes Thumshirn <jthumshirn@suse.de> - 2017-02-13 11:00 +0100
          Re: IB/hfi1: Adjust another size determination in  hfi1_user_sdma_alloc_queues() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-13 11:40 +0100
            Re: IB/hfi1: Adjust another size determination in  hfi1_user_sdma_alloc_queues() Johannes Thumshirn <jthumshirn@suse.de> - 2017-02-13 11:50 +0100
  [PATCH 2/5] IB/hfi1: Use kcalloc() in hfi1_user_sdma_alloc_queues() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-02-10 22:10 +0100

csiph-web