1. 17 3月, 2009 5 次提交
    • M
      dm crypt: wait for endio to complete before destruction · b35f8caa
      Milan Broz 提交于
      The following oops has been reported when dm-crypt runs over a loop device.
      
      ...
      [   70.381058] Process loop0 (pid: 4268, ti=cf3b2000 task=cf1cc1f0 task.ti=cf3b2000)
      ...
      [   70.381058] Call Trace:
      [   70.381058]  [<d0d76601>] ? crypt_dec_pending+0x5e/0x62 [dm_crypt]
      [   70.381058]  [<d0d767b8>] ? crypt_endio+0xa2/0xaa [dm_crypt]
      [   70.381058]  [<d0d76716>] ? crypt_endio+0x0/0xaa [dm_crypt]
      [   70.381058]  [<c01a2f24>] ? bio_endio+0x2b/0x2e
      [   70.381058]  [<d0806530>] ? dec_pending+0x224/0x23b [dm_mod]
      [   70.381058]  [<d08066e4>] ? clone_endio+0x79/0xa4 [dm_mod]
      [   70.381058]  [<d080666b>] ? clone_endio+0x0/0xa4 [dm_mod]
      [   70.381058]  [<c01a2f24>] ? bio_endio+0x2b/0x2e
      [   70.381058]  [<c02bad86>] ? loop_thread+0x380/0x3b7
      [   70.381058]  [<c02ba8a1>] ? do_lo_send_aops+0x0/0x165
      [   70.381058]  [<c013754f>] ? autoremove_wake_function+0x0/0x33
      [   70.381058]  [<c02baa06>] ? loop_thread+0x0/0x3b7
      
      When a table is being replaced, it waits for I/O to complete
      before destroying the mempool, but the endio function doesn't
      call mempool_free() until after completing the bio.
      
      Fix it by swapping the order of those two operations.
      
      The same problem occurs in dm.c with md referenced after dec_pending.
      Again, we swap the order.
      
      Cc: stable@kernel.org
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      b35f8caa
    • H
      dm crypt: fix kcryptd_async_done parameter · b2174eeb
      Huang Ying 提交于
      In the async encryption-complete function (kcryptd_async_done), the
      crypto_async_request passed in may be different from the one passed to
      crypto_ablkcipher_encrypt/decrypt.  Only crypto_async_request->data is
      guaranteed to be same as the one passed in.  The current
      kcryptd_async_done uses the passed-in crypto_async_request directly
      which may cause the AES-NI-based AES algorithm implementation to panic.
      
      This patch fixes this bug by only using crypto_async_request->data,
      which points to dm_crypt_request, the crypto_async_request passed in.
      The original data (convert_context) is gotten from dm_crypt_request.
      
      [mbroz@redhat.com: reworked]
      Cc: stable@kernel.org
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      b2174eeb
    • M
      dm io: respect BIO_MAX_PAGES limit · d659e6cc
      Mikulas Patocka 提交于
      dm-io calls bio_get_nr_vecs to get the maximum number of pages to use
      for a given device.  It allocates one additional bio_vec to use
      internally but failed to respect BIO_MAX_PAGES, so fix this.
      
      This was the likely cause of:
        https://bugzilla.redhat.com/show_bug.cgi?id=173153
      
      Cc: stable@kernel.org
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      d659e6cc
    • M
      dm table: rework reference counting fix · f80a5570
      Mikulas Patocka 提交于
      Fix an error introduced in dm-table-rework-reference-counting.patch.
      
      When there is failure after table initialization, we need to use
      dm_table_destroy, not dm_table_put, to free the table.
      
      dm_table_put may be used only after dm_table_get.
      
      Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
      Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
      Reviewed-by: NJonathan Brassow <jbrassow@redhat.com>
      Reviewed-by: NAlasdair G Kergon <agk@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      f80a5570
    • M
      dm ioctl: validate name length when renaming · bc0fd67f
      Milan Broz 提交于
      When renaming a mapped device validate the length of the new name.
      
      The rename ioctl accepted any correctly-terminated string enclosed
      within the data passed from userspace.  The other ioctls enforce a
      size limit of DM_NAME_LEN.  If the name is changed and becomes longer
      than that, the device can no longer be addressed by name.
      
      Fix it by properly checking for device name length (including
      terminating zero).
      
      Cc: stable@kernel.org
      Signed-off-by: NMilan Broz <mbroz@redhat.com>
      Reviewed-by: NJonathan Brassow <jbrassow@redhat.com>
      Reviewed-by: NAlasdair G Kergon <agk@redhat.com>
      Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
      bc0fd67f
  2. 16 3月, 2009 2 次提交
    • K
      parisc: sba_iommu: fix build bug when CONFIG_PARISC_AGP=y · 5bee17f1
      Kyle McMartin 提交于
      CC      drivers/parisc/sba_iommu.o
      drivers/parisc/sba_iommu.c:1373: error: expected identifier or '('
      before '}' token
      make[2]: *** [drivers/parisc/sba_iommu.o] Error 1
      make[1]: *** [drivers/parisc] Error 2
      make: *** [drivers] Error 2
      
      Don't know how this has gone missed for so long... clearly I need
      to do builds on my C8000 more often.
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5bee17f1
    • L
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · fbd8104c
      Linus Torvalds 提交于
      * master.kernel.org:/home/rmk/linux-2.6-arm: (23 commits)
        [ARM] Fix virtual to physical translation macro corner cases
        [ARM] update mach-types
        [ARM] 5421/1: ftrace: fix crash due to tracing of __naked functions
        MX1 fix include
        [ARM] 5419/1: ep93xx: fix build warnings about struct i2c_board_info
        [ARM] 5418/1: restore lr before leaving mcount
        ARM: OMAP: board-omap3beagle: set i2c-3 to 100kHz
        ARM: OMAP: Allow I2C bus driver to be compiled as a module
        ARM: OMAP: sched_clock() corrected
        ARM: OMAP: Fix compile error if pm.h is included
        [ARM] orion5x: pass dram mbus data to xor driver
        [ARM] S3C64XX: Fix s3c64xx_setrate_clksrc
        [ARM] S3C64XX: sparse warnings in arch/arm/plat-s3c64xx/irq.c
        [ARM] S3C64XX: sparse warnings in arch/arm/plat-s3c64xx/s3c6400-clock.c
        [ARM] S3C64XX: Fix USB host clock mux list
        [ARM] S3C64XX: Fix name of USB host clock.
        [ARM] S3C64XX: Rename IRQ_UHOST to IRQ_USBH
        [ARM] S3C64XX: Do gpiolib configuration earlier
        [ARM] S3C64XX: Staticise s3c64xx_init_irq_eint()
        [ARM] SMDK6410: Declare iodesc table static
        ...
      fbd8104c
  3. 15 3月, 2009 16 次提交
  4. 14 3月, 2009 12 次提交
  5. 13 3月, 2009 5 次提交