RE: [PATCH] Fix NULL pointer dereference in sd_revalidate_disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Should this need pick up into stable too?

Jack
Re: [PATCH] Fix NULL pointer dereference in sd_revalidate_disk
> 
> On Wed, Feb 22, 2012 at 10:01:53AM +0900, Jun'ichi Nomura wrote:
> > Since 2.6.39 (1196f8b), when a driver returns -ENOMEDIUM for open(),
> > __blkdev_get() calls rescan_partitions() to remove
> > in-kernel partition structures and raise KOBJ_CHANGE uevent.
> >
> > However it ends up calling driver's revalidate_disk without open
> > and could cause oops.
> >
> > In the case of SCSI:
> >
> >   process A                  process B
> >   ----------------------------------------------
> >   sys_open
> >     __blkdev_get
> >       sd_open
> >         returns -ENOMEDIUM
> >                              scsi_remove_device
> >                                <scsi_device torn down>
> >       rescan_partitions
> >         sd_revalidate_disk
> >           <oops>
> >
> > Oopses are reported here:
> > http://marc.info/?l=linux-scsi&m=132388619710052
> >
> > This patch separates the partition invalidation from rescan_partitions()
> > and use it for -ENOMEDIUM case.
> >
> > Reported-by: Huajun Li <huajun.li.lee@xxxxxxxxx>
> > Signed-off-by: Jun'ichi Nomura <j-nomura@xxxxxxxxxxxxx>
> 
> Acked-by: Tejun Heo <tj@xxxxxxxxxx>
> 
> Thank you!
> 
> --
> tejun
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux